I looked around some of the source code...
Is there some place where I can say load image_name X,Y,Z, facing_direction, and it would place the bottom left corner at that spot, facing whichever of the 360 degrees is mentioned after that?
Or I suppose object_name since sometimes objects change their images.
It seems to load up information only from maps made by programs you have to buy or formats you probably have to liscense once your game is finished.
I would like to write my own map editor.
how maps are loaded up... simplier way
Well, that type of formating is usually a binary format created by the author of the application being made.
When I do rapid development, I use XML for that purpose, then go back later and change my load functions to use a binary instead that I generate from the XML.
This is an uncomplexified version of what I do now, I define all of my textures, then I define a map which consists of tiles and objects.
Then I just make XML loading functions. The package I use to do that is libXML.
When I do rapid development, I use XML for that purpose, then go back later and change my load functions to use a binary instead that I generate from the XML.
This is an uncomplexified version of what I do now, I define all of my textures, then I define a map which consists of tiles and objects.
Code: Select all
- <zones>
- <tileset id="0">
<tile id="0" filename="wood.bmp" />
<tile id="1" filename="winter.bmp" />
<tile id="2" filename="wood.bmp" />
<tile id="3" filename="stones.jpg" />
<tile id="4" filename="testtile.bmp" />
<tile id="100" filename="stones.jpg" />
</tileset>
- <objectset id="0">
<object id="0" filename="man0.bmp" />
<object id="1" filename="animal0.bmp" />
<object id="2" filename="woman0.bmp" />
</objectset>
- <zone id="0" tileset="0">
<info>grass3</info>
<object texture="0" x="1" z="0" />
<object texture="1" x="2" z="0" />
<object texture="2" x="3" z="0" />
<landblock texture="4" x="1" z="0" height="0" />
<landblock texture="4" x="2" z="0" height="0" />
<landblock texture="4" x="3" z="0" height="0" />
<landblock texture="4" x="4" z="0" height="0" />
<landblock texture="4" x="0" z="0" height="0" />
<landblock texture="4" x="1" z="1" height="0" />
<landblock texture="4" x="2" z="1" height="0" />
<landblock texture="4" x="3" z="1" height="0" />
<landblock texture="4" x="4" z="1" height="0" />
<landblock texture="4" x="0" z="1" height="0" />
<landblock texture="4" x="1" z="2" height="0" />
<landblock texture="4" x="2" z="2" height="0" />
<landblock texture="4" x="3" z="2" height="0" />
<landblock texture="4" x="4" z="2" height="0" />
<landblock texture="4" x="0" z="2" height="0" />
<landblock texture="4" x="1" z="3" height="0" />
<landblock texture="4" x="2" z="3" height="0" />
<landblock texture="4" x="3" z="3" height="0" />
<landblock texture="4" x="4" z="3" height="0" />
<landblock texture="4" x="0" z="3" height="0" />
<landblock texture="4" x="1" z="4" height="0" />
<landblock texture="4" x="2" z="4" height="0" />
<landblock texture="4" x="3" z="4" height="0" />
<landblock texture="4" x="4" z="4" height="0" />
<landblock texture="4" x="0" z="4" height="0" />
</zone>
</zones>
Crud, how do I do this again?