Game Dev Diary: Tech Stack Final Decision

Game Dev Diary: Tech Stack Final Decision

By X-51 | Game Dev Diary | 27 May 2020


Since this was a pretty huge decision to make I had planned to give myself a few weeks to think it over fully, and work with both GDevelop and Phaser a little more before making that final leap.

It was a potentially tough decision really - picking between two very different solutions in an attempt to create the same final product - kind of like the choice between catching a plane or a train to go on holidays, where it isn't just about reaching the end, but is just as much about the journey.

 

But to be honest I think I had already mentally chosen GDevelop weeks ago. I really enjoyed the interface they provide between you and the code, and the map editor is mostly well done. I was also attracted to the fact it wasn't just coding, because that was a major stumbling block for me years ago with my hobby software - coding by day and coding by night got the better of me after a while.

Since I chose to make the Lovecraftian mystery game I also did not bother recreating my platformer level in Phaser. It would have felt like I was just going through the motions for the sake of it, and instead I just started creating the basic building blocks of my Lovecraftian mystery game in GDevelop.

I had 8-direction animations for idling and walking, a basic room map without any furniture, pathfinding & configurable blocking terrain, mouse-click movement, and some basic stuff ready for area transitions, all separated into reusable modules for a time when I would have more than a single map.

Not that the pathfinding and blocking terrain are really anything to be hugely proud of - GDevelop has these behaviours built in, I just had to tell the game what objects had which behaviour.

 

3255762ec5b3bd3f63912b46cd680a058d2429fa39287b2dfae2b489a740e608.png

 

The bright pink, green, and yellow objects are all just helpers that were only visible for debugging purposes.

 

But then I hit a snag.

 

I found a point in building my logic for interacting with doors where my typical way of coder's thinking wasn't going to work, and I would have to find another way around the problem. Normally this wouldn't be a big issue for me - I enjoy the problem-solving aspects of programming - but after a few days I hadn't made any progress on it. Sure I could have worked around needing openable doors, but then I would just be faced with the same problem again as soon as I wanted some other object to have player interaction trigger one possible animation of multiple, determined by the object's current state.

I started to consider that such issues were going to pop up more and more frequently as my game progressed, and would turn into semi-regular hindrances more than fun little challenges.

Another issue is that GDevelop's in-built pathfinding has some quirks to it that make me not like it so much in 8-direction mode (4-direction was fine), and without reducing the size of the calculation grid (which increases the processing needed to calculate the path) I would have had to write my own pathfinding, which kind of defeats the purpose of using a solution that already has pathfinding.

 

So I went back to Phaser to see how difficult it would be to integrate maps and tilesets from Tiled.

After a few hiccups I managed to figure out the problems I was having, and while there will be a little bit of friction I now know how to work around these problems in fairly easy ways - a combination of building my tilesets and maps with a 16px grid instead of 32px, and some minor modifications to my assets to duplicate certain elements with 8px vertical offsets (I could build the tilesets and maps at an 8px grid, but then it gets hard to see things in Tiled!).

 

So all things considered it took me about 6-8 hours yesterday to go from an empty Phaser project and some not-so-compatible tilesets, to having compatible tilesets, a working map of a room with furniture, plus having animations for 8-direction idling, walking, and running based on keyboard controls (pathfinding and mouse controls will happen another day).

Looking further into making doors and other openables today I realised I was doing a little something wrong again, but I've fixed that, and I now have fully functional openable doors (on mouse click for now), which are closed by default but can be set to default open with a property in Tiled. The majority of this code will also work for other interactive objects that have animations too.

 

6891abc098e25232923a2dad2ef86d709bede94f9fabace48064ff0ea5a86481.png

 

 

So Phaser it is!

 

As much as I liked GDevelop, as much as I would probably find a way around my issues with it eventually, and as much as either solution would still have some future challenges in store for me, Phaser feels like the one that will present the lesser amount of friction and will be how I build this game going forward.

My next steps are to have a go at pathfinding and mouse click control of the character. Once I have that I will add 8-direction interact animations (surprisingly easy to do in Phaser - I just need to work out the indexes in my sprite sheet), then modify my on-click door interactions to move the character to the object then play the character's and object's interact animations. All the while I will also try to make my code a little more modular so I keep things clean and organised moving forward.


X-51
X-51

Software developer, musician, photographer, traveler, crypto enthusiast


Game Dev Diary
Game Dev Diary

A place for me to document the processes, decisions, challenges, and struggles of creating a video game.

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.