Since the last devlog there were 13 commits between 2019/04/09 and 2020/04/04, totaling 102 commits. I have worked 81 hours during this period, bringing the total to 291 hours.
Wow. Devlog for a year of work. Yes. So what happened? Mostly I was busy with other unrelated gamedev stuff. But it is cool stuff, that I will probably implement in this RPG too. I practically didn’t touch the RPG since June 2019 until March 2020.
Since the last devlog there were 33 commits between 2019/03/19 and 2019/04/09, totaling 89 commits. I have worked 68 hours during this period, bringing the total to 210 hours.
As I started adding more things to my test map, I decided to first improve the workflow and prepare for future development. Tiled supports external tilesets – standalone data files that can be re-used between different tilemaps. Phaser currently doesn’t support them though, and in general there’s no reason to include all of tilemap data in the game.
Since the last devlog there were 5 commits between 2019/03/08 and 2019/03/13, totaling 56 commits. I have worked 20 hours during this period, bringing the total to 142 hours. Yes, this devlog is released over a year late.
Playing fetch is fun, but lack of pathfinding turns minor obstacles into insurmountable ones. So I went down the rabbit hole studying how to implement one.
Tiled based games (which this is) often use a simple A* algorithm to search through the tiles.
Since the last devlog there were 17 commits between 2019/02/26 and 2019/03/06, totaling 51 commits. I have worked 39 hours during this period, bringing the total to 122 hours.
Shaders This time I took a bit of a rest and did something I was itching to try for weeks: shaders.
They are programs that handle the actual process of putting pixels on our screens. Most 2D engines abstract them away and there’s mostly no reason to touch the actual shaders.
Since the last devlog there were 13 commits between 2019/02/16 and 2019/02/22, totaling 34 commits. I have worked 35 hours during this period, bringing the total to 83 hours.
This one is entirely about messing with AI, iterating and refactoring the approach.
Initial Approach It started with basic xml Behavior Tree from the last devlog. First thing I did though, was updating Haxe to version 4 Release Candidate, in preparation to using inlined markup.
In the first developer log we talked about cheating and how the best way to prevent it, is making the server authoritative about the state of everything. That is what this log is about. Taking the custom simple physics engine we talked about in the second log, we are ready to start.
Server Loop So how do we go about moving everything to server? Client has basic game loop where it moves character around based on input.
This second log was supposed to be about making the server authoritative so we would prevent cheating. Authoritative server has to simulate physics while client does client-side prediction. The first step took a bit longer than expected and deserves its own log.
The previous naive implementation of our multiplayer platformer used Phaser’s Arcade Physics. Given new requirements, which will be further explained in the next log, we can’t use Arcade Physics and need to create our custom solution.
When I started preparations for my online multiplayer game attempt, I realized I will need to create Phaser externs for Haxe.
Haxe externs are a way for Haxe to know about types of methods and properties of external objects like Phaser.
Surprisingly generating them took me a week and not the expected hour or two. And they still aren’t perfect (and probably never will be).
Turns out that taking Phaser’s source and parsing the JSDoc using tools like js2hx isn’t good enough.
Motivation After finishing the project for my parents I was talking about last time, I finally had some time to get back to game development. After spending something over a month playing with unity engine, I decided to switch my focus back to something that got me to programming in the first place.
Multiplayer online games.
Back in high school, I implemented very naive multiplayer bomberman game as my school-leaving project.