Are we still doing warmup weekends?

I would like to create a speed run oriented platformer for this Ludum Dare, and because I didn't want to deal with physics, I decided to learn a game framework. As I make my games mostly in JavaScript, I went with Phaser 3. I imagined my first experience with the framework to be much smoother than it was, given its reputation.

However, the opposite happened. I spent stupid amount of times on simple stuff like:

  • First, I created sprites based on a 2d array to create a map. However, the collision with the player didn't work as expected. I spent a bit wondering what is wrong, until I found out I should have used actual tilemaps for that, as Phaser has them integrated. And sure enough, it worked very well.

  • Once I knew I should use actual tilemaps, I thought the rest would be easy. Well, there are (among others) two functions of tilemaps to set up collisions: setCollisionBetween(start, end) and setCollisionByExclusion(values). One would think that setCollisionBetween(1, 1000) and setCollisionByExclusion([]) will do the same thing (considering there are less than tile 1000 ids), and so said the docs. Well, two things worked differently in those two calls: first, an empty tile has id of -1, so setCollisionByExclusion([]) set up collisions with empty tiles. And second problem happened when you add a tile with a new id after setting up the collisions - if it has id between 1 and 1000, it will have collisions when you use setCollisionBetween(1, 1000), but it will not have collisions when you use setCollisionByExclusion([]). I was digging through the source code of Phaser endlessly until I realized how those function actually worked.

  • And finally, there are many errors among the lines of cannot read property 2 of undefined that were caused by completely different piece of code. The error messages with depth of call stack of size 10 where most function names are something like step but from 5 different contexts that say no relevat information can get frustrating, and I think proper exception throwing is definitely something the devs could work on.

  • Also, as it turns out, Phaser 3 is relatively new, so there was not enough learning content for it, as most of it is about Phaser 2, so that slowed down stuff a bit too.

There of course were many other problems along the way, but I am happy I had to overcome them now, rather than stress about them during the jam weekend.

Anyway, during the past days, I finished very basic platformer. It has player acceleration, animation, double jump, ghost replays, multiple levels, time measuring and coin system where you need all the coins to open the exit.

ld46_pre.gif

I think I have grasped the concepts and workflow to be able to create a nice little puzzle platformer for the jam.

And maybe, I will team up with my sister who is learning digital art and design.

But now, it is time for a bit of rest from game making so I am not exhausted before the jam even begins!

Good luck everyone and see you on the other side!