Okay, so I decided to dive into making a simple “slime volleyball” game. You know, those super basic, bouncy physics games? I figured it would be a fun little project to mess around with.

First, I needed a game engine. I went with Godot Engine because it’s free, open-source, and I’ve dabbled with it before. Plus, the 2D physics seemed perfect for this kind of project. Downloaded it, installed it – usual stuff.
Setting Up the Scene
I created a new 2D scene in Godot. Then I needed some sprites. I’m no artist, so I just used some basic shapes. A circle for the slime, a rectangle for the net, and another big rectangle for the ground. Boom, instant minimalist art!
Adding the Physics
Next, I made these shapes into physics objects. I turned the slime circle into a RigidBody2D, so it could bounce around. The net and ground became StaticBody2D, so they wouldn’t move. I played around with the “bounce” property of the slime until it felt right – not too floaty, not too stiff.
- Made the slime a RigidBody2D.
- Made the net and ground StaticBody2D.
- Tweaked the bounce value. Fun stuff!
Coding the Movement
Now for some code! I attached a script to the slime. I used Godot’s built-in scripting language, GDScript, which is kinda like Python. I wanted simple left and right movement, and a jump. I used the *_action_pressed()
function to check for key presses, and then applied force to the slime’s body. It took some fiddling to get the movement speed and jump height just right.
I added a simple apply_central_impulse()
to make it jump and for horizontal movement some basic apply_force()
. I’m basically a coding wizard now.
Making it a “Game”
I added a ball (another RigidBody2D circle!). It just bounces around, and the slime can hit it. I put in a simple scoring system. If the ball hits the ground on one side, the other side gets a point. I displayed the score with a Label node. Super basic, but hey, it’s something!

The Frustrations
The physics were… wonky. Sometimes the slime would get stuck in the ground, or the ball would go flying off at crazy speeds. I spent a good chunk of time just tweaking values and trying to keep things relatively stable. Honestly, I might have pulled out a few hairs.
The Result
It’s… playable? It’s definitely not going to win any awards, but it’s a blobby, bouncy, slightly janky version of volleyball. It’s the kind of thing you’d play for five minutes and then forget about. But, I made it! And I learned a few things about Godot’s physics engine along the way. That’s the important thing I tell myself, anyways.
I guess the next step could be adding some AI, so you can play against the computer. Or maybe some power-ups? Who knows. For now, I’m calling it “done-ish.”