On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits) (+1)

I would start small by creating an algorithm that generate one of the 16x16 room. Maybe start with a simple function that create an empty map, and add some random sprites in it. It could look like this:

var TileMap = require('pixelbox/TileMap');

function createRoom() {
  var map = new TileMap(16, 16);
  var nbSprites = random(40);
  for (var i = 0; i < nbSprites; i++) {
    var x = random(16);
    var y = random(16);
    var sprite = random(64);
    map.set(x, y, sprite);
  }
  return map;
}

var room = createRoom();
draw(room, 0, 0);

Then, implement a player character that move into this room (look at this tutorial).

When the character reach the border of this room, we can create another room to continue the desert.

Finally, if you want the desert to look the same when the character move back to the previous room, you will need to control the randomness. For that, I recommend to look into “Pseudo-random number generator” that can be seeded.