7 Tips To Optimize your Game !
This tutorial will provide you few tips to optimize your game. This tutorial has been written for new comers to Core and gives you concrete tips about optimization !
SOMMAIRE
1. Planes instead of Cubes
2. Shadows
3. Merged Models
4. Effects & Decals Relevance
5. Effects density & scale
6. Animated meshes & collisions
7. Performance Panel
1 - Using planes 1 sided instead of cubes
If the player is not supposed to be underground and your ground is flat, use a plane 1 sided !
Indeed ! The engine will have less work to do ! Simply a cube has 6 faces, and, wherever the player is, the engine will render the whole cube. A plane 1 sided has only ONE side to render !
Planes 1 sided can also be useful to create nice mechanics for a game when used smartly !
2 - Too many shadows result of dark issues...
Shadows are one the most expensive things in a game ! They are often the reasons your CPU and GPU runs high !
This building template has approximately 400 objects which are all casting shadows !
The cheapest technique is using a plane 1 sided of the same size of the wall of the building (for this specific case) and roatating it so that the visible side is inside the wall ! Don't forget to disable all the shadows you will override with your plane.
As you can see, some details are missing, but the performance gains worth this little lack of shadows.
3 - Merged models are your friends
A huge amount of objects in your game can create issues even if you have a great machine. When you create your game, you should always have a thought about the players who play on low/medium machines !
A template using hundreds or thousands of objects can be merged !
The building template from the second tip was made with 445 objects ! If I run the game now :
Then if I turn the model into a Merged Model, when I run the game, I reach this amount of objects :
This is drastically reducing the number of objects !
4 - Effects and Decals relevance
The effects and decals of Core have a settings named Relevance. With easy words, it's used to render the decal or effect more or less far !
The Relevance option is under the Rendering tab of your effect and decal !
The drop-down menu allows you to choose between 4 states :
The Medium parameter is set by default. Medium is often enough but if you use a very lot of effects and decals, you should set it to Low which will make them fade on a lower distance from the player.
A good thing to know is that you have the possibility to change the rendering distances of these options in the Game Settings of your game :
As you can see, you can change each value for each first three options. For the Vfx and the Decals !
The Critical is not here because this options allows the effect or decal to be rendered infinitely, whatever the distance the player is from it !
5 - Effects density and scale are lag masters
If you use effects, especially those with particles, be careful to use the density and the particles scale wisely !
Indeed ! Particles are a GPU destroyers and can make your game extremely laggy ! For example, in the image below, that's the FPS I had while using a Smoke Volume VFX with a full density and particle scale :
Then I reduced these two settings at their default state, here are my FPS :
As you can see, a bad use of effects can have tough consequences for your game !
6 - Animated meshes and collisions
Animated meshes with collisions are very expensive to your CPU. If an animated mesh is not reachable or used for the gameplay, it should be place under a Client Context or at least having the collisions set on FOCE_OFF
In the case you want to have a moving platform high detailed, be sure to add all the details under a Client Context and only having one invisible cube used with collision !
7 - Performance Tab
You can and should often use the performance tab provided in the Core Editor to watch the different values you are at with your game !
For more information about that, click here !
Hope these little tips helped you somehow