Lost And Found
Mon, Apr 19, 2021
Day 9 - Custom collisions May 02, 2021
Many days of Google-ing later I conclude that there doesn't seem to be a built in way to specify custom bounds on Sprites. Oh well. I made my own Resource.intersects function that tests intersection on all of that its defined rectangle bounds.


Day 8 - One more tree April 28, 2021
I saw a pretty cherry blossom (?) tree across the street so I made it into pixels.

Day 7 - Decorations April 28, 2021
Started making a new Decorations class, which is similar to the Resource class but cannot be harvested.

Day 6 - Housekeeping April 26, 2021
- Discovered that there's a difference between Phaser.Game and Phaser.Scene
- Read some tutorials:
- Phaser 3 HTML5 Title Screen Tutorial, Patchesoft
- How Do I Organise Files in A Phaser.js Project?, Gary Cheetham
- Subclassed Phaser.GameObjects.Sprite to make a "Resource" class (to be renamed?) for trees, bushes, rocks, etc. that will be harvest-able.
- When you delete a texture in a Scene, Phaser tries to compensate with other textures and it looks funny.

Day 5 - More pixels April 23, 2021
More trees and bushes! And some grass! And a new cat! And scaled down and recoloured the original tree and bush to match!

Day 4 - Random trees and bushes April 21, 2021
Tossed in a for loop to make tree and bushes randomly placed on the canvas.

Day 3 - You can walk behind things April 19, 2021
- Don't walk outside the canvas and disappear
- When you walk "behind" something, place the player sprite behind the tree/bush image
- Everything now has to have a depth value. (Everything was defaulted to 0).
- Depth is just the bottom y-value (in world space) of the tree/bush/player. If the bottom of a thing is lower than the bottom of another thing, the first thing should display on top.
- Make bushes/trees go transparent is the player is behind them.
- Inspired by how you walk behind objects in Cozy Grove. Loving that game so far.
- Currently using Phaser.Geom.Intersects.RectangleToRectangle to see if a tree's bounds and the player's bounds intersect. This isn't great because the game might think the player and a tree is intersecting (because of their images' rectangular bounds) while they are not visually intersecting.
- Maybe each different object can have some defined bounds that is more visually representative.

Day 2 - You can walk around April 18, 2021
It's a new day and it's time to toss something into my little game world. Except... I've got no assets. However! I do have a husband, so I got him to draw a bush and a tree in Procreate for me. He made a big fuss about not being an artist before producing me these fantastic plants. Something about getting people who don't ever draw to draw something gives me life.


I took them into Krita and traced over them and made them pixel-y because I don't want to deal with partial opacity issues. I also threw a block-y cat sprite together to use as the player.
It was actually kind of difficult to just toss something onto the canvas. It seems like everyone who uses Phaser uses its physics system. And somehow by wanting to make my game more simple I've made it more complicated because I can't find any tutorials.
Oh well. So it goes. After some experimentation I was able to hard code in some trees and bushes onto the canvas and create a player sprite that takes your arrow key inputs to move around.

Day 1 - Starting things up April 17, 2021
Every once in a while I try to make a game and I rarely make it very far. I think I do learn a bunch of things in the process, so let's try again anyway! I'll be using this blog post as a rolling brain dump of progress, ideas, etc.
I've been feeling very stuck lately. I think it's because I corner myself into a situation where I'm trying to really maximize the situation, and I end up being very frustrated because how do you even know which option will give you the most value without trying anything? I am trying to apply a "remove barriers to entry" philosophy these situations. I always find the hardest part of any project is to start. Where do I begin? What framework do I use? I told myself to just go with something I'm already familiar with to make it easier to start. I've been doing a lot of web, and a quick Google search told me that Phaser common web game framework. And no, I won't be asking if it's the best one. Phaser it is.
I started up a new repo, installed Phaser, and called it a day.
Tagged With: phaser