Victory Lane - overhead car racing game

I’m about 4 hours into this project but have a working prototype already. Defold continues to amaze me in how quickly it allows rapid development of working games.

‘Victory Lane’ is inspired by various overhead racing games - particularly Konami’s “Chequered Flag” which was seen in arcades circa 1988.

The core idea for VL is to ensure that the AI cars use the same physics as the player’s car. A lot of racing games of old had computer cars going around on rails and being unaffected by collisions with the player. So I’ve written the physics in a way that they can be control either by code or by input from the player.

The system I’ve tried so far uses ‘control tiles’ on the map to direct the computer cars and some other code to manage acceleration and braking. Already the computer cars are reasonably quick and manage to find the racing line for the most part.

Lots of ideas still to try out and graphics to add but this is what it looks like so far:

edit: my gif didn’t seem to work so here’s a link to the animation


Wow, impressive work in such a short amount of time! :slight_smile:


Cool! You should compare notes with @JCash who also played around with a racing game: A game by its cover - Pastel Riders


Cool thanks @britzl, I was looking for that link yesterday.

Day 2

A few more ideas have now been prototyped. I wanted to have scenery overhanging the race track, or rather allow the car to drive on top of the surface but also go under things. I’ve added some game objects ‘above’ the cars in terms of z-order to achieve this - again, very easy with Defold.

The AI is reasonable now and gives quite a challenge. It also allows from minor changes to the physics without breaking. If the game ultimately has tunable cars, this will be useful.

I’d like to add drifting capabilities to the cars but not sure how to implement that yet. Some reading will likely be needed.

[Play HTML5 demo in browser] (use arrows keys - accelerate, brake, left & right)


Nice! The AI is really hard to beat! I’ve notices that the overhanging trees seem to “jitter” a bit when moving at a slow speed (almost standing still). Some kind of loss of precision or something? What’s the Z-range you are using?

I noticed that as well. Z-range is -1 to 1. They’re just sprites attached to a GO so I don’t touch their position at all.

I assumed that ‘jitter’ was a floating point artefact of some sort.

1 Like

Day 5

Made some good progress with VL this past few days. I’ve replaced some of the place-holder graphics with prettier stuff and made another track - this time a figure 8 layout. Originally I thought this not possible with the AI system but it turns out it’s perfectly feasible after all and works well.

This evening I’ve added a bit of gui to the game, keeping track of laps and times etc.

Next will be to add a front end and more gui stuff. We car guys like to tune our vehicles so I’ll be adding a screen to increase acceleration, top speed, cornering etc. after each race in championship mode. There will probably be the usual other game modes - quick race, time trial and such.

That’s about it for now. I’ve updated the HTML5 demo if you want a go with the latest stable version. If it’s running slowly for you, try a different browser. Firefox seems very slow compared to Chrome.

[Play HTML5 demo in browser] (use arrows keys - accelerate, brake, left & right)

My best lap time is 9:62 - can you beat it? :grin:


Wow, getting better and better! I wasn’t able to get below 10 seconds though…


Day 7

Victory Lane is about as complete as it’s going to be (for now). After just 1 week of development, I’m happy with what’s been achieved and have taken the game as far as I want for the time being. There’s plenty of room for further development in the future should the mood strike me.

This ‘bare bones’ release has four tracks to race around against 3 computer controlled cars. I think it’s quite tricky at first but quite playable so you can get better at it quite quickly.

I may release on as a free game if it’s appropriate. I’m not sure if such basic games would be well received on there or not.

Defold has been really great to use for this project. I’m starting to feel as though I have a handle on how things work. Ideas sometimes take only a few minutes to implement - the gui functionality is so quick and easy to use (and powerful).

The only thing lacking was more flexible sound support. I tried stringing various samples together to create an engine sound that reacts to the player’s car but it was a long way short of being convincing.

Here’s the link if anyone wants to play the ‘finished’ game: Play in browser (HTML5)

Thanks for reading!

edit: link to OS specific versions on


I’m really really impressed by what you have achieved! Very well done!


Add throttle controllable oversteer (and understeer) and this all day fun.


What @Bjorn_Ritzl said – fantastically done :slight_smile:

1 Like

Hi Ben, thanks for sharing your thoughts and game; I found both entertaining and informative.

Especially interesting for me was the following :

Could you please elaborate on this or provide a third-party reference to the method?


1 Like

@h3annawill There’s an invisible layer on the tilemap for each track that contains arrow tiles which are converted to a direction as the computer controlled cars travel over them. It’s kind of a brute-force approach but works reliably enough for a small game like VL.


Thank you kindly @benjames171 .

1 Like