Hi everyone!
For the last 2 years I've been making a Game Boy Advance game in Nim with a friend on the weekends.
Yesterday we launched a Kickstarter campaign along with a demo which you can play now (in your browser, in an emulator of your choice or on a real GBA)!
The demo is basically "Chapter Zero" - it's about 40 minutes long and has no spoilers for the final game. We've really poured our hearts into this and hope you enjoy it!
For the full game we're partnering with First Press Games who will be producing physical copies of the game for GBA and Switch, but we're also offering digital versions including PC.
Needless to say we've been absolutely blown away by the positive response - we were funded in less than 8 hours and had to ask our publisher for more carts!
We're expecting the full game to be in development for another year or so (and the PC and Switch ports will take a bit longer) but in the meantime, check it out and let us know what you think.
I'm off to bed now, but happy to answer any questions about the project and its development when I wake up!
Huh, I didn't even notice the Kickstarter page has a link to a demo. Either I'm blind or it might be a good idea to modify the banner image to include the words "Click Here to Play Free Demo!" :)
I bought it anyway, but the demo has blown me away even more. Really amazing work putting this together! You deserve all the success you're getting, already way past your goal!
Sorry for the delay, I've had a lot on my plate!
Our Nim GBA library is called Natu, which includes bindings for various C/asm libraries such as:
We're currently using the devkitARM cross compiler toolchain (though plain old GNU Arm Embedded GCC can work fine too, so we'll probably switch to that in the future).
The library itself started as a straight-up C wrapper, but has become more idiomatic since then (more type safe, better naming, using sets instead of ORing together constants, etc.). I'm still trying to clean it up and make it more usable for others, when I can. While a bit outdated already, you can check out my NimConf talk from last year if you'd like to see it in action. :)
Natu works with both --gc:none and --gc:arc, though arc didn't exist when I started working on Goodboy Galaxy, but I've had success with it for other small projects. Right now everything in the game is on the stack or statically allocated, which is nice for performance.
While building the game we implemented many of the systems described in Game Boy Advance Resource Management, such as a tile engine and Obj (sprite) VRAM allocator. This article is absolute gold, I don't know where I'd be without it!
For level design we use Tiled. But we can't just parse the XML files at runtime - custom tooling is needed. We devised a level format (in Nim types), and wrote a tool which takes the levels, processes and converts all the maps, tileset graphics etc. and spits out C code and Nim code, allowing that data to be used in the game. Earlier this year I discovered Nim's stdtmpl filter which makes this kind of codegen much more pleasant, so I've started using that where I can.
One aspect of the game I'm really happy with is the dialogue and cutscene system. I really wanted some sort of coroutines so that I could sequence a cutscene using simple procedural code:
player.runLeft()
wait 120 # give control back to the main thread
# then resume from here in 2 seconds.
player.stopRunning()
say chMaxwell, "Oh... Heck." # show a speech box.
To achieve this initially I made by own hacked-together version of 'CPS' - a macro that splits a block of code into a chain of functions. It was ok at first, but ended up being a buggy nightmare to maintain. Then, by chance a member of the GBAdev community went and implemented context switching for the GBA, which allowed me to adapt Zevv's nimcoro to get true Lua-style coroutines. After getting this working, I never looked back. it's perfect!
Oh yeah, I guess I should mention some pain points:
That said, if you sent me back in time by 2 years I would absolutely choose Nim for this project again! It's a joy to work with and I can't think of any other language I'd rather be using today.
Oh yeah, I guess I should mention some pain points [...]
Thanks for the feedback. It's good to see just the known complaints -- all points that you raised are being worked on and will be resolved. Eventually. :-)
Hello,
Do you plan to use "nim" for the PC and Switch versions? for the enhanced port?
This looks really good and inspirational. Congratulations on your success (didn't know there was such a demand for GBA games). Hope you share more of your insights into how to make games on limited hardware in the future.
Also, didn't know the exportc/importc trick.
Of course, others think it should be:
But these don't change how bigger programs can be structured and so are considered less important by me.
Hey folks, I figured I'd bump this as it's the final day of the Kickstarter.
We hit 1000% of our original funding goal, which feels unreal. I'm really hopeful we can reach our final stretch goal for an animated music video!
The demo is now available in Brazilian Portuguese (which was widely requested, turns out there's a big retro scene in Brazil), and also Arabic which was a fun challenge! We're considering other languages for the final game but don't know for certain yet.
In last couple of weeks we arranged more goodies for backers - box protectors & charm straps for physical copies of the game and a free digital Demo OST for everyone.
There's also plushies available as add-ons if that's something that floats your boat.
Thanks so much for your interest and support, it really means the world to me <3