Archive

Monthly Archives: January 2023

tldr: Pitch: A physics based (soft body) sim where you drag and fling a floppy cat, Angry Birds style, through a series of levels like Sonic.

Ideation Phase: I was thinking of something roguelike, but I’m worried I’d spend too much time endlessly tweaking the procedural generation stuff and not enough time making a shippable game. I would also like to be doing this in Rust, but since it’s too hard to throw things online and deploy to mobile, I’m thinking that Godot makes the most sense. Something simple and physics based with one-finger inputs would be satisfying and approachable by my friends and family. Perhaps Pikuniku meets JellyCar.

Development Stream:

Day 3 (Workday 1):

I spent a little too much time fiddling with verlet integration for the soft-body physics stuff. The simulation is unstable for reasons that aren’t clear and it also doesn’t really add to gameplay. It’s not a goal or even a mechanic — it’s a distraction.

Backing out, I think I’d like to use SmartShape2D with RigidBody physics, but it’s not available for Godot 4 yet, so I’ll probably do a tileset with some clever shapes. I think it might be better to have a simplified set of angles, too. It lets people predict their shots more easily.

Possible assistive features: slow down time and/or project the angles? Hmm.

Design Question: when a player drags on the cat, should the impulse applied always be central, or does it make sense to apply a torque when they grab off center? Or should there be a sweet spot where it’s “central torque” and everywhere else applies spin?

Workday 2:

First enemy in the game was “Psychophant”, the psychotic elephant. I added a component called “rb_damage” which listens for contacts between RigidBodies. I had originally used a CharacterBody because it made sense for something that was kinematic, but there wasn’t a good way to register impacts (with velocity) on the body. After a lot of futzing there was just no convincing way to get the impacts. The get_slide_collision on CharacterBody only returns the physics objects encountered along the path of movement, so if the player bonks an enemy from behind we don’t register a hit. I gave up and said that all enemies have to be RigidBodies, then I added a meme explosion sprite on death.

Workday 3:

I only had time to make a camera component which followed the player and the player’s direction of movement. At this point, I’m really avoiding making level geometry and more enemies because I neither want to use tilemap nor have to deal with converting Polygon2D maps to collision geometry. SmartShape2D is sadly not available for Godot 4 yet.

Workday 4:

I finally broke down and created levels. I spent a lot of time automatically generating collision shapes from polygons so that I can remove the debug rendering. Offsets were ruining what was otherwise a fairly straightforward creation of one collision polygon per polygon2d. Ultimately, I gave up and threw a warning when the polygon had nonzero offset.

Workday 5:

It looks like a game, at least. I added time slowing when the player taps, and it feels pretty good! However, a new problem has shown itself: Dragging the player adds an impulse, rather than explicitly setting linear velocity. This seemed like a nicer and more physics based way to do things. The problem is that when the player is in free-fall, applying a big force just brings the player to a standstill, rather than setting the linear velocity. This doesn’t feel really great, so I’m wondering if there are better choices. I could set linear velocity and let the player pivot in the air, but it’s mostly a matter of experimentation now.

Next Week:

I ended up setting the linear velocity if the angle was outside of some threshold. If you are travelling forward and slingshot floppy cat in the same direction, the velocities add. If you apply a linear velocity in the opposite direction, the velocity gets set. This feels pretty good, anecdotally.

I spent a while working on the title screen and level select. I’m starting to feel some hacks coming in from the UI because of how ‘main game’ is a standalone scene which does level loading. After the MainGame screen gets loaded, I don’t have a way of signaling from the level select screen that “Level 1” should be loaded, so instead I set a global variable “map to load” and then main game checks if it’s set, loads the level provided, and clears the value. Gross. Hacky. Functional.

And that leads us most of the way to a complete game. I have kill boxes to return the player to the last checkpoint, a ‘level complete’ marker at the end which will trigger the end of level sequence, and now all that remains is adding three more levels and doing a bunch of playtesting.

Final Week:

After hastily throwing together a bunch of levels and wiring up menus as best I could, the game is ready to ship, or at least “done sufficiently for the time provided”. It’s up and running on itch.io at https://xoana.itch.io/floppy-cat-saves-the-world . Making the last levels feel fun was a challenge, both because of the way that they were structured (using polygons) and because of viewport limitations in Godot itself. I found that I couldn’t scroll past +4000 in either direction, which, when your viewport is 1k by 1k, makes for a bit of a tricky cap. I think if I had to do it again I’d shrink the viewport significantly and do scaling. This would help with the texturing, too, as all of them ended up looking really tiny in the final shipped product. I also didn’t finish the ending cinematic or hidden ending in time, but I’m glad I got something out of the door.