Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Panspermia dev log/postmortem

A topic by Ske created Jan 15, 2016 Views: 1,295
Viewing posts 1 to 1
Submitted(+1)

Right. I've been meaning to dev log a lot, but I... kinda forgot about it. I did make a ton of Twitter noise, though. My game is pretty much done right now, only a couple bugs left to iron out. As you might know, my game is about a space sperm invading alien vaginas to spread life. Fits the theme, right? (Xoppa said I'd get bonus points, I'll hold him up on that). I made it using libGDX (duh), and Kotlin.

I wrote the game as a mix of a normal ECS and some event-driven stuff. Instead of doing things directly, the code fires events. For example, to damage something, it fires "DamageE". A Damage system picks up on that and subtracts health. A Knockback system picks up on that and moves the target a little back. A SoundOnDamage system picks up on that and plays a sound. You get the gist. I also used singletons EVERYWHERE. I blame Kotlin for that.

Things that were hard

  • Shaders. Shaders are hard. I had to make it switch the hue shift shader back and forth constantly, as well as render to an FBO, then saturation/value shift that onto the main screen. Shaders are hard.
  • Getting all the systems to co-operate. Especially collision and death. Death is a weird mishmash of "this thing hits that, that deals damage, that removes this thing but doesn't kill it cause that would make it drop and hit something else, infinite loop, crash the game, also we add things to a list and clear it all the time so box2d doesn't segfault". Collision was a little easier, I made a custom contact filter that integrated into the ECS. Still a mess though.

Things I'm happy with

  • The general code layout. It's so pwetty, albeit a little messy. Go check it out! https://github.com/xSke/Panspermia
  • Level generation. I used basic cellular automata cave generation, sprinkled some scenery throughout, and called it a day. It hasn't changed since the first couple of days.
  • My assets. They're fairly standard shitty pixel art, but they're mine and I love them <3
  • The game in general.

Things I'm unhappy with

  • Like I mentioned above, how the systems co-operate. Mess.
  • The EntityCreator class. It's a 400 line monster that creates entities in the most confusing, copy/paste-y way possible. I could probably clean that up, but there's no real point seeing as there are two days left of the jam and I'm not gonna add any more entities. Maybe one day I'll make a flat class hierarchy or something.
  • The level generation code. It's also a huge mess. The levels it makes are fine, but the code sucks. Notice a common theme here?
  • Kotlin. Everyone says it's awesome. I agree. However, the little things are starting to piss me off. From sub-par IDE support to protected fields with getters/setters not working right, and crashing at runtime. For my next game, I'll probably use standard Java, maybe some Lombok. Scala?

I think that's about all I can think of to write at the moment. I might edit this post if I can think of anything else.

Play the game! http://ske.itch.io/panspermia
Rate the game! http://itch.io/jam/libgdxjam/rate/50237
Read the game! https://github.com/xSke/Panspermia