Building a Topdown Shooter for Trijam in Godot


Building for Trijam with Godot

I am pretty new to Godot and this was the first time I attempted a 3h game jam with it. I did a lot of planning before the Jam to make sure I was organized and familiarized myself with the Godot features I wanted to use. In particular the tile maps.

I can say this if you want to finish a game in 3 hours PLAN and I feel that really applies to games you want to finish in 6 months too. The tight deadline really does push that idea home hard.

I want to talk specifically to the Godot features I used and approximately how much time it took/saved.

Art

Being a dev on our team I searched for some art packs I could use that were at least reasonably compatible. It is a 3h jam so I figured there would be some understanding.

The art came from these 4 sets.

Tilemap in godot.

Godot has an impressive tilemap. The downside to such a feature rich tilemap is there is a lot to learn to access all it’s features.

In particular the three features that really made this a lot faster were the Terrains, Physics and the Y Sorting.

The terrains made it a lot faster to paint huge areas of the map then drill down. I never had to place individual tiles except for tree’s and items I wanted to control but to main areas were all drawn using the Terrains and that saved me a lot of time.

Having the physics backed into the tiles really saved a lot of time. Especially since I could modify those after paining and the Tilemap adopted the changes so mistakes could be fixed across the whole map. Also being able to create two more the one physics layer meant I could block walking and shooting separately without having to redraw the map.

YSorting didn’t help specifically with the Tilemap but the fact it mixes it’s Ysorting into the same behavior as the rest of the game saved a great deal of code I would normally have had to do to make the depth work.

In the end setting up the Tilesheet and creating the full Tilemap took about 40m. It’s a fair chunk of time out of 3 hours but still really fast.

Animated Sprite

Being able to use the animated sprite and just take in the sheets created by artists is extremely fast and easy to do. It was the first time I had worked with the sheet import facility and I will certainly use it more in future.

Importing the sprites took less then 20min the sprites and the Tilemap were all done in the first hour.

CharacterBody2D

I used character body 2D for the Glob it’s so effortless it feels like you cheating. The full character code for shooting picking up moving, shrinking and growing was only 104 lines and that will the double line breaks between functions. I remain impressed how tightly aligned Godot’s tools are with the most common things you will want to do.

RigidBody2D

This was used for the Mobs and the Spit the character shoots out. I was really worried that making so many items on the screen RigidBody2D was going to have a huge cost to performance. It didn’t turn out to be an issue (at least not on my machine so far). I really abused this feature tracking up to 10 touch points for mobs so I could damage the player. The mob code is 48 lines the Spit was 35. Not a lot of code at all for all the behavior they have.

Area2D and AnimationPlayer

I used Area2D for the collectables and an AnimationPlayer to make them spin. I would typically code the spin but I have been trying to use the built in tools more. The collectable code was 18 lines in total.

GPUParticles2D

These are used to create the trail behind the spit and the spit’s explode. I find the particle system really easy to use and get to do more or less what I imagine in my head. The one thing I would wish for on On shots is a delete when done flag. I had to write a script to do that of 8 lines or the idle particles just accumulate. Of course in a large game they should be put aside and reused but that’s not always practical.

If I have more time there would have been a lot more particles to juice up the game.

Control and game control scripts.

The UI in Godot is very simple to use and I find the Theme system such a boon. Not that there was much UI just a menu gameover and score. But it just works as expected.

I should have (time willing) added an AnimationPlayer to those to add more juice to the UI experience.

The game code

The single game controller class was 108 lines of code. All 205 lines of code was done in 1h 45m hours. Of course there was some deleting and reworking along the way but most of the game engine features worked as expected.

That left me with 15min to play test and try balance the game. I can tell you it was not enough time. I would have wanted to tweak the spawning logic to create more balance to the play experience. But testing and iterating that takes a lot of time.

Lastly building the outputs in Godot is unbelievably fast for Web and PC.

All in all I think Godot is very suitable for short game development times like 3 hours or even 48.

Thanks for taking the time to read about my experience.

Files

Gluttonous Glob Play in browser
Jun 16, 2024
GG.zip 24 MB
Jun 16, 2024

Get Gluttonous Glob

Leave a comment

Log in with itch.io to leave a comment.