This topic is now archived and is closed to further replies.


Tile Engine

Recommended Posts

What is the basis of a tile engine? Say I want to create a Super Mario style... do I create many screens which are 640x480 wide, and simply clip them? I want to avoid wide surfaces at all costs since they''re not widely supported.

Share this post

Link to post
Share on other sites
Although that method is possible, It is not generally implemented due to several factors. I won''t go into the details of why.

The better way is to create smaller "tiles" such as 16x16 images or 32x32. Then, you just have to "tile" them together to create a larger image that can be any size.

You could have a tile of a brick, another of a coin, grass, ice, etc... anything you can imagine. Even your characters can be made of a tile or multiple tiles.

"Tiling" them together is when you place multiple tiles next to each other to create a larger image.

The larger image is usually implemented by using a "map". Probably the most simple way is the use of a 2d array.

Etc: 2d array

0 = sky
1 = cloud
2 = grass
3 = dirt

Imaging the numbers being replaced by a 16x16 image of what it represents.... there you go!

Happy coding,

Share this post

Link to post
Share on other sites