Sign In Register

How can we help you today?

Start a new topic
Answered

Battle design - Options and performance

 I've finally got used to how cloud code and Gamesparks works but now I'm at a bit of a cross roads for my combat/fight/battle design.


I require server authoritive combat which means I'm sending only the attack decisions to the server for calculation and returning the result but it's too slow using events and scriptdata so I've considered making the combat automated and simulating it on the server and running that simulation on the client but that means a chunk of JSON data being sent to clients on combat.


The other option is to learn the realtime feature of Gamesparks and seeing if that is appropiate for my needs of being server authoritive and dealing with fast combat.


I could do with some advice and maybe some ideas on how to target this design.


Thank you


Best Answer

 Hey Ian,


If you haven't already, look at our Hearthstone tutorial. It's advanced and uses a lot of components on our service but it should answer all your question and more with step by step implementation and a lot of useful code.


You can skip the card aspects of the game and go straight from initialization to multiplayer and logic.


But it boils down to:


-Using matchmaking to pair players with similar skills.

-Using Cloud Code to move those players from a match to a GS Challenge which acts as a lobby that tracks player turns.

-You can make challenges turn based or not.

-Using Cloud Code, events, requests, responses and messages you will create a system with server authority and very fast updating times.


Response speeds are very fast, near instant so it will not ruin your user's experience even when they make requests every turn.


Here's a link to the Hearthstone tutorial: https://docs.gamesparks.com/tutorials/multiplayer/hearthstone-example/

Use it as a loose guide, and learn from its features.


Hope that helps,

Omar


 Hey Ian,


Can you tell us more about your game's design and multiplayer approach?


-Do players click buttons?

-Or do players move their character in a 3d space?

-Does the player control one character or multiple?

-WHat is the input allowed?


Any more information will help us gauge the best approach.


Cheers,

Omar 

It's a user interface game, 2D, there isn't any moving but you interact with the game by clicking.

If I can get a system that is performant and allows dynamic and fast paced combat based upon options or clicking then it would be ideal, otherwise I would be forced to a system of automation or a slow paced combat system.

The user will control one player only, it only displays an image of the enemy and if I can get a dynamic system it'll have an option for attack, dodge, run.

I hope this information will help in assisting my design, I thank you for your help in this regard.
Answer

 Hey Ian,


If you haven't already, look at our Hearthstone tutorial. It's advanced and uses a lot of components on our service but it should answer all your question and more with step by step implementation and a lot of useful code.


You can skip the card aspects of the game and go straight from initialization to multiplayer and logic.


But it boils down to:


-Using matchmaking to pair players with similar skills.

-Using Cloud Code to move those players from a match to a GS Challenge which acts as a lobby that tracks player turns.

-You can make challenges turn based or not.

-Using Cloud Code, events, requests, responses and messages you will create a system with server authority and very fast updating times.


Response speeds are very fast, near instant so it will not ruin your user's experience even when they make requests every turn.


Here's a link to the Hearthstone tutorial: https://docs.gamesparks.com/tutorials/multiplayer/hearthstone-example/

Use it as a loose guide, and learn from its features.


Hope that helps,

Omar

It helps some but the only problem I have is that it's not PvP but PvE but I think I can adapt this to a PvE system using request/responses, thank you.

 

Login to post a comment