World design tutorial

For developmental things relating to the graphics of the game.
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

World design tutorial

Post by philippeqc »

Hi,

Now that maps are very close to be a reality, I thought i would be a good teaser for the interested to learn how to write them. And maybe even to start working on a few of your own.

So here is the tutorial on the World format 0.1! As a bonus, I extracted all the maps (3) from the tutorial and put them in a zip file.

I will gladly welcome corrections and pointers to improve it. And if someone translated it from "technobabble" to "creativebabble", I would take absolutly no offenses what so ever. I know I write will all the warm fuzzy feeling of an electricity bill, and the ease of comprehension of a long distance bill. :D

So enjoy, and start posting your maps.

-ph

Edit: added the DTD file.

Guru: could you allow for attachements with extention .txt?

Edit: The attached tutorial is now version 0.2
Edit: Bumped to version 0.3
Edit: Version update of the tutorial and the dtd. Removed the map included in the tutorial, you will need to cut and paste them out as its been a while I've maintained that collection, and I dont get the impression that anyone used it.
Attachments
map-dtd.zip
The DTD's as of Oct 10, 2005
(1.36 KiB) Downloaded 468 times
Howto-Maps.zip
The tutorial, as of Oct 10, 2005
(9.79 KiB) Downloaded 381 times
Last edited by philippeqc on Mon Oct 10, 2005 9:48 pm, edited 3 times in total.
Canis meus id comedit.

User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

Do the maps work in any version yet, so we can test them?

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

nemostultae wrote:Do the maps work in any version yet, so we can test them?
Not really, hence the "teaser" comment. For movies, they often release a teaser way in advance to get your attention, then come the trailers, telling you the whole movie, and later the actual movie.

If you are adventurous, you can find the code in the "Map Format" discussion. It lacks a few sanity check, but is basically the same. Otherwise, you will have to wait about a week.

The tutorial was a bit that was required. But instead of keeping it on my drive till the publication of the final code, I though some of you might enjoy having a glance at what is coming, and try your hands on a few maps even thou you couldn't test them (*). Who will be the first to post a map?

Finally, once you will actually read the document, you will notice the dry and technical writing style that is more of a definition than a tutorial. Posting it early allows me to receive questions and comments about it, and try to address the issues.

A bit of 2 in the morning logic:
Having the parser without the tutorial would be wrost. You could test all you want, but wouldn't know what to test.

-ph

* you can at least validate your map against the DTD!
Canis meus id comedit.

User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE World SYSTEM "format-0.1.dtd">
<World version="0.1">

<Map name="iron cross" version=".5" author="Your_mom">
    <Field>
        <Axes number="4"/>

	<Spawn x="0" y="-5" xdir="0" ydir="-1" />
	<Spawn x="0" y="5" xdir="0" ydir="1" />
	<Spawn x="-5" y="0" xdir="-1" ydir="0" />
	<Spawn x="5" y="0" xdir="1" ydir="0" />

	<Spawn x="350" y="50" xdir="0" ydir="-1" />
	<Spawn x="350" y="-50" xdir="0" ydir="1" />
	<Spawn x="-350" y="50" xdir="0" ydir="-1" />
	<Spawn x="-350" y="-50" xdir="0" ydir="1" />

	<Spawn x="-50" y="350" xdir="1" ydir="0" />
	<Spawn x="50" y="350" xdir="1" ydir="0" />
	<Spawn x="-50" y="-350" xdir="-1" ydir="0" />
	<Spawn x="50" y="-350" xdir="1" ydir="0" />

	<Wall>
            <Point x="-400" y="200" />
            <Point x="-300" y="200" />
            <Point x="-300" y="100" />
            <Point x="-100" y="100" />
            <Point x="-100" y="300" />
            <Point x="-200" y="300" />
            <Point x="-200" y="400" />
            <Point x="200" y="400" />
            <Point x="200" y="300" />
            <Point x="100" y="300" />
            <Point x="100" y="100" />
            <Point x="300" y="100" />
            <Point x="300" y="200" />
            <Point x="400" y="200" />
            <Point x="400" y="-200" />
            <Point x="300" y="-200" />
            <Point x="300" y="-100" />
            <Point x="100" y="-100" />
            <Point x="100" y="-300" />
            <Point x="200" y="-300" />
            <Point x="200" y="-400" />
            <Point x="-200" y="-400" />
            <Point x="-200" y="-300" />
            <Point x="-100" y="-300" />
            <Point x="-100" y="-100" />
            <Point x="-300" y="-100" />
            <Point x="-300" y="-200" />
            <Point x="-400" y="-200" />
            <Point x="-400" y="200" />
	</Wall>
    </Field>
</Map>
</World>
is this right, if so what do i win?

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Neato!
is this right, if so what do i win?
Something that nobody will ever be able to steal from you: that you where the first to make a map.

Anyone else got one?

-ph
Canis meus id comedit.

User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

philippeqc wrote:Neato!
is this right, if so what do i win?
Something that nobody will ever be able to steal from you: that you where the first to make a map.

