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

https://github.com/dcecile/off-grid-orcs

My code is public because I think I'll use it as a portfolio piece, and it's open source on the off chance that someone else finds my code helpful for learning Scala.js 😉

Edit: Since this is about code, here's a code snippet for determining and animating the cursor sprite...

  def viewSprites(model: Model.Map): Seq[Sprite] = {
    val cursor = model.cursor
    cursor.position match {
      case Some(position) =>
        val spriteBuffer = cursor.action.spriteBuffer
        Seq(Sprite(
          position.spriteTopLeft(spriteBuffer.size),
          spriteBuffer,
          cursor.action.pulse(model.world.currentTime)))
      case None =>
        Seq()
    }
  }