Playing with Phaser

This is a little web app I made when I wanted to try my hand at making games on the web! Here’s the sample application.

If you pick up green dots you move faster (with WASD), if you pick up red dots you shoot faster when you click and hold, and if you pick up blue dots you are slower. Picking up any dot changes your hue appropriately! This was interesting because to make the colors adjustable via number values I had to adhere to the 0-255 value range for RGB. Since I wanted to start as a white blob and work towards a darker hue as I picked up items, I had to start at r255/g255/b255 (white) and write a function that subtracted from the red and blue values when you pick up a green in order to make the white “more green” when actually it is just less blue and red. This applied to each color respectively, and generalizing it out was simple! In one iteration of this app’s development I made colors entirely random, but it felt directionless and without any real agency because the changes in the character’s blob were less noticeable over time. I digress! Have fun and come back when you want to clear your mind of clutter, I do this when I’m feeling overwhelmed; it’s nice to clear the board of dots, you can’t do it wrong!

A field of red, green, and blue dots with one larger slightly green dot located centrally
c

Posted

in

by

Tags: