A89: Re: Re: Tile-based Game Engine in C


[Prev][Next][Index][Thread]

A89: Re: Re: Tile-based Game Engine in C




You don't save the whole tiles in the array.
What you do is you have an array with say a byte that represents which tile
number to display.
then you have a pointerlist to the different sprites. if you find say the
number 32 in your array, you take the sprite located at the place the 32:nd
pointer in the list points out and writes it to screen at the position
designated to that place in the array.
This way you change the list when you change levels, and reuse the same
sprite at multiple places witout dubbling the data.

///Olle

----- Original Message -----
From: "Josh 'Gage'" <antgage@apk.net>
>
> Yes, I believe you would create all the textures as 32x32 tiles, then your
> 'map' would basically be an array of what tiles to display. for example in
C
> you can, I've never created one so I may be missing something...
>
> What are your thoughts pros? heh :)





Follow-Ups: References: