[LittleTips] - 7 Tips To Optimize Your Game!

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 :

image

Then if I turn the model into a Merged Model, when I run the game, I reach this amount of objects :

image

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 !

image

The drop-down menu allows you to choose between 4 states :

image

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 :

image

image

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 :

image

Then I reduced these two settings at their default state, here are my FPS :

image

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 !

image

For more information about that, click here !


Hope these little tips helped you somehow :slight_smile:

7 Likes

Pretty good stuff, but I would like to add a few things to some points that you’ve made :smiley:

  1. The “dark issues” related to too many shadows ,and such, can be fixed without giving up on shadows. Disabling distance field lighting on some objects can fix those glitchy dark areas. Merged objects will instantly disable that option on any child object.
  2. Giving up on shadows on various objects, let’s say a building trim, may be more performant, but without any shadows it will look out of place imo (it will stick out more so this option might be up to the creator).
  3. Using merged objects with an entire building is a big no no imo. The shadow will cull really fast, especially for a relatively tall building. A player might be across the street and the building will not cast shadows or, if they get closer, the shadow will spawn like a terrain shadow. Atm there is no way for us to control the shadow of a merged object and increasing the shadow distance from the sun object doesn’t have that much of an effect. Going back to my second point, I think merged objects are great for trims and small details and you can cut down on the object count significantly .Also, since merged objects disable distance field lighting, can at times be problematic. Distance field lighting is some sort of baked AO. This setting can really unify a build, but for really dark areas such as rooms it is kinda useless, if not, can cause weird artifacts.
  4. I would’ve loved to see something about aggressive merge. I don’t really get what this option does and turning off game and camera collision is something that it ignores. Also, I don’t really see an improvement or if it’s better than having a merged object with those options off and custom collision cubes (forced on) as children.
1 Like

Thank youvery much for these informations ! The "Dark Issues" was just a pun haha ^^

I didn't wanted to write too muchthings, people, especially new comers don't like very much too much reading :slight_smile: So I made it really basically !

But your answer will help people to have more information about that. Thank you for that !