The Heist by chuckeles

Introduction
Your only choice is to rob a bank and escape with the loot. Run from the police while you can, until they inevitably catch you...
– that's my take on Ludum Dare #50 's theme, "delaying the inevitable". My idea was that your only option is to keep robbing houses, shops, and banks in order to survive in today's world. But they will inevitably catch you and put in jail. I know, it is a little forced into the theme. Most importantly, my game is heavily inspired by an older flash game I used to play as a kid. Of course, I only got around to actually implementing ~10-20% of it here. You can read more about the game idea in my initial post here: https://ldjam.com/events/ludum-dare/50/the-heist/i-think-i-figured-a-game-idea.
Downloads
You can play the game on Windows or Mac. Unfortunatelly, I wasn't able to export the game as HTML and have it play in the browser.
There are 2 versions – Original and Fixed. Original is the first version I submitted before the compo deadline. Fixed version was made after the deadline and contains 2 important bug fixes and 1 performance optimization. Use either one for judging the game.
Here are all the releases on Github as well.
The game
Your goal in the game is to run away from the police with the money that you stole. You are using the highway to escape so you also have to deal with the traffic. Of course, it's more fun if you wreak havoc at the highway, and you get rewarded for destroying other cars as well.
Controls
Use the mouse to control the main menus in the game. Then, when playing, use the arrow keys or WSAD or the left stick on a controller to control the van.
I forgot to wire up any button which quickly closes or restarts the game, so just close the program (CMD+Q on Mac, Alt+F4 on Windows) when you want to quit.
Settings
In an effort to make the game run on slower machines, too, I added a few settings to the game with which you can disable certain effects and non-essential features such as trees. I hope that this makes the game run smooth for most people.
Particles, in particular, are implemented so horribly that I had them disabled by default. The night mode also runs horribly, so it is more of an experiment than a feature.
Implementation
Once again, I chose Godot as my game engine of choice. I simply love it! I have some experience using it for 2D (see my previous Ludum Dare entries) but this is the first time I've used it for 3D. I also decided to not use any modelling software and simply create everything in the game from basic primitives provided by Godot (almost everything is a box mesh).
All the cars in the game are kinematic bodies with a single collision shape. I implemented the whole collision system myself. Only when the cars are destroyed, they are switching to rigid bodies and their physics are handled by the engine. Every car also shoots two rays in front of it to see whether there's another car and accelerate or break accordingly. Cars also occasionally switch lanes. I'm pretty proud of this little AI and spent a lot of time on it! :blush:
The police was added rather late. Their very primitive AI makes them accelerate or break to catch up with the player van and get in the same horizontal line. They were supposed to steer to get just to the left or right of the player and only then ram them. This, however, does not seem to work properly in the final game. Police cars also shoot two rays in front and try to avoid cars in front. But instead of breaking, they steer to the left or right, depending on which ray hit a car in front.
The level is made from "blocks" of road, each one 100 by 50 meters. The game spawns new ones in front of the player as they move forward, and destroys the ones behind. I originally made it so the player is static and the whole level moves. However, this made the rigid body physics pretty much unusable, so I scratched that and instead made the level static and the player moving forward. I also coded a whole system to choose from a random set of premade blocks, each of them with a different probability of appearing (basic road is the most common, the overpass block less so).
All of this did not leave me with enough time to add any proper success state to the game. At least when you crash your van, the camera zooms in nicely and the police stop right near the car. :slight_smile: So it is actually more interesting to fail than to succeed! :laughing:
You can see all these details in the source code. Also note how the code gets worse and worse as the commits approach the inevitable compo deadline. :grimacing:
All the breaking lights and the police lights are Godot's point lights. They are also set to cast shadows, all of them. In retrospect, this was probably a bad idea and makes the game run slower when they are turned on...
And finally, the particles... Oh dude, I had no idea how to make particle effects in Godot properly. There's no built-in way to spawn a few particles, say an explosion, at a specific position manually. The way I approached this is to make a simple system that, when you want to spawn an effect, duplicates one of its prefabs and inserts it into the level. The effect than auto-destroys when it completes. This turned out to be horribly inefficient, probably because I wanted the effects to be randomized and so every time I spawn an effect in the game, I had to duplicate it's properties to modify them. Particles run so bad that I had them disabled by default. This is something I'll have to research in the future.
Known bugs and problems
:information_source: Items marked FIXED have been fixed in the Fixed version of the game.
- Cars can sometimes "merge" together and stay that way until you crash into them.
- This happens almost all the time with the police, since they like to approach you from the back and crash into you. The collision handing code I wrote does not work great when the two cars are moving very slow relative to each other, so the police often ends up "merging" into the player from behind and then trying to stay in the middle as you move. :disappointed_relieved: I'm a little frustrated that this happens since the police is the major source of fun, but there wasn't enough time to solve this issue.
- FIXED The outro menu which shows up when you complete the highway level cannot be controlled. The buttons don't work. I have no idea why, the buttons are properly wired up in the editor and work when I run just the outro scene. I'm probably using Godot incorrectly somewhere when I'm switching scenes in the game. Again, there wasn't time to investigate and fix this, so you'll just have to close the game when you are done playing.
Screenshots