Anyone else got one?

-ph
thats sufficient here's 2 more i made

hope zman doesnt mind me stealing spawn points in these two

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE World SYSTEM "format-0.1.dtd">
<World version="0.1">

<Map name="testname maze" version=".9" author="Your_mom">
    <Field>
        <Axes number="4"/>

	<Spawn x="255" y="50" xdir="0" ydir="1" />
	<Spawn x="245" y="450" xdir="0" ydir="-1" />
	<Spawn x="50" y="245" xdir="1" ydir="0" />
	<Spawn x="450" y="255" xdir="-1" ydir="0" />

	<Spawn x="305" y="100" xdir="0" ydir="1" />
	<Spawn x="195" y="400" xdir="0" ydir="-1" />
	<Spawn x="100" y="195" xdir="1" ydir="0" />
	<Spawn x="400" y="305" xdir="-1" ydir="0" />

	<Spawn x="205" y="100" xdir="0" ydir="1" />
	<Spawn x="295" y="400" xdir="0" ydir="-1" />
	<Spawn x="100" y="295" xdir="1" ydir="0" />
	<Spawn x="400" y="205" xdir="-1" ydir="0" />

	<Wall>
            <Point x="100" y="100" />
            <Point x="0" y="100" />
            <Point x="0" y="400" />
            <Point x="100" y="400" />
            <Point x="100" y="500" />
            <Point x="400" y="500" />
            <Point x="400" y="400" />
            <Point x="500" y="400" />
            <Point x="500" y="100" />
            <Point x="400" y="100" />
            <Point x="400" y="0" />
            <Point x="100" y="0" />
            <Point x="100" y="100" /> 
	</Wall>
    </Field>
</Map>
</World>

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE World SYSTEM "format-0.1.dtd">
<World version="0.1">

<Map name="testname repeat" version=".3" author="Your_mom">
    <Field>
        <Axes number="4"/>

	<Spawn x="255" y="50" xdir="0" ydir="1" />
	<Spawn x="245" y="450" xdir="0" ydir="-1" />
	<Spawn x="50" y="245" xdir="1" ydir="0" />
	<Spawn x="450" y="255" xdir="-1" ydir="0" />

	<Spawn x="305" y="100" xdir="0" ydir="1" />
	<Spawn x="195" y="400" xdir="0" ydir="-1" />
	<Spawn x="100" y="195" xdir="1" ydir="0" />
	<Spawn x="400" y="305" xdir="-1" ydir="0" />

	<Spawn x="205" y="100" xdir="0" ydir="1" />
	<Spawn x="295" y="400" xdir="0" ydir="-1" />
	<Spawn x="100" y="295" xdir="1" ydir="0" />
	<Spawn x="400" y="205" xdir="-1" ydir="0" />

	<Wall>
            <Point x="0" y="0" />
            <Point x="700" y="0" />
            <Point x="700" y="700" />
            <Point x="0" y="700" />
            <Point x="0" y="0" />
	</Wall>
	<Wall>
            <Point x="100" y="300" />
            <Point x="100" y="100" />
            <Point x="300" y="100" />
	</Wall>
	<Wall>
            <Point x="100" y="400" />
            <Point x="100" y="600" />
            <Point x="300" y="600" />
	</Wall>
	<Wall>
            <Point x="400" y="600" />
            <Point x="600" y="600" />
            <Point x="600" y="400" />
	</Wall>
	<Wall>
            <Point x="400" y="100" />
            <Point x="600" y="100" />
            <Point x="600" y="300" />
	</Wall>
	<Wall>
            <Point x="200" y="300" />
            <Point x="200" y="200" />
            <Point x="300" y="200" />
	</Wall>
	<Wall>
            <Point x="200" y="400" />
            <Point x="200" y="500" />
            <Point x="300" y="500" />
	</Wall>
	<Wall>
            <Point x="500" y="400" />
            <Point x="500" y="500" />
            <Point x="400" y="500" />
	</Wall>
	<Wall>
            <Point x="500" y="300" />
            <Point x="500" y="200" />
            <Point x="400" y="200" />
	</Wall>
    </Field>
</Map>
</World>

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

"testname maze.xml" and "testname repeat.xml" now exist on my very small collection of AA maps. May I inspire you to change the name of your maps?

testname maze, you seem to be doing a "cross of the world" theme. Have I revealed your plan too early?
testname repeat is quite dissorienting! That is one nice map.

-ph
Canis meus id comedit.

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

To all, what do you think of the tutorial. Is it helpfull, obscure, something you read to your kids every night, or a good reason to bring back stoning? A bit of input would be appreciated.

To Your_Mom and nemostultae(*), who are now hard at work making worderous maps, how did it help you? Which part are hard to understand, and which are ok?

