Web developer exploring Game development 🎮

How I got my hands wet into hobbyist game development as a web developer.

Ze Xuan
6 min readJul 13, 2020

After graduating from university, I’ve been doing web development primarily for a while now and I was thinking of trying out something new, and of a different domain. Web development has become too comfortable for me and I felt it’s time I stretch my brain noodles again with something fresh.

Why game development

When playing games, I sometimes like to think of how the game is implemented technically by thinking in the game developer’s shoes. There’s a lot to appreciate in the complexity of how the components and systems of a game are built in order to support a narrative that the developers and designers want to tell the player.

This is not too different from developing web applications, for both, the developers are trying their best to predict and anticipate the user/player’s intended actions and to provide/simulate an intended outcome. Just like pressing a button to make a payment; pressing a button to make the character jump. They both can be abstracted into simple state machines.

One thing that’s different from using web applications, is that games require handling of very reactive input from the player, meaning that most games need to be able to manage multiple inputs/actions from the player at any time, such as using the mouse and keyboard or a controller to move a character in multiple directions at once.

This was quite interesting to me and I wanted to see how I could bring some of such ‘interactivity’ to other software domains.

Game Development Engines

The first step I did was look into what was game development tools are available, hopefully at a low cost of free.

JS Game Development

Tons of web games are built with HTML5 nowadays and it’s proven to be a very capable engine to run games with. Being familiar with JavaScript, I thought to explore game development tools within the JS space, and found a couple of libraries I could use:

I went with trying PixiJS as a start, as it’s more of a 2D graphics library than a game development tool whereas the others are more opinionated and specialized. It seems to be a popular tool that devs use, even outside of game development, mainly for efficiently graphics manipulation.

I found this beginner game dev tutorial by Potch, and followed it using a hosted project on Glitch. While going through the tutorial, I quickly realized the limitations of just using PixiJS as a game engine. PixiJS only provides the graphics manipulation part of a game; everything else like the game engine, data processing, etc. has to be setup and built separately.

This would be fine for someone who has some fundamental knowledge of game engines and stuff but not suitable for me, especially without having any knowledge of game design and development.

Other Game Development Engines

So, I started to look for all-rounded game development IDEs/engines instead. Most of which I found were actually designed for non-programmers in mind, notably the Unity engine where the system is built for users who do not need to know C# and still be able to build a full game. Similar ones are like Gamemaker, etc.

Others were full-fledged engines that were too steep for me to step in as a beginner, like the Unreal engine.

I then googled for game development engines for developers and I came across this Reddit post, which recommended Godot as a really good candidate for what I was looking for.

Bingo, Godot

Godot is a game engine/library that pretty much checks the boxes for what I needed. It uses GDScript, a language that is very similar to Python and feels almost just right at home for me. There were also plenty of tutorials that are targeted towards intermediate programmers like myself, and the IDE doesn’t feel too restrictive in what you can write.

Hello World of Game Development

I mainly followed Godot’s documentation which steps me through how to setup my first ‘game’, how to use the IDE effectively and how to write game logic. It was adequate to teach someone how to create a very simple, single-screen game from scratch, but doesn’t cover enough to build something more complicated.

I just randomly found some assets, mostly from itch.io and just slapped it all together. I feel like the ‘hello world’ of games are basically platformers, so that’s kinda what I started to build.

Learning how to load in different assets and placing them altogether in a game ‘scene’, then programming a character to move on screen and jump took a while for me to figure out, but once I did, this was what I ended up with:

Seeing the lil’ dinosaur guy move around, jumping and shooting rocks of varying speeds felt pretty good, and I was glad to see how everything turned out in this ‘playground’ I made.

It was mostly just throwaway code, kludged together to just experiment and try out different stuff, but once I was done playing around (with my code) I wanted to start something proper.

Next Proper Game

There were many questions in my head like the correct code architecture to use for different types of games, and the ‘correct’ way to code logic for different Non-player Characters and objects and stuff which I felt were answered in Godot’s guide.

Luckily, I found this game development tutorial series by HeartBeast on YouTube, and I was so surprised that every question I had in my mind was answered in each video of his series. I really appreciate how he doesn’t just throw you all the answers right away, but walks you through how a beginner (like me) would think about the problem and how I would solve it, then show the limitations of the solutions and provide a better solution instead.

This was what I ended up with, a 2D game with a top-down perspective, with basic ‘interactions’ with the NPCs and a simple dialogue system.

I realized that after building up the basic skeleton of the game, I’m now experiencing what I term a ‘game-dev block’, like a writer’s block. Aimlessly building systems after systems would be cool, but wouldn’t be satisfying and won’t be sustainable (for my motivation).

What now?

So, the next step for me is to figure out what narrative I want to tell through my game, basically writing up a simple story to tell, with what characters I want to showcase and what elements I would need to build to tell the narrative. With these ideas in mind, I will then continue with another log for this game dev :D

I do encourage developers who want to try something new to give this a try too, there’s a ton of resources out there that’s suitable for intermediate developers to quickly dive into. Happy building!

--

--

Ze Xuan
Ze Xuan

No responses yet