Ratings
| Overall | 304th | 3.452⭐ | 23🧑⚖️ |
| Fun | 122th | 3.75⭐ | 22🧑⚖️ |
| Innovation | 498th | 2.833⭐ | 23🧑⚖️ |
| Theme | 519th | 3.071⭐ | 23🧑⚖️ |
| Graphics | 247th | 3.595⭐ | 23🧑⚖️ |
| Humor | 294th | 2.786⭐ | 23🧑⚖️ |
| Mood | 366th | 3.119⭐ | 23🧑⚖️ |
| Given | 8🗳️ | 5🗨️ |
I miss some game screen explaining the game mechanics related to winning or losing $
Ended with 4596$ :smile:
Police cars often stuck in my car, and it's a bit annoying :grimacing:
The game runs a bit slow on my machine (6600 XT) on default settings, but, overall, everything is OK.
Good job!
I don't have any major complaints, maybe just that there doesn't seem to be a way to loose? I've tried to intentionally stop and let the police catch me, and they didn't do anything :slight_smile: Not that it matters too much, evading the cars and the police in motion is fun enough.
I really like the graphics, it's all very simple, but effective. Especially at night with particles enabled (disregarding the performance issues).
It's a pity there isn't any sound and music, those would help the game a lot.
Very solid entry overall, well done!
Keep up the good work!
Haha I completed it and avoided the inevitable for now...
This screen made me laugh, good job!
I liked the feel of this game. The car was responsive but didn't fly out of control if I got heavy-handed on the controls, and it felt like you were nudging me back onto track a lot, in a helpful way that still left me feeling in control and not on rails or babysat.
When I collided into others, I also liked it! It's not realistic that I get away so easily while they go flying, but it worked really well within the game. The cops caused tension, but the failure states were easy-going enough that I felt comfortable taking huge risks, which was enjoyable freedom.
It felt a bit bare without sounds and could have used a little more development, but you did well designing the scope that you did tackle, and I enjoyed giving it a quick play.
Great job!
I agree with you, I wish I had more time to add sound effects and tweak the gameplay so it is actually possible to loose. But that would the game into the Jam category and I was aiming for Compo. That being said, I'm continuing development and slowly fixing all the issues and adding missing features into the game. I've already fixed the bug where the police "merges" into the player, the police AI, and many other things. If you'd like to check it out or even follow along, see the game's [Github repository](https://github.com/martindzejky/heist-game) or follow me on [Twitter](https://twitter.com/martindzejky).
There are some very nice gameplay-isms here; I especially appreciated that if I rammed a car sideways fast enough I could send them spinning in one hit. That and tricking police into hitting oncoming vehicles (tricky but doable!). Or just making them crash into eachother.
What would have been extra nice is something like knocking boxes off a delivery truck so the police crash into them, you know something more you can do beyond avoiding or wrecking them directly with your own car. Then by playing smart you could avoid losing precious money to unnecessary collisions.
Really good stuff!