Skip to main content
GameDev.net gamedev.net
🔒 Locked

Tile Engine

Started by DJ_House Oct 31, 2000 at 2:12 PM 1 replies 600+ views
Original Post
DJ_House
DJ_House
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.
Kaewan
Kaewan
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
1000010000
0001000000
0000000001
2222222222
3333333333

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,
Kaewan
Yoshi
Yoshi
There is a tutorial about tile engines on my website:
www.remagination.com

Yoshi

The last truth is that there is no magic(Feist)
The last truth is that there is no magic(Feist)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.