Best practices – Ylands

From Bohemia Interactive Community
Revision as of 11:04, 28 August 2020 by Aleš Ulm (talk | contribs)
Jump to navigation Jump to search

Making a great game may not be enough - your game needs to run well as well. If your game runs slow, it may not be a problem, if it's a puzzle game, but, for example, an action game will very likely become unplayable. An even if your game runs great you may run into problems if it takes up too much memory on mobile devices.

And that is where optimization and knowing what to do and what to avoid comes in. Let us share with you some tips that will help you have great, nicely running games.


Platform:

You can make two kinds of games. PC only and Universal (PC + mobile phones).


PC Only

If your game is meant to run only on PCs, then you definitely have it easier. Every decent PC has enough power to run rather complex games so even poorly optimized games usually run quite well. The tradeoff is obvious - your game can reach substantially less players.


Universal

Making a game that runs well enough even on mobiles can be tricky. There is an extreme range of mobile devices from super slow ones to ones that can almost compete with computers. Even though players can affect visual details ingame to make the game run better it's up to you to optimize it as best as you can. The better job you do, the more devices (and therefore players) will be able to play your game.


So, let's get started.


Memory:

You won't run into memory problems on PC, but you surely can when running your game on mobile devices. To make sure your game won't be terminated by the device's operating system when it consumes more memory than allowed you should watch the memory gauge in the lower-left corner of the screen in the Editor (or click it to see more information). Try staying in the green. Going in yellow means potential problems and you shouldn't definitely be in red.

The rule of thumb when trying to save memory is - simpler objects (like building blocks, game objects) take less memory than sophisticated objects (like NPCs, animals etc.). Using more identical objects is better than using fewer unique ones so using one hundred items of the same type will consume less memory than having 5 different items.

Please note, that this gauge shows only what is currently present in the open scene. If your game spawns a lot of / complex objects during runtime, this information may be less relevant.


XXX zona