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:

Post by philippeqc »

Your_mom wrote:heh my bad

also add that negative grid points are not allowed or something along those lines, when i tried negative grid points i had problems getting it to work at least luke jr told me that was the reason
Do you have the map where you tried that? because I've tried with a map that had only negative points and one that has a point in each quarter and all works fine.

Can you test the following on your system. Otherwise, I think its a "format-0.1.dtd" vs "map-0.1.dtd" problem. I'll close the bug in sourceforge

-ph
Attachments
allNeg.xml.not.zip
all points are negative
(616 Bytes) Downloaded 422 times
someNeg.xml.not.zip
a point on each side of the axes
(571 Bytes) Downloaded 420 times
Canis meus id comedit.
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Post by Luke-Jr »

philippeqc wrote:
Your_mom wrote:also add that negative grid points are not allowed or something along those lines, when i tried negative grid points i had problems getting it to work at least luke jr told me that was the reason
Do you have the map where you tried that? because I've tried with a map that had only negative points and one that has a point in each quarter and all works fine.

Can you test the following on your system. Otherwise, I think its a "format-0.1.dtd" vs "map-0.1.dtd" problem. I'll close the bug in sourceforge
Then explain why it was only a problem with large multipliers? ;)
Maybe this is a non-x86 bug?
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

How large were the multipliers?
To my knowledge, there's nothing special about negative coordinates. Except for the initializing of the basic grid datastructure, only differences in coordinates are relevant in the code. (All that, of course, plus/minus my memory loss.)
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Post by Luke-Jr »

z-man wrote:How large were the multipliers?
IIRC, 0 or 1 was large enough to crash.
z-man wrote:To my knowledge, there's nothing special about negative coordinates. Except for the initializing of the basic grid datastructure, only differences in coordinates are relevant in the code. (All that, of course, plus/minus my memory loss.)
Is it possible that some datatype is signed on x86, but unsigned on x86_64? I doubt it, but that would be one possible explanation... (with the obvious flaw that then negative coords would crash at *any* size)
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

I'm just unable to reproduce the bug in any form, so I'd like to know:

-who has observed this crash and was it first hand or second hand?
-is that person available to help debug (ie at least has a compiler for his OS/architecture)?
-what architecture was used?
-what version of the game was used?
-what map was used?
-What size multiplier was used?
-other condition that seem relevant?
and if this is reproducable on every attempts, or just some times?

Thanks

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

Post by Luke-Jr »

philippeqc wrote:-who has observed this crash and was it first hand or second hand?
Me, and I hurridly changed the map so the people following me to the server didn't crash.
philippeqc wrote:-is that person available to help debug (ie at least has a compiler for his OS/architecture)?
I'll try to remember to reproduce the problem when I'm awake.
philippeqc wrote:-what architecture was used?
x86_64
philippeqc wrote:-what version of the game was used?
whatever random CVS was that day o.o
philippeqc wrote:-what map was used?
inaktek
philippeqc wrote:-What size multiplier was used?
0 or 1
philippeqc wrote:-other condition that seem relevant?
Adding 700 to all coordinates (making them positive) fixed the problem.
philippeqc wrote:and if this is reproducable on every attempts, or just some times?
Hopefully I'll know shortly after I wake up. ;)
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

Luke-Jr wrote:
philippeqc wrote:-what version of the game was used?
whatever random CVS was that day o.o
When you get the change to test, can you try to compile a new "fresh cvs" version. Question to see if it was a problem with that version, or a problem in all versions.
philippeqc wrote:-what map was used?
inaktek

I assume its inaktek 0.7.0?
philippeqc wrote:-What size multiplier was used?
0 or 1
philippeqc wrote:-other condition that seem relevant?
Adding 700 to all coordinates (making them positive) fixed the problem.


What other condition leading to the test are relevant? I assume its was a server/client game. Can you try on a local game to replicate the error with the same map? In the client/server context, is it only the server that crash? Can you try to have the client and/or the server (all combinaisons) on a non x86_64 architecture?
philippeqc wrote:and if this is reproducable on every attempts, or just some times?
Hopefully I'll know shortly after I wake up. ;)[/quote]

Do you observe the same conditions with the 2 maps I've posted in some previous message?

Thanks for you help

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

Post by Luke-Jr »

philippeqc wrote:
Luke-Jr wrote:
philippeqc wrote:-what version of the game was used?
whatever random CVS was that day o.o
When you get the change to test, can you try to compile a new "fresh cvs" version. Question to see if it was a problem with that version, or a problem in all versions.
Yea... I don't keep old versions around...
philippeqc wrote:
philippeqc wrote:-what map was used?
inaktek
I assume its inaktek 0.7.0?
No idea...
philippeqc wrote:
philippeqc wrote:-other condition that seem relevant?
Adding 700 to all coordinates (making them positive) fixed the problem.
What other condition leading to the test are relevant? I assume its was a server/client game. Can you try on a local game to replicate the error with the same map? In the client/server context, is it only the server that crash? Can you try to have the client and/or the server (all combinaisons) on a non x86_64 architecture?
I could, but map code shouldn't be affected by the server too much..
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

