Tonight we were fortunate to have Andrew Smith join us to show us how to build games that run in your web browser with PhaserJS.
PhaserJS is a library optimized to run high performance games in desktop and mobile browsers. It provides a nice library that is game focused and game ready.
Andrew’s demonstration was building a Flappy Bird clone. Through the series of demos, we could see that PhaserJS gives you tools to display images or run animations of them (sprites and spritesheets) to make your main character look like it is flapping away. He detected spacebar presses to make the bird “flap”. Then he was able to easily detect if the game’s obstacles and your main bird character collided, so he could take action there (end the game) and show your score.
If you missed it, you can learn a lot about PhaserJS just by downloading the files for tonight’s course. Andrew used the Apache web server distributed in XAMMP and simply unzipped and placed these files right in the XAMMP web server folder. Then we ran the demos in the browser and explored the code.
Flappy Bird Tutorial Source (ZIP Format)
Andrew is the Director of Developer Education for AgeCheq. AgeCheq’s API helps developers comply with US federal standards for verifying the age of your users. This keeps you from running afoul of the Children’s Online Privacy Protection Act (COPPA). It’s something an aspiring mobile developer needs to think about, since everyday we see parents handing their cell phones right over to very young kids to play their favorite games. Your users on a device aren’t always the owners!