texture tile technics

| No Comments | No TrackBacks
this is a basic thing to do, here is the work flow

1. using 1 and 0(use more numbers if there are more textures), draw a texture tile map, 2d array
2. load texture, and bind 1 and 0 to them.
3. read the tile map array, and draw the corresponding texture to the correct dimensions and position

you just need to pay attention to the coordinates assigned to the vertices, because your array is tile[y][x], you should pay attention that the first [y] is the y axis.

I will put the source code here, since there isn't many tutorials of tiling technics have source code provided.

please note: the whd_bitmap.h (written by me, a simple library, which can do color keying) can be used and modified freely.

tile_texture.zip

No TrackBacks

TrackBack URL: https://blogs.psu.edu/mt4/mt-tb.cgi/55558

Leave a comment

About this Entry

This page contains a single entry by HUAIDONG WANG published on March 25, 2009 9:22 PM.

thinking in C++ is fantastic was the previous entry in this blog.

more gap to be filled is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Subscribe

Powered by Movable Type 4.23-en