dev-resources.site
for different kinds of informations.
Dev Log #14 - Phaser.js and game dev
Published at
11/21/2024
Categories
programming
devjournal
phaser
gamedev
Author
antoniodev
Author
10 person written this
antoniodev
open
I've started working on a simple interactive version of my portfolio using Phaser.js.
Motivations
- I wanted to learn how to use a JS framework to build simple games, as I'm planning to make one of my own in the near future.
- I wanted to start learning some common patterns and best practices for game development (e.g., state management, event handling, creating an inventory system, etc.).
- I thought the idea of having a gamified version of my portfolio would be fun. Being fun is generally enough of a reason for me to do something.
- Making a game, however small, allows me to exercise those creative muscles that I often feel are atrophying in daily life. It allows me to practice those skills and passions that I find I have less and less time for: music, sound design, art.
- I'd like to experiment with the concept of micro-frontends and having two versions of my portfolio (standard and game-like) seemed an okay use case. I'm fully aware it's total overengineering and overcomplicating things, but the whole point of personal projects is to learn new concepts, skills and experiment.
Learning experience
- Some skills and patterns transfer nicely from "standard" programming to game development, whereas others are purely game specific.
- The Phaser docs are, in my opinion, not very user-friendly. In fact, I think they need a major overhaul. I checked them a few years ago for the first time and they haven't improved at all. On the other hand, this might be an opportunity to contribute, perhaps?
Progress so far
- Learned how to structure the game in different
Scenes
. Created a "Character Selection" and a "Town" scene. Working on adding scenes for buildings that can be entered. - Learned to how import, load and add assets, both custom (e.g., music, sound effects) and pre-made (e.g., textures)
- You can listen to some preview music on my SoundCloud
- Learned to extract spritesheet frames for animations
- Worked on object management and physics interactions (WIP)
Future plans
- Finish the game (smartarse...)
Jokes aside:
- Add custom music to each scene.
- Complete each scene.
- Add at least one NPC and some dialogue.
- Refactor, simplify and optimise code.
- Deploy in a way that it's compatible with the micro-frontends approach.
Sources
- Phaser.js docs
- Phaser.js forum (there is also an official Discord, but I haven't used that yet)
- StackOverflow (surprisingly, huh?)
- Claude.ai - to be used in moderation. The advantage is that it's a million times better than the official docs and it's obviously been trained on thousands of lines of game code out there.
phaser Article's
30 articles in total
Intro into Phaser.js
read article
Dev Log #14 - Phaser.js and game dev
currently reading
How I Won the JSM Programming Challenge
read article
Bundling your phaser.js game with esbuild
read article
Join Us in Developing Kingdoms Forgers: Lands and Lords!
read article
Stellar + PhaserJS: Building DApp Games on Stellar
read article
Running a Phaser Game on Mobile Devices
read article
Working with Scenes and Data in Phaser
read article
Using Phaser.js In Your React/Rails Webapp
read article
Phaser running within React + TypeScript
read article
The Way to Surpass CoolMathGames
read article
Creating an Ionic Vue + Phaser App
read article
Creating a TypeWriter Effect in Phaser.js v3
read article
React-Phaser
read article
Tutorial - Optimizing Memory Consumption in HTML5 Games
read article
Phaser+ Tutorials: Create new Phaser project in less than a minute
read article
Space Battleship (Multiplayer turn-based game)
read article
Introducing Gamezap
read article
Playing with ConfigCat's Feature Flags in a Phaser.io application
read article
Devlog - Zero to First Trailer
read article
ΒΏCΓ³mo crear un juego Play to Earn?
read article
Electron Adventures: Episode 71: CoffeeScript Phaser Game
read article
Phaser 4 is coming
read article
β£οΈThe Cute Weekend Guide to Phaser.jsπ»
read article
I built a game with Vite
read article
Enclave Phaser Template updated to Phaser 3.50
read article
GameDev Adventures in Lockdown: Part 1
read article
Making the Chrome dinosaur game with Phaser
read article
Game Jam Post Mortem - Supply Run
read article
JavaScript Fundamentals with Phaser 3
read article
Featured ones: