I can't believe I made this game (post-release devlog)


This game was a pretty tough journey for me. I knew making a boss rush would be “in my wheelhouse” as far as gamedev went, so I wanted to push myself in a bunch of other ways to keep this jam challenging. So, I decided to make my first 3D game ever. Unfortunately, since I don’t use Unity or Godot, this ended up being a bit of a trip.

I wrote a 3D renderer!

I really didn’t want to switch to a big engine for this game. I knew I wanted to do something 3D, likely top-down (Tunic/Death’s Door style), and that I needed skeletal animation.

So to start, I opened up g3d by Groverburger to see: Is 3D even possible in Love2D? Then, after playing around with spheres and cubes in the OBJ file format, I knew I’d need actual skeletal animation.

So, I opened up Khronos’s GLTF tutorial and started writing a GLTF model reader. Actually, first I did like 3 days of mental gymnastics, trying to see if I could hack animation into the OBJ file format. Do I really need to write a skinned skeletal mesh renderer? Can’t I just, like, make 3D sprites or something and swap between models really fast? (no, I could not)

GLTF is neat!

I’ve got some work experience with the GLTF file format, so writing a GLTF reader wasn’t too difficult. The format is really elegant: GLTF is human-readable JSON. Everything is contained in these big buffers, and buffers are referenced using “bufferviews”, and bufferviews are referenced using indices. So your GLTF file might say “WEIGHTS: 0” meaning the info for accessing all the joint weights data is in the 0th bufferview, and the 0th bufferview might say the actual data is in the 3rd buffer, etc etc.

The real challenge was getting skinned-mesh animation to work.

I stared at this page for like 2 nights straight

This page really humbled me. In retrospect, now that I understand how it works, it feels so intuitive. But at the time, I saw the word “inverseBindMatrix” and immediately thought: “how hard is it to learn Godot?” lmao.

In the end, it’s actually kind of intuitive! I won’t go too deep into it, but I’m glad I took the time to learn how this works.

I did some cool optimizations

Originally, the game was unplayable in a browser on my laptop. This is because all of my bone-transform computation code was done every frame in Lua, and I don’t think LuaJIT works in the browser, so it ended up being insanely slow.

My optimization here was: Pre-compute all transforms of all bones for all animations for all frames (at 60 fps) at load time, and put this all into a big table.

Then, when animation occurs, I just use the current animation time (floored) as an index into the above table to lookup the current bone’s transform for the current animation.

The above made the load times a little long, but made the game run super fast even on my laptop in the browser. My usual bar for performance is: It must be playable on my laptop in the browser with 4x throttling in chrome’s dev tools, and this game totally cleared that bar.

I have no chill and I must crunch

I literally cannot stop myself from crunching. I use a time tracker to track my gamedev time: I spent roughly 75 hours working on this game over the past month. This was basically a part-time job this past month on top of my full-time job.

I had an absolute blast working on this, but I tend to get a little obsessed. My fiance would frequently wake up to me furiously typing on my phone at 2 am because I’d just had a musical idea. Roughly a week before the jam ended, I remember feeling genuine anxiety because the music was just not working.

Before I’d figured out 3D animation, I had a weird issue where every animation was just slightly off. I’d angrily pace around my kitchen convinced I’d never figure it out. I remember saying something like “I’m taking this to my grave, this problem will follow me for the rest of my life”. I figured out the issue exactly 1 hot shower later.

I feel like I need to develop a healthier relationship with game jamming.

I have a bunch of other thoughts, but those are for after the jam

During this jam, I learned a lot about my own skill levels, perceived and otherwise. I thought the music would be easy as usual, but I really struggled with it this time. I thought 3D modeling would kick my ass, but it was actually really intuitive, possibly due to all my art grinding outside of gamedev.

There’s something to be said about the advice of ‘making lots of small games’ as a gamedev improvement strategy. I feel like focused practice is often left out of this process. This jam really exposed a bunch of my weaknesses, and also highlighted some burgeoning strengths.

I’ll write some more stuff after this jam

I want to talk about my boss design strategy as well as my overall gamedev strategy. I’ll also play a bunch of jam games and shout out my favorites.

Until then, thanks for reading this!

Abhi

Get BATTLESC4RS

Comments

Log in with itch.io to leave a comment.

Man, what an amazing job you did on this game, that GLTFloader is excellent, I wonder if you intend to license this code?

(1 edit)

Thanks! If I get time, I can probably release the GLTF reader code on github, though it’s not very clean / re-usable. If I end up releasing it, I’ll let you know!

(+1)

Amazing ! You're insane and bold with this 3D code you've done. I wonder why not making fake 3D like in the old days of 8bits computer ?

It's great also to get some such insight of dev process, as game dev myself, it's good to know how others do their games.

To conclude, I believe you would have lost a great deal of time with Godot, because the usual drawback of these engines is always it make thing complicated easy, but easy thing complicated. For instance, adjusting container sizes for UI took more time than just coding a (not so) basic game at all.

I agree, I think the overhead to picking up an engine and learning all of the simple things is often way longer than I expect. Writing things from the ground up has felt more intuitive to me so far.

Glad you liked the post! I remember UI being something that always gave me a headache back when I used Unity (I haven’t tried Godot much), so I feel your pain.