Could someone give an explanation of SavePos, RestorePos, Line, and Rectangle from the experimental DTD?
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

SavePos and RestorePos are basically a one level stack. You can push a coordinate there during the construction of a wall. When you pop the coordinate back, you are able to build a new trunc of wall from that saved coordinate.

line is a keyword for a 2 point wall.

Rectangle create a box bounded by the 2 set of coordinate given. If you give it x1, y1, x2, y2, it will make a box having the corners:
(x1,y1) (x1,y2) (x2,y2) (x2,y1)
[maybe not in this order, but the box is identical]

While you can put any amount of rectangles on a map, I recommend you only use one, and only for the outer boundaries of your arena, if you want a rectangular one that is aligned on the x and y axis. If you use some elsewhere, you might create dead zone. They are quite inconvenient when it comes to winzones appearing over them.

I hope this help you

-ph
Canis meus id comedit.
shu
Posts: 2
Joined: Sat Jul 09, 2005 5:36 pm

Post by shu »

Well, although I didn't read your tutorial, here's a map of mine:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE World SYSTEM "map-0.1-exp.dtd">
<World version="0.1">
        <Map name="HexaTRON" version="0.4.1" author="Luke-Jr">
                <Field>
                        <Axes number="6" />
                        <!-- START SPAWN CODE -->
                        <Spawn  x="255.000"     y="73.612183"   angle="60"      xdir="0.5"      ydir="0.866025"         />
                        <Spawn  x="170.000"     y="368.060791"  angle="240"     xdir="-0.5"     ydir="-0.866025"        />
                        <Spawn  x="361.250"     y="184.030426"  angle="120"     xdir="-0.5"     ydir="0.866025"         />
                        <Spawn  x="63.750"      y="257.642578"  angle="300"     xdir="0.5"      ydir="-0.866026"        />
                        <Spawn  x="318.750"     y="331.254730"  angle="180"     xdir="-1.0"     ydir="-0.000000"        />
                        <Spawn  x="106.250"     y="110.418243"  angle="0"       xdir="1.0"      ydir="0.000000"         />

                        <Spawn  x="184.167"     y="73.612167"   angle="120"     xdir="-0.5"     ydir="0.866025"         />
                        <Spawn  x="240.833"     y="368.060822"  angle="300"     xdir="0.5"      ydir="-0.866026"        />
                        <Spawn  x="325.833"     y="122.686966"  angle="180"     xdir="-1.0"     ydir="-0.000000"        />
                        <Spawn  x="99.167"      y="318.986053"  angle="0"       xdir="1.0"      ydir="0.000000"         />
                        <Spawn  x="354.167"     y="269.911285"  angle="240"     xdir="-0.5"     ydir="-0.866025"        />
                        <Spawn  x="70.833"      y="171.761734"  angle="60"      xdir="0.5"      ydir="0.866025"         />

                        <!-- START GRID CODE -->

                        <!-- Outer grid -->
                        <Wall>
                                <Point  x="127.5"       y="73.612160"   />

                                <Point  x="170.000"     y="0.000000"    />
                                <Point  x="255.000"     y="0.000015"    />
                                <Point  x="297.500"     y="73.612175"   />
                                <SavePos />
                                <Point  x="283.500"     y="97.860886"   />
                                <RestorePos />

                                <Point  x="382.500"     y="73.612190"   />
                                <Point  x="425.000"     y="147.224350"  />
                                <Point  x="382.500"     y="220.836487"  />
                                <SavePos />
                                <Point  x="354.500"     y="220.836487"  />
                                <RestorePos />

                                <Point  x="425.000"     y="294.448639"  />
                                <Point  x="382.500"     y="368.060791"  />
                                <Point  x="297.500"     y="368.060791"  />
                                <SavePos />
                                <Point  x="283.500"     y="343.812073"  />
                                <RestorePos />

                                <Point  x="255.000"     y="441.672943"  />
                                <Point  x="170.000"     y="441.672943"  />
                                <Point  x="127.500"     y="368.060791"  />
                                <SavePos />
