e.g.

Define a background layer.

Define a tile set (0 for none, 1 for ground, 2 for water, ... etc.).

Define a matrix the size of your world 1000x1000 or something.

Randomise the matrix so that each cell of the matrix takes a value between 0-2 or higher depending on your tile set.

This is a just a random world, for a more defined world, you must define rules of what values it can take. Like must have at least 2 adjacent neighbour be the same value so that you don't get dots of single tiles. Or if your coding is alright, try cellular automatons with random seed to define your matrix.
## Leave a comment: