bontz-team
[Top][All Lists]
Advanced

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

[Bontz-team] tiles


From: Chuck
Subject: [Bontz-team] tiles
Date: Thu, 31 Jul 2003 08:36:49 -0500

i have an idea for our map system and could possibly do somethin similar for
animations that would solve the problem of loading thing into memory
multiple times without requiring me to spend the time to write a memory
manager...

for tiles we will use a tileset.  the tileset file will look something
similar to this
#header
#this is the tileset name
#this may not be used
name: First Tileset

#id  path/filename animation_flag track_no
1  /outdoor/grass/se.png 0
2  /outdoor/grass/n.png 0
3  /outdoor/grass/s.png 0
4  /outdoor/grass/e.png 0
5  /outdoor/water/wet.info 1 1
...


ok the idea here is we assign each tile an id, so i don't have to load it
into memory multiple times, i can just reference it by the id.  the second
item is the path/filename which i think is self explanatory, and then we
have the animation flag.  if it is a 0 then the tile is just a normal
tile/png, if it is a 1 it means that the item is the info file for an
animation. the track_no indicates what track to start on for an animation.

now for the map file...
i haven't yet taken into account placing objects yet, but this would work
for the map itself.  and i would expect that we also wouldn't nececarilly
always be writing this by hand, i would expect that we make a map editor to
write this for us.

#header
name:  First Map
tileset:  tilesets/outdoor/outdoor1.tiles
size:  24 x 24
author:  rickac

#row1
#tile_id elevation layer portal_flag portal_map portal_coord_x
portal_coord_y
#this is a portal that will jump to a different map
4 1 2 1 /maps/outdoor.map 12 14
#this would be a normal tile point
3 1 2 0
...
#row 2
2 2 2 0
1 2 2 0
3 1 2 0
...
#and this would continue up to row 24 since we have a 24 x 24 map





reply via email to

[Prev in Thread] Current Thread [Next in Thread]