To all again: Try to post your maps as attached files. I'm hard at work on a downloader. Attaching your fine work will make it possible for the game to download it. Now I know that the forum refuses you to post some xml files, but I think the following trick will work:
Rename your file, lets say "SuperDuperExtraordinaryMap.xml", to "SuperDuperExtraordinaryMap.xml.is.not.a.zip" or the slightly shorter "SuperDuperExtraordinaryMap.xml.not.zip". This will fool the forum into accepting it, and serve as the base for the clients to download it.

-ph

*You dont have to work so hard around the limitations of that format. Keep some of your finers ideas for later version of the format, and allow us to appreciate the product of your hard work today!
Last edited by philippeqc on Sun Apr 10, 2005 5:38 pm, edited 1 time in total.
Canis meus id comedit.

User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

philippeqc wrote:To Your_Mom and nemostultae(*), who are now hard at work making worderous maps, how did it help you? Which part are hard to understand, and which are ok?
i think your giving me too much credit :)
the point systems pretty easy to understand you didnt explain the spawn direction stuff very well but most of it was pretty self explanatory if you just look at it. im still kinda confused about the whole multiple (false with custom) axis thing ... but seeing how its optional i just kinda worked around it.

---going to test uploading a map i already posted with that whole .not.zip
tell me if i did it right or wrong

edit -
May I inspire you to change the name of your maps?
i couldnt think of good names sooo...maze is the one i would probobly change ... couldnt think of a name for the testname maze map wanna give me some you came up with?...and just take testname off of the repeat map when i give it new spawn points, thats why its version number is so low...
Attachments
repeatpackagingtest.xml.not.zip
(2.07 KiB) Downloaded 599 times

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

just the dtd and Hexatron map again, on the forum, for me to test the parser code. Sorry!

-ph

Edit: Oups, wrong map. Made one too many test on it.
Attachments
HexaTRON.xml.not.zip
The HexaTRON map
(2.47 KiB) Downloaded 458 times
format-0.1.dtd.not.zip
The required dtd
(976 Bytes) Downloaded 611 times
Canis meus id comedit.

User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Your_mom wrote:
May I inspire you to change the name of your maps?
i couldnt think of good names sooo...maze is the one i would probobly change ... couldnt think of a name for the testname maze map wanna give me some you came up with?...and just take testname off of the repeat map when i give it new spawn points, thats why its version number is so low...
why not "repeat.xml" as file name, "Repeat" in the xml file.

:) Rule of thumb, always spend an extra 30 seconds and think about the name you put.You never know when someone will decide to, for example, hardcode the link to your map beside the link to the HexaTRON map in their code to show people that their map parser works ;)

-ph
Canis meus id comedit.

User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

well this time i thought about naming it a little bit more, i like the name i came up with. If you look at what the map is you might understand why. I couldnt figure out what to call it so i googled octagon and found its dutch counter part (or so i think) achthoek. Then i figured i would combine it with 'in' (inside). inachthoek sounded wierd to me so i decided to follow in american history and just butcher the dutch part(word) to sound/be more english, and so inachthoek became inaktek, yeah thats how i came up with it. Theres actually 4 octagons inside making a cross design in the center of a larger octagon. packaged it up and everything
Attachments
inaktek.xml.not.zip
(2.66 KiB) Downloaded 513 times

Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Post by Luke-Jr »

Your_mom wrote:well this time i thought about naming it a little bit more, i like the name i came up with. If you look at what the map is you might understand why. I couldnt figure out what to call it so i googled octagon and found its dutch counter part (or so i think) achthoek. Then i figured i would combine it with 'in' (inside). inachthoek sounded wierd to me so i decided to follow in american history and just butcher the dutch part(word) to sound/be more english, and so inachthoek became inaktek, yeah thats how i came up with it. Theres actually 4 octagons inside making a cross design in the center of a larger octagon. packaged it up and everything
Interesting... the AIs (as usual) can't handle it, though... :|

I mirrored repeat.xml and inaktek.xml in my maps folder.

Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Circle/40-gon

Post by Luke-Jr »

Made an arena "40-gon" (or rather, I wrote a program to make it ;)
Official server info:
MAP_FILE http://utopios.org/~luke-jr/programs/he ... 40-gon.xml
MAP_UUID 43691273e6ff0d08798e9ae19197c4cf

Screenshots attached :)
Attachments
screenshot_12.png
screenshot_13.png

User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

Ok philipp need some help was wondering if this would creat the effect i depicted in the attached picture. Im unsure if i put the <connector> where it should go or if i even did it right.

Code: Select all

   
   <Wall label="west">
            <Point x="0" y="0" walled=false/> <-- From this point to the next, no wall is visible. --> 
            <Point x="0" y="100" />
   </Wall>
   <Wall label="east">
            <Point x="100" y="0" walled=false/> <-- From this point to the next, no wall is visible. --> 
            <Point x="100" y="100" />
   </Wall>
   <connectors>
      <connector first="west" second="east" crossed="true"/>
   </connectors>
Attachments
s = spawn/start
s = spawn/start
umm x1.JPG (5.94 KiB) Viewed 8775 times

Post Reply