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

Cool game!  Although one thing  to note: When a wall is half broken and you hit it, it restores.  I believe this is because you have it set in phases (fixed, half broken and destroyed), and when you hit it can deal 2 stages (critical hit I suppose?) and this resets the broken wall.  And pausing it doesn't stop the music, which is kinda wierd (but not a problem really). Otherwise awesome game!  

I was wondering one thing: I know you don't use vanilla JS but do you know how to flip a sprite in vanilla?  I'm a complete noob with this stuff so right now my character only faces the direction the spritesheet gave me....

EDIT: So long as we're posting high scores I got to lvl 6

(6 edits) (+1)

Thanks for the feedback! I'll have this bug squashed in version 0.0.2 : )

I'm glad you like the game.

a.d. question: Well, It depends on what you use for rendering in js - assuming canvas you just do this:

```
drawSprite(ctx, image, x, y, isFlipped) {
  ctx.save();
  ctx.translate(x + (isFlipped ? image.width : 0), y);
  ctx.scale(isFlipped ? -1 : 1, 1);
  ctx.drawImage(image, 0, 0);
  ctx.restore();
}
```
image has to be loaded already
x, y is where you want your top-left corner to be
note image.width added to position but only when the whole thing is flipped

Consider this one to understand how .translate and .scale work together and how the order of them matters (you don't need to understand transformation matrices to use it properly but experiment with .translate, .scale, and .rotate = shuffle them around and see what happens):

```
drawSprite(ctx, image, x, y, isFlipped) {
  var dirX = isFlipped ? -1 : 1;
  ctx.save();
  ctx.scale(dirX, 1);
  ctx.drawImage(image, dirX * (x + (isFlipped ? image.width : 0)), y);
  ctx.restore();
}
```

note that: `drawImage(x, y)` is basically the same as ` translate(x, y); drawImage(0, 0)`

Good luck!

Hm.   I do use canvas but my stupidity and overuse of stackoverflow basically leaves me with a bunch of unorganized spaghetti code, so I'll rewrite it with your tips.  Thanks for your help!

(+1)

Good luck!