[h3][b]Greetings, Commanders![/b][/h3][p]You may be wondering... What is this [i]determinism[/i]?[/p][p][/p][p]Determinism is the idea that everything that happens is caused by something prior and, therefore, is already decided.[/p][p][/p][p]How does that apply in our game? Before, the same solution could give different results. Now we have corrected this, and each solution always produces the same result. It is now [b]deterministic[/b].[/p][p][/p][p]We’ve just updated the demo with these changes![/p][p][/p][p][img src="https://i.postimg.cc/x8nBmrf1/Gif-Det-ENG-1.gif"][/img][/p][p][/p][p]If you are curious, we will tell you in detail what happened and how we solved it:[/p][p][/p][h3][b]The Problem:[/b][/h3][p]You may have noticed that, in some levels of the demo, when bouncing the meteors against each other, their behavior may vary when repeating the same arrangement of objects. This meant the same solution could sometimes complete the level 100% and other times fail miserably, which introduced a “luck” factor that completely broke our idea of the game. [/p][p][/p][p][i]Non-deterministic physics:[/i][/p][p][img src="https://i.postimg.cc/g27YNGNn/Gif-Det-Grupal-1.gif"][/img][/p][p][/p][p]This problem is due to the way Unity handles objects and their physics. When the meteors do not collide with each other, everything is fine: the result is always the same. But when there are many collisions between meteors, small changes in values such as position or velocity cause different results in each attempt. [/p][p]It has been a problem that has haunted us for a whole year of development. We have tried to solve it in many ways, with no success... Until now![/p][p][/p][h3][b]The Solution:[/b][/h3][p]We discovered that, when loading a level, the first time we pressed “Start”, the result was always consistent, regardless of the number of meteors in the scene. That was the key. [/p][p]From there, we create a new scene dedicated exclusively to manage the physics, which is restarted at each attempt. This way, for the game, it is always as if it were the first time, thus ensuring consistent results. [/p][p][i]Deterministic physics:[/i][/p][p][img src="https://i.postimg.cc/bY1Z6VDq/Gif-Det-Grupal-1-1.gif"][/img][/p][p][/p][h3]And loading this scene... Does it affect the player experience, are there now loading screens or jerks every time you try a solution? [/h3][p][/p][p]Not at all. The new scene is loaded additively, including only what is necessary for its operation. It's like putting a sticker on top of a picture. When you press “Start”, the game simply waits for everything to be ready before starting the night simulation. This process takes one or two frames (between 0.017 and 0.033 seconds), which is completely imperceptible to the player.[/p][p][/p][p][img src="https://i.postimg.cc/LsrGDYT5/Transici-n-Noche.gif"][/img][/p][p]We have had to adjust many elements of the game, so it is possible that some solutions that worked before may not work now, and vice versa.[/p][p][/p][p]Most players will probably not notice these changes, but for us it is a huge step towards the final game. [/p][p]Thank you very much for your attention. We hope you are enjoying the demo and stay tuned, because the full game will be loaded with new elements and mechanics![/p][p][/p][p]Any kind of feedback you can leave it here or in our [url="https://discord.gg/WCK6jT34cx"]Discord[/url] channel. [/p][p]Best regards, Commanders![/p][p] [/p]