dev-resources.site
for different kinds of informations.
Dev Log #15 - Collisions
Published at
11/22/2024
Categories
devjournal
gamedev
programming
learning
Author
Devtonian
Today I kept working on my gamified portfolio site with Phaser.js.
Progress
- I've started creating Scenes for the buildings' interiors. One challenge that immediately became apparent was how to make the player aware that they were close to the exit and could action it to leave the building. I've opted for creating an invisible rectangle and using tweens to animate the player's sprite color as a signal. It's neat and I can reuse the code for all buildings.
- Whereas previously I was using one unique tile for the Game scene's terrain, I've now randomised to create a more organic-looking landscape. As I'm using Math.random(), at each run the game will generate a different landscape.
- I've added the first NPC, although I'm struggling to make collisions work properly. I'm sure I will figure it out with enough time. Previously, when a player exited a building, they would be spawned in the same initial location. I've updated this so that they're now spawned in front of the building they're exiting.
- Code is quite messy at the moment, but I'm still trying to keep it as clean as possible. Refactoring will come later.
- Phaser's docs really need a do-over.
Life
- Leg day and some walking.
- Way too much coffee.
Other work
- CompTIA Project+ Anki flashcards. Preparing for this exam has taken much longer than I thought it would.
Articles
12 articles in total
Dev Log #15 - Collisions
currently reading
Dev Log #14 - Phaser.js and game dev
read article
Software Dev Diary #13 - Progress Report / Weekly wrap-up
read article
Software Dev Diary #12 - Progress (or lack thereof) Report
read article
Software Dev Diary #11 - Progress Report
read article
Software Dev Diary #10 - Progress Report
read article
Software Dev Diary #9 - Unexpectedly stable
read article
Software Dev Diary #8 - Giving Back
read article
Software Dev Diary - Progress Report
read article
Diary of a Software Developer #6 - End-of-week wrap-up
read article
Diary of Software Developer #5 - Learning Report
read article
Diary of a Software Developer #4 - The Long and Winding Data Trail
read article
Featured ones: