Search Unity

Strategy Mobile Game Performance Questions

Discussion in 'General Discussion' started by toshco93, Feb 12, 2018.

?

Is it hard to make a game multi-player, if you have all the logic you need for a single play session

  1. Yes

    62.5%
  2. No

    0 vote(s)
    0.0%
  3. Depends

    37.5%
  1. toshco93

    toshco93

    Joined:
    Feb 12, 2018
    Posts:
    1
    Hello,

    I will make a poll for my last questions since I want to see a lot of short opinions if not all of you can spend the time to read my whole post.

    I have a prototype of a strategy mobile game. I want to start working on it soon since it`s like a dream of mine :D and I have a few questions about performance and multiplayer.

    I didn't find any concrete category on the forum and I'm new here, so I will just post it in General.

    It`s a real-time strategy with single player and a multiplayer (1v1) and you can attack other player`s (or AI`s) base. There are 4-5 bases on each map and the calculations should happen real-time.

    I want to have different talents so that you can choose between more attack, defense or attack speed. And that`s why I need more complex calculations about each fight (will limit the attacks you can send with some kind of cooldown so I don't end up having 5 different fights with different calculations).

    For example, on the prototype, units don't have attack or defense points, health or movement/attack speed and the calculations for each fight happen just dividing the number of units in the army (and it`s too boring this way :D)

    Questions about performance:

    1. How to see how much memory does each fight uses? And total memory usage on mobile devices.
    2. Is it better to make these calculations on the server side?
    3. How to check if the battery usage is too big?
    4. Can you give me some recommended maximum values memory and battery usage?

    Questions about multiplayer:

    5. Is there a good resource on how to program the server side for a game like this or similar.
    6. What kind of server would I need? Or is it better to use a cloud service? Where can I read more about this?

    Sorry if my questions are noobish, but I have been researching and these are the questions I could find good answers to...
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    1) I'm going to guess you'd watch the output of the profiler while you run through some fights

    2) Calculations server side is better for defending against cheats, but adds some latency to clients that may or may not be an issue depending on the pace and speed of feedback your client needs.

    5) Start here, learn about the UNET API, and then venture out and learn about other API's and services, and see how they all fit into the vision for your game before deciding on one
    https://docs.unity3d.com/Manual/UNetOverview.html

    6) You haven't really described your game's server side needs well enough for anyone to make a recommendation. The type of game you describe could be done with clients acting as hosts for the game, or could be done with a dedicated server. Generally you need some type of match making server or 3rd party service. Photon Cloud or Unity Multiplayer Service could handle what you describe without any dedicated server. If you have some kind of character progression system you don't want stored on the clients, then you might need a server for that. If you want to do everything with a dedicated server, you have to consider how your game would scale if you achieve any level of success with it.