Car Destruction Racer XIV by unplugred 2018-12-04T04:05:13Z
Hey!
Foon → Ludum Dare Explorer → Users → James9270
| Year | LD | Theme | Game | Division | Overall | ||
|---|---|---|---|---|---|---|---|
| 👥 | 🥈 | 2022 | 51 | Every 10 seconds | Intern Inferno | jam | 4.57 |
| Year | LD | Theme | Game | Division | Category | Score | ||
|---|---|---|---|---|---|---|---|---|
| 👥 | 🥈 | 2022 | 51 | Every 10 seconds | Intern Inferno | jam | Theme | 4.65 |
| 👥 | 🥉 | 2022 | 51 | Every 10 seconds | Intern Inferno | jam | Humor | 4.57 |
| Year | LD | Theme | Game | Division | Rank | Ov | Fu | In | Th | Gr | Au | Hu | Mo | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2022 | 51 | Every 10 seconds | 👥 | Intern Inferno | jam | 2 | 4.57 | 4.47 | 4.22 | 4.65 | 4.67 | 4.34 | 4.57 | 4.59 |
| 2022 | 50 | Delay the inevitable | 👥 | Paper Boy Flyin' High | jam | 471 | 3.69 | 3.66 | 3.54 | 4.00 | 4.38 | 3.78 | 2.73 | 3.67 |
| 2021 | 49 | Unstable | 👥 | Duck Optimizer Pro 2021 | jam | 708 | 3.55 | 3.57 | 3.92 | 2.78 | 4.22 | 4.02 | 4.39 | 3.75 |
| 2021 | 48 | Deeper and deeper | 👥 | Psycho Stellar | jam | 515 | 3.76 | 3.31 | 3.78 | 2.85 | 4.16 | 3.85 | 3.15 | 4.19 |
| 2020 | 47 | Stuck in a loop | 👥 | Record Runner | jam | 53 | 4.22 | 4.16 | 3.94 | 4.36 | 4.05 | 4.52 | 3.86 | 4.08 |
| 2020 | 46 | Keep it alive | 👥 | a Very Talented Worm | jam | 614 | 3.75 | 3.72 | 3.52 | 3.36 | 3.66 | 3.52 | 3.72 | 3.52 |
| 2019 | 45 | Start with nothing | 👥 | Bruno's Mind Control Project | jam | 343 | 3.64 | 3.52 | 3.60 | 3.14 | 3.45 | 3.40 | 3.12 | 3.52 |
| 2019 | 44 | Your life is currency | 👥 | Attack on Jerry | jam | 185 | 3.80 | 3.62 | 3.03 | 3.60 | 3.94 | 3.43 | 3.80 | 3.53 |
| 2018 | 43 | Sacrifices must be made | 👥 | Car Destruction Racer XIV | jam | 52 | 4.11 | 4.00 | 4.13 | 4.18 | 4.26 | 4.14 | 3.95 | 3.95 |
Hey!
@mrerdalural Hey, I'm glad you enjoyed our game!
Regarding optimization, I used several tricks to make sure it performs well. The most effective optimization was to delay some of the computations, so they they only happen at certain intervals, rather than on every frame. This was done for the more expensive computations, namely checking which NPCs were close enough to one another to influence each other's loyalty to the player's team, or the enemy's team.
In addition to that, I simplified the distance checks that occur for each NPC. In order to find the distance between two points, you must compute the square distance, and then find the square root of that. For this, we only needed to check if two points are within a certain radius of one another, so, I removed the square root, and compared the square distance with the radius squared. This way, we don't have to call the square root function every time we check the distance between NPCs.
I also didn't use Unity's Update() function for each NPC, instead, they're all added to a list, and updated from a separate object. This is because there's a small overhead to using builtin functions such as Update(), which can build up if you have many objects using it.
Thanks for playing our game!