A turn-based car "game" for the Autumn Lisp Game Jam


Once again, I participated in the seasonal Lisp Game Jam, organized by David Thompson and Technomancy. You can check the result here (playable in your browser), but since it isn't exactly mind-blowing I wanted to share some additional thoughts.

The idea

My idea was to make a turn-based racing game. There are things such as "vector racing" (which I loved doing in class), and there are games for this such as this but as far as I know there isn't games like this with some "realist" car physics.

My result can't really claim to be that: I struggled a lot with the car physics, but I guess it was a learning experience. In the end I managed to have some basics "bicycle model" car, but no drifting or anything fancy :(

Screenshot from the game.

Another struggle was finding a way to control the inputs: my initial attempt was to have something looking more like vector racing, but I couldn't manage to have a version that was both working and intuitive. Which is why I defaulted to the "controller" in the bottom right corner, where you enter the acceleration/braking and steering on a square grid.

I thought about showing a steering wheel and pedals and letting the player click on them but I was sceptical it would be that good and anyway I had no time.

Screenshot from the game

In the end I'm not sure it's a great idea for a racing game: I set the duration of a "turn" to one second, which makes it quite difficult to control. Reducing it improved things but it also made playing a bit tedious. So, probably not a great potential for racing games.

However I think it might be more interesting to develop in a more "RPG" fashion, where you could eg shoot at enemies or whatever. Maybe I'll try to explore that in the future.

Misc learnings

  • This is my second toy project using Guile Hoot, and I mut say I'm quite impressed by it. Even though I I feel in some way I was a bit tricked into doing some javascript... I love the size of the final wasm file (less than a megabyte), in a world where a single hello world can quicly trigger a ton of bloat. Il I compare it to the equivalent export from a Godot project or a Renpy one, it is quite mind-blowing.
  • The problem with coding a car game in Lisp is that it is tempting to name some variables "car", which can lead to some pain at some point (for people foreign to lisp, "car" is quite an important function that gives the first element of a list).
  • Collision detection is hard, but a nice way to get the distance bewteen a point P and a line AB is to use the wedge product AB ∧ AP / |AB|. Pretty sure I saw this in high school a looong time ago, but a refresher was needed.
  • The function "atan2" is pretty cool to get the exact angle of a vector, but I didn't find it in Guile? I still could use Javascript's one, though.
  • At some point I hesitated between keeping the game car-related, or to make-it in space. In some ways, spaceship physics might have been simpler, until I thought about relativity and things like that. I discovered the game Velocity Raptor that uses such features, and it is pretty cool.
  • This kind of jam where you can't really use a game engine such as Godot, and my approach of not using a lot of libraries, makes it a very different experience to other gamedev project. While it brings a ton of difficulty (you realize the blessing of having a physics engine with not only collision detection but also rigid body simulation and so on when you can't rely on it), it's pretty cool to have to struggle with all this once in a time to know how this stuff actually works under the hood.
  • In a nutshell: math and physics are dope, but also very hard! So, unfortunately, is drifting...

Files

game.zip Play in browser
2 days ago
rallisp.tar.gz 311 kB
2 days ago

Get Rallisp

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.