Getting Started

kotlin libgdx intellij tiled asesprite

The decision

Getting started on a massive project is not easy.

It's 50% excitement about your new idea. The thrill of starting a new codebase and laying down those first lines of code. You'll learn from all your previous mistakes. You'll do everything 10x better this time around. I think most programmers can relate to this feeling. You still remember that nostalgic feeling of the last game you released ten years ago in the game development club during college. You crave that feeling again. You're excited to see all the new game libraries, tooling, platforms to release on, the social media to share the journey on that wasn't around ten years ago.

The other 50% is the feeling of dread. When you open your workspace and see this:

50+ projects; at least ten started, but incomplete games. Of course is only a fraction of your projects because there are countless others on GitHub, previous computers, and external HDDs. So what makes you think this game is going to be any different? After all, this quest will consume your evenings and weekends for the next years to come. You have a full time job, a family, so this is going to take a toll. You better really love it.

There is the added stress of what language do you develop in? Of course you know that C++ is the ultimate way to go, but you're a pro in Java... and there is that nice framework called LibGDX that you've always wanted to try. Last but not least, there is that new and sexy JVM language Kotlin that you fell in love with last year and vowed to convert to. Do you bow to the will of the world? Or do you march to the beat of your own drum and decide that you're all-in Kotlin-for-life?

I'll let my Slack profile answer that.

In the end, as with any other large life decision, you just have to make a decision and own it. The worst that will happen is you will have some fun developing a game, and you may even learn something. Well, I guess worse things could happen, but I'll leave that for your imagination. Below I'll walk through my decisions at each step of the way, and how I got started.

Choosing Kotlin

I have always been a huge supporter Java and live and breath it everyday. That said, Java is evolving at a slow pace compared to the rest of the world. I had considered Scala, but for whatever reason it just didn't mesh with me. I know that's not a rational justification. :) I also considered C++ as it is the de-facto language of choice for game development. That said, it has been 7-8 years since I had really dug into C++ for game development, and even then I rolled all the tooling myself (map-editors, etc). So even if I chose C++ I will be re-learning all the tooling from scratch. This is not a bad thing if my objective is to regain a mastery of game development in C++. However, I feared that the more barriers that stand in front of me, the lower my probability of success will be. It doesn't help that I don't find C++ programming particularly fun nowadays. While I may have enjoyed x86 assembly 12 years ago, I would likely not choose it for most projects now.

It was my workmate Andrew White (aka the White Wizard) who introduced me to Kotlin last year. It struck the (almost) perfect balance between Java and Scala. I will not go off on a ten page essay depicting why I love Kotlin so much, but instead will encourage people to go check it out.

Of course building a game on the JVM leaves certain questions unanswered like "What if I want to release on Playstation?", but should I really be worrying about this right now? I'm not a professional game developer. I have never build a game of any size that is worthy of being released on such a platform. So I forced myself to erase that concern from my mind.

In the end my desire to build something within the LibGDX framework, the amazing IntelliJ IDE, the massive amount of existing tools and libraries from the Java community, and my back-of-hand knowledge of the ecosystem led me to just "follow my heart" and start building in Kotlin.

This is a hobby project, not a professional project with specific requirements. If I take all the fun away I can't really call it a hobby. :)

Choosing my Toolset

After choosing Kotlin most of my other toolset was already decided for me. The most promising Java game framework is LibGDX. The best IDE is IntelliJ, who's team is also the creator of Kotlin, so it has native and first-class Kotlin support. LibGDX has native libraries for reading and rendering maps generated by the Tiled map editor. So most of the hard decisions end there.

My next challenge was to figure out what kind of graphics/style I wanted to support. I'm not a graphic's expert, but still want to make the graphics myself. I am very influenced by people like Thomas Happ who single handedly built Axiom Verge, which I consider a masterpiece. Also being a huge fan of retro games and Metroidvania style play, I chose to follow the path of making a retro game. Of course this has the huge advantage that the graphics are relatively "easy" to make. I say easy meaning they are easier than building 3D models with meshes and textures. Being my first attempt at a full-release video game, again, the theme of not creating too many barriers for myself rules king. For my previous games I always used Microsoft Paint for my sprite editing. I know, super high-tech stuff. In the spirit of simplicity and via the collective intelligence of the internet I landed on AseSprite as my sprite editing tool of choice.

Just for good measure, I popped it open and took a shot at rendering what Ninja Turdle may actually look like and this is what I came up with.

While Leonardo de Vinci would likely not be impressed, I definitely was pretty happy. It was with this single sprite, that all sprites would follow.

With my tool set, a rough idea in mind, I set out to start the planning, designing, coding, of Ninja Turdle.

The next series of posts will be about the actual details of how I go from start to finish developing Ninja Turdle.