question

niardev avatar image
niardev asked

Is CloudScript Azure Functions enough ?

Hello,

I have trouble understanding if CloudScript would fit my needs :

My game is a 3D RPG for smartphones with "live" action combats (as opposed to turn-based combats).

However, I won't need to check things server-side in live (like in a multiplayer game to prevent cheating). It's a solo game with social features like visiting other players' castles/house whatever but always as a solo player.
I just need to check if everything is in order at certains points of the game.
But there will be text messaging between friends.

For example, when the player creates a new character, I'll just send from the client the character appearance data like colors and hair style to PlayFab and I'd like to assign, from the server, the character's level (1). Because I guess if I do it from the client, it could get modified to create a new character at lv 100 for example, am I right?

Another example would be to validate, server-side, the player earnings after completing a dungeon.

First, the player initiate a dungeon. So the server will store in player's data a dungeon ID (for example, it can be other data), which can be used to regenerate, client-side, the dungeon to play if the player closes the game before completing or giving up the dungeon. This ID will also help the server to determine the available loots and send them to the client alongside the data needed to "construct" the dungeon the player will explore. (a loading screen is displayed while this happens)

Dungeon is created procedurally according to data sent from server, the player can now play.

So after completing the dungeon, thanks to this ID (and/or other data), the server will check all the looted items/ressources are valid. The player can't drop a Legendary weapon X which shouldn't be lootable in the completed dungeon, or can't earn 2 millions gold where that dungeon could only loot 150 gold at best.

The dungeons will be generated room-by-room (one room = one scene in Unity) so after each room, the server will check what need to be checked and send what type of room is the next one.

Do you think CloudScript is enough for that? Or do I need a separate game server anyway?

If I do need a separate game server, how should I proceed in this path? It's the first time I'm working with remote servers so if you have any leads/documentation etc I would be very grateful.

(That's also why I hope CloudScript is enough hehe, but I guess a separate game server, if needed, would provide more flexibility)

TL;DR :

Is CloudScript enough for these kinds of features :

  • Direct messaging between players
  • [Solo Play] Check validity of data server-side after completing specific actions (creating a character and set level to 1, check looted objects/currencies after a dungeon has been completed etc)

What do you think?

Thanks

CloudScriptdataCustom Game ServersFriends
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Made Wang avatar image
Made Wang answered

>>Direct messaging between players

For chat between friends, we usually recommend using Shared Group Data, you can use Azure Function Cloud Script to do it. But it should be noted that it will not actively push message, players need to manually check whether there is new message. You can also use notification push at the same time to notify players that there is new message, refer to Push Notifications quickstart - PlayFab | Microsoft Docs.

>>[Solo Play] Check validity of data server-side after completing specific actions (creating a character and set level to 1, check looted objects/currencies after a dungeon has been completed etc)

You can check the validity of the data submitted by the client on Azure Function Cloud Script, and you can hand over all write operations to Azure Function Cloud Script for execution.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

niardev avatar image niardev commented ·

Hey, thank you for your answer.

I have another question : if I want to store custom data in a database and access it from Azure Function Cloud Script, is it possible? For example a Google Realtime Database or Cloud Firestore ?

Also is there any Azure equivalent to those database solutions with the advantage to maybe be better integrated with Azure Function Cloud Script / PlayFab ?

Thanks

0 Likes 0 ·
Made Wang avatar image Made Wang niardev commented ·

We’re not experts on database, you can consult Azure, as far as I know if your database supports Web API access then you can access it on Azure Function Cloud Script. And you can also consult Azure for other database solutions.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.