<Point  x="141.500"     y="343.812073"  />
                                <RestorePos />

                                <Point  x="42.500"      y="368.060791"  />
                                <Point  x="-0.000"      y="294.448639"  />
                                <Point  x="42.500"      y="220.836456"  />
                                <SavePos />
                                <Point  x="70.500"      y="220.836472"  />
                                <RestorePos />

                                <Point  x="-0.000"      y="147.224304"  />
                                <Point  x="42.500"      y="73.612129"   />
                                <Point  x="127.500"     y="73.612160"   />
                                <SavePos />
                                <Point  x="141.500"     y="97.860870"   />
                                <RestorePos />

                        </Wall>
                        <!-- Inner grid -->

                        <Wall>
                                <Point  x="226.0"       y="147.224335"  />
                                <Point  x="254.000"     y="147.224335"  />
                                <SavePos />
                                <Point  x="268.000"     y="122.975624"  />
                                <RestorePos />
                                <Point  x="268.000"     y="171.473053"  />
                        </Wall>

                        <Wall>
                                <Point  x="282.0"       y="195.721771"  />
                                <Point  x="296.000"     y="219.970490"  />
                                <SavePos />
                                <Point  x="324.000"     y="219.970490"  />
                                <RestorePos />
                                <Point  x="282.000"     y="244.219193"  />
                        </Wall>

                        <Wall>
                                <Point  x="268.0"       y="268.467896"  />
                                <Point  x="254.000"     y="292.716614"  />
                                <SavePos />
                                <Point  x="268.000"     y="316.965332"  />
                                <RestorePos />
                                <Point  x="226.000"     y="292.716614"  />
                        </Wall>

                        <Wall>
                                <Point  x="198.0"       y="292.716614"  />
                                <Point  x="170.000"     y="292.716614"  />
                                <SavePos />
                                <Point  x="156.000"     y="316.965332"  />
<RestorePos />
                                <Point  x="156.000"     y="268.467896"  />
                        </Wall>

                        <Wall>
                                <Point  x="142.0"       y="244.219193"  />
                                <Point  x="128.000"     y="219.970490"  />
                                <SavePos />
                                <Point  x="100.000"     y="219.970490"  />
                                <RestorePos />
                                <Point  x="142.000"     y="195.721771"  />
                        </Wall>

                        <Wall>
                                <Point  x="156.0"       y="171.473053"  />
                                <Point  x="170.000"     y="147.224335"  />
                                <SavePos />
                                <Point  x="156.000"     y="122.975624"  />
                                <RestorePos />
                                <Point  x="198.000"     y="147.224350"  />
                        </Wall>
                </Field>
        </Map>
</World>
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

shu wrote:Well, although I didn't read your tutorial, here's a map of mine:

Code: Select all

<Map name="HexaTRON" version="0.4.1" author="Luke-Jr">
Thats the HexaTron map. :roll:
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

A new, quite updated, version of the tutorial is now available.

Code: Select all

Rewroked advanced section about Axes
Inserted better description about spawn point that was posted on the forum
Added Appendix I on map writing best practice
Added Appendix II on how to name resources
Added a table of content
If you already read the older version of the tutorial, I think section 6 still can be worth reading. I talks about the advanced usage of Axes and Axis. By itself, its
1) a complex topic
2) that was badly presented
3) I think the current presentation quality has risen to something that could be considered "semi-intelligible"
4) nobody has used any of those features yet in any maps that I've seen.

That being said, for those who dont want to cvs the document, I've attached a copy here.

I'd welcome any comment about the tutorial.

-ph

Thanks
Attachments
Howto-Maps.zip
MapTutorial, version 0.3
(8.64 KiB) Downloaded 360 times
Canis meus id comedit.
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Thanks, I'll put this in CVS in the docs folder, in a new txt subdirectory. It's sort of a preliminary solution; I hope we can get a better HTML generation system everyone can understand.
User avatar
philippeqc
Long Poster - Project Developer - Sage
Posts: 1526
Joined: Mon Jul 12, 2004 8:55 am
Location: Stockholm
Contact:

Post by philippeqc »

After seeing Jonathans' spiral map, I remembered something about improving the quality of experience for players.

The rule I've read is something like this: "Make actions consistent, but sometime, add an unpredicted element".

So, in a FPS, if you shot a crate, the content should be of the proper size. You shouldn't find long bazookas in short box.

But if crates usually give something positive to the player, like ammo, health or weaponry, and sometimes nothing, then it gets regular and predictable. So instead, have the 37'th crate explode in the face of the player. Then dont repeat this until the 83'th crate.

After a few crates, the player get confident, then a bored by the crates. By putting an unexpected element, you revive the interest of the crates for the player.

I'll use Jonathan's map as for me, its the first map that has a start and an end, in the same fashion of many maps in FPS (in single player mode)

By itself, surviving 1000 loops is not an easy challenge. And I've still to manage it. But its easy to just get in a "have to turn, have to turn" brain pattern. To keep a player on its toes, one could:
-after the 32'th lap, suddently make the spiral unwind in the opposite direction
-on the 56'th lap, put a small bent in one of the corridor.


That said, Jonathan and Your_mom, its just a pitty that the engine isnt ready to set a victory condition upon escape, or wandering death zone, because you made some great map.

-ph

None of this is mine, I think it came from Gamasutra.
Canis meus id comedit.
Post Reply