diff --git a/README.md b/README.md index 28869f7..0ee4284 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,7 @@ Twin-stick shooter -**Note:** This game is in pre-alpha state. Here be dragons. - -This game was created during the [2021 Vampire Themed Game Jam](https://itch.io/jam/vampire-themed-game-jam-october-2021). +This game was created for the [2021 Vampire Themed Game Jam](https://itch.io/jam/vampire-themed-game-jam-october-2021). ## Play @@ -13,10 +11,16 @@ Playing with a gamepad is recommended. ### Browser -[**Click here to play Carotid Artillery**](https://rocketnine.itch.io/carotid-artillery) +[**Play in your browser**](https://rocketnine.itch.io/carotid-artillery) ### Desktop +#### Download + +[**Download for Windows and Linux**](https://rocketnine.itch.io/carotid-artillery#download) + +#### Compile + **Note:** You will need to install the dependencies listed for [your platform](https://github.com/hajimehoshi/ebiten/blob/main/README.md#platforms). Run the following command to build a `carotidartillery` executable: diff --git a/creep.go b/creep.go index fbeac1f..d7f34fd 100644 --- a/creep.go +++ b/creep.go @@ -148,11 +148,16 @@ func (c *gameCreep) Update() { } x, y := c.x+c.moveX, c.y+c.moveY - if !c.level.isFloor(x, y, false) { + if c.level.isFloor(x, y, false) { + c.x, c.y = x, y + } else if c.level.isFloor(x, c.y, false) { + c.x = x + } else if c.level.isFloor(c.x, y, false) { + c.y = y + } else { c.nextAction = 0 return } - c.x, c.y = x, y if repelled { dx, dy := deltaXY(c.x, c.y, c.player.x, c.player.y)