Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

I don't think renderStats() is working for me. Every time I take damage or pick up coins the stats doesn't get re-rendered

I fixed it. I just ended up putting renderStats when I take the damage because it was only calling every time I pick up the coins

Nice work, glad you got it working! The renderStats function must be called every time you update the stats.

Unreleated question but do you have hints/tips on how to get damage numbers to appear on screen like shown in Asterogue? 

Yes what you can do is create a new div on the same position, similar to the way the ghost is created.

You should make sure you have a blank tile in the tilemap and assign it to the space character like “ “. Then you can create the empty sprite and put a number inside it:

const number = createJuiceSprite([p._x, p._y], " ", "float-up");
number.innerHTML = "23";

That should create a number 23 which floats up and then disappears.