Making of StackInTheLoop racing game

This is post about the game our team created for the 47 jam: https://ldjam.com/events/ludum-dare/47/stackintheloop

Mostly, it will be my experience, but maybe @rebelcaptain or @idawaxeor will share their experience too.

It was the first ld we participated as a team. When we woke at the morning and was the theme the first thing that comed up was about a guy who literally got stuck in the loop attached to the helicopter and he must wobble himself to avoid obstacles.

We threw it away after 5 minutes of discussions :)

Next we thought about about more classical approach - a simple platformer with time loop and solving puzzles to escape it. Kind of obvious, but with good level design could have worked.

But in the end we just come up with something like: "hey, why won't we do a racing game with time loop?" End so it begun.

The start

Till the first day midday we were brainstorming on how exactly this should look and be played. We also come up with several testing models of the car like this: photoem2020-10-03/em09-14-14.jpg

Every time I tried to mess with the blender it ended with loss of time and frustration. So Clayxels asset for unity proven itself as a perfect tool for fast modelling. Used it for the first time.

Next was the car physics. Unity already had wheel colliders, a bunch of manuals, so it was easy to implement. And more than one hour to adjust :smiley: I also heard one of the best compliment in my life from one of my teammate: "the car feels hard, more for simulation but the arcade. like nfs5" *the best nfs in my personal opinion. We agreed to add a second controlls preset for more simple model, but were not able to finish it :(

The map

Initially we thought on autogenerating track every loop. Blocked the idea. Than we decided to change some parts of the track every loop - like new turns and etc. At the end of day 1 we knew we would not handle it correctly.

In the end the track representation was a simple drawing in image editor, something like that: Снимок экрана от 2020-10-08 22-13-40.png This picture is used as a mask for terrain generator - black is the road and have constant height, the white is no mask. The grey area was used as transition zone, but looked awful.

For map generating we used a classic way with perlin noise. Two loops of generating - the first with large scale, the second with small, every value of height map is the average value of both. Additionaly we added diamond square to them. The relief was looking perfect...

Then we added the track and it was a disaster >_>

No matter how the track height offset we set - the relief was just too.. high. Beautiful, yes, but unsusable for racing purposes. So the next step was adding another mask to map generation, than will smooth the area. Yet the first iteration was not completely perfect too: Снимок экрана от 2020-10-08 21-35-58.png

After an hour of GIMP masteries I managed to get something suitable as a mask: Снимок экрана от 2020-10-08 22-16-18.png

You can see that it follows the track. The algorithm is simple: * While map is generated iterate every pixel of terrain height map * Check the value of the road mask. If black - set height value on something like 0.4f - 0.001f * Check the value of the mask map. If not road and height map value is more than 0.4f - remap the height value with max depending on the mask map value

The result was still too flat, but it gave some not so bad scenery views The scenery.png

The results

In the end no matter what is was fun :)

But we failed with time management. We started weekend with unfinished deals and they ate up our time, one of the team catch a flu and dropped off on the day three.

Three hours from the jam end I was craddling my child (for an hour already cause why not to stop sleeping when daddy in the hurry?)) ). I was wathcing the clock and thinking: so, it is minus this feature... and now the time to drop another one. And when he finally felt asleep I hurriedly run on bugs and not-so-long to apply features left.

The project could be and one day will be better, with all those little tweaks it needed: trees, sfx sounds, smooth visual transitions. But, nevertheless, I am happy with results, coding all this was fun, and I really enjoy the feeling from riding this tiny rear whell car we made ^_^

Hope you will enjoy it as well.