Map Making

From Tronwiki
(Difference between revisions)
Jump to: navigation, search
m (Free-for-all)
(Text Editor)
 
(17 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
#[http://sourceforge.net/projects/turbopad Turbopad (Windows,Linux)]
 
#[http://sourceforge.net/projects/turbopad Turbopad (Windows,Linux)]
 
#[http://www.context.cx/  ConText (Windows)]
 
#[http://www.context.cx/  ConText (Windows)]
#[http://www.vim.org/  Vim (Linux)]
+
#[http://www.vim.org/  Vim (Linux/Windows)]
  
 
===Optional Items===
 
===Optional Items===
Line 19: Line 19:
  
 
Also for ellipses and circles i use [http://generalconsumption.org/armagetron/ General Consumption]. You can also preview your maps there.
 
Also for ellipses and circles i use [http://generalconsumption.org/armagetron/ General Consumption]. You can also preview your maps there.
 +
 +
Another thing that you may need is something to find intersection points this is a JAVA Applet that prints out the intersection in map code format [http://wiki.crazy-tronners.com/Intersection.html]
 +
 +
If you get stuck at any point you can E-mail Kyle at [mailto:armagetronMapMaking@gmail.com]
 
----
 
----
  
Line 25: Line 29:
 
===The basic code layout===  
 
===The basic code layout===  
 
<code>
 
<code>
  &#60;!--this is a comment-->
+
  &#60;!--this is a comment   note: please do not copy this line it is only
 +
to tell you that this is a comment. A comment allows other users to understand
 +
the code better -->
 
  <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 
  <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 +
<!DOCTYPE Resource SYSTEM "AATeam/map-0.2.8.0.dtd">
 
  <Resource type="aamap" name="name" version="0.0.0" author="author"
 
  <Resource type="aamap" name="name" version="0.0.0" author="author"
 
  category="fortress">
 
  category="fortress">
Line 42: Line 49:
 
</code>
 
</code>
 
<small>This is the basic code structure to making a map.</small>
 
<small>This is the basic code structure to making a map.</small>
 +
 +
note: a comment is a piece of data that the program does not read; it is useful to help other map makers understand your code.
  
 
This includes no content right now so if you were to load the page exactly as it is Armagetron Advanced will load in the default map and settings.
 
This includes no content right now so if you were to load the page exactly as it is Armagetron Advanced will load in the default map and settings.
 
----
 
----
 +
 
===  Saving the map===
 
===  Saving the map===
 
----
 
----
Line 86: Line 96:
 
====Settings====
 
====Settings====
 
All the setting they you may set will be shown on a separate page
 
All the setting they you may set will be shown on a separate page
 
I am currently working on this secion
 
  
 
Here is a complete list of [[Map settings]]
 
Here is a complete list of [[Map settings]]
 +
 +
to add a setting to you map
 +
add in
 +
<code>
 +
<Setting name="Settings_name" value="Value_for_setting"/>
 +
</code>
 +
this is the part of the code that this goes to
 +
<code>
 +
  <Settings>
 +
  &#60;!--Your field setting goes here-->
 +
  <b><Setting name="Setting_name" value="Value_for_setting"/></b>
 +
  </Settings>
 +
 +
</code>
 +
<small>This is what it will look like continue pattern for more settings</small>
 +
 
----
 
----
  
Line 244: Line 268:
 
This format will have two sets of opponents (even though it is still free-for-all) facing each other like so:
 
This format will have two sets of opponents (even though it is still free-for-all) facing each other like so:
  
[[Image:FreeForAll-example.png]]
 
  
 
The level stats are:
 
The level stats are:
Line 253: Line 276:
 
===Fortress===
 
===Fortress===
 
<code>
 
<code>
 +
<Resource>
 +
  <Map>
 
   <World>
 
   <World>
 
     <Field>
 
     <Field>
Line 298: Line 323:
 
====Code====
 
====Code====
 
<code>
 
<code>
 +
<Resource>
 +
  <Map>
 
   <World>
 
   <World>
 
     <Field>
 
     <Field>
Line 342: Line 369:
  
 
====Picture====
 
====Picture====
(*Kyle can u get a picture for this*)
+
[[Image:FreeForAll-example.png]]
 
----
 
----
  
Line 349: Line 376:
 
====Code====
 
====Code====
 
<code>
 
<code>
 +
<Resource>
 +
  <Map>
 
   <World>
 
   <World>
 
     <Field>
 
     <Field>
 
     <Axes number="4"/>
 
     <Axes number="4"/>
     <Spawn x="102" y="40" xdir="0" ydir="1" />
+
     <Spawn x="100" y="40" xdir="0" ydir="1" />
     <Spawn x="98" y="360" xdir="0" ydir="-1" />
+
     <Spawn x="100" y="360" xdir="0" ydir="-1" />
 
     <Wall>
 
     <Wall>
 
     <Point x="0" y="0" />
 
     <Point x="0" y="0" />
Line 404: Line 433:
  
 
====Picture====
 
====Picture====
 +
[[Image:Fortress-example.png]]

Latest revision as of 14:48, 6 August 2007

Contents

About:

This is going to teach you how to build custom maps for game play like the ones that the Crazy Tronners Wild Fortress uses. if you do not feel like coding most of your maps you may want to try out SVG(Scalable Vector Graphics)

What do i need to make a map:

Text Editor

I used notepad but I found out that PSPad was a lot better with handling codes

  1. PSPad (Windows)
  2. Turbopad (Windows,Linux)
  3. ConText (Windows)
  4. Vim (Linux/Windows)

Optional Items

You also may want Armabell but it is very buggy. You can design the map on Armabell, but you will still need a text editor.

Also you will need to read here to set up Armabell

Also for ellipses and circles i use General Consumption. You can also preview your maps there.

Another thing that you may need is something to find intersection points this is a JAVA Applet that prints out the intersection in map code format [1]

If you get stuck at any point you can E-mail Kyle at [2]


How to make a map:

Working on instructions.

The basic code layout

<!--this is a comment   note: please do not copy this line it is only 
to tell you that this is a comment. A comment allows other users to understand
the code better -->
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE Resource SYSTEM "AATeam/map-0.2.8.0.dtd">
<Resource type="aamap" name="name" version="0.0.0" author="author"
category="fortress">
 <Map version="0.2.8">
 <Settings>
  <!--Your field setting goes here-->
 </Settings>
  <World>
   <Field>
    <!--Your field layout goes here-->
   </Field>
  </World>
 </Map>
</Resource>

This is the basic code structure to making a map.

note: a comment is a piece of data that the program does not read; it is useful to help other map makers understand your code.

This includes no content right now so if you were to load the page exactly as it is Armagetron Advanced will load in the default map and settings.


Saving the map


where are the maps i downloaded

  • Windows Vista - C:\Users\Username\AppData\Roaming\Armagetron
  • Windows XP -C:\Documents and settings\Username\Application Data\Armagetron

Where do I need to save it

  • Linux - /usr/share/games/armagetronad/resource/included/author/category
  • Windows - C:\Program Files\Armagetron Advanced\resource\included\author\category
  • Mac OS X - Armagetron Advanced.app/Contents/Resources/resource/included/author/category

in your code there are setting that you set and must mach up when you sove the code.

Here is the section of the code that relates to this

<Resource type="aamap" name="name" version="0.0.0" author="author"
category="fortress">

  • in the author spot rememer to put the exact name of the author from the code.
  • in the category spot rememer to put the exact name of the category from the code.

What do I need to title it

Here is the section of the code that relates to this

<Resource type="aamap" name="name" version="0.0.0" author="author"
category="fortress">

you simply save it as

    name-version.type.xml

for this one it would be

    name-0.0.0.aamap.xml

What do I need in my map


Settings

All the setting they you may set will be shown on a separate page

Here is a complete list of Map settings

to add a setting to you map add in

<Setting name="Settings_name" value="Value_for_setting"/>

this is the part of the code that this goes to

 <Settings>
  <!--Your field setting goes here-->
  <Setting name="Setting_name" value="Value_for_setting"/>
 </Settings>

This is what it will look like continue pattern for more settings


Axes

This section of the code relates to this

  <World>
   <Field>
    <Axes number="4"/>
    <!--Your field layout goes here-->
   </Field>
  </World>
 </Map>
</Resource>

The number 4 represents the number of directions in which you can turn. 4 is the default value for this.


Spawns or Starting Position

This section of the code relates to this

  <World>
   <Field>
    <Axes number="4"/>
    <Spawn x="700" y="1100" xdir="0" ydir="1"/>
    <Spawn x="700" y="300" xdir="0" ydir="1"/>
    <!--Your field layout goes here-->
   </Field>
  </World>
 </Map>
</Resource>

In the spawn

  • the x and y refers to the coordinates (x,y) where the team starts.
  • the xdir and ydir tell what way that you are facing
    • Instead of the xdir and ydir you can put in angle="degrees" where degrees is in degrees starting from the positive x direction.
  • Each spawn creates a new starting position

Also, when you make levels that have just two spawn points, multiple cycles will be created at them in game if more then two people join. This can be useful when making team maps (such as ones for the CT Wild Server), as you only have to make two spawn points instead of 14


Walls

This section of the code relates to this

  <World>
   <Field>
    <Axes number="4"/>
    <Spawn x="700" y="1100" xdir="0" ydir="1"/>
    <Spawn x="700" y="300" xdir="0" ydir="1"/>
    <!--Your field layout goes here-->
   <Wall>
    <Point x="0" y="0"/>
    <Point x="1400" y="0"/>
    <Point x="1400" y="1400"/>
    <Point x="0" y="1400"/>
    <Point x="0" y="0"/>
   </Wall>
   </Field>
  </World>
 </Map>
</Resource>

This is the code for a wall surrounding the level, which prevents players from going on to infinity. Your level MUST have at least this type of wall, for it to be classified as a level.

NOTE:If you want a square (four sided shape) you must specify 5 wall points. If you want a 6-sided shape, then you must specify 7 wall points.

If you want to use Circles go to General Consumption. That site also works good with any polygon you just need to declare you segments. you also may have to adjust the start and end angle for some maps


Zones

This section of the code relates to this

  <World>
   <Field>
    <Axes number="4"/>
    <Spawn x="700" y="1100" xdir="0" ydir="1"/>
    <Spawn x="700" y="300" xdir="0" ydir="1"/>
    <!--Your field layout goes here-->
   <Wall>
    <Point x="0" y="0"
    <Point x="1400" y="0"
    <Point x="1400" y="1400"
    <Point x="0" y="1400"
    <Point x="0" y="0"
   </Wall>
   <Zone effect="fortress"> 
   <ShapeCircle radius="20"> 
   <Point x="700" y="300" /> 
   </ShapeCircle> 
   </Zone> 
   <Zone effect="fortress"> 
   <ShapeCircle radius="20"> 
   <Point x="700" y="1100" /> 
   </ShapeCircle> 
   </Zone> 
   </Field>
  </World>
 </Map>
</Resource>

Above is the method of creating conquest zones for a fortress map. As well as these, you can also create deathzones and winzones:

Deathzone Code

   <Zone effect="death">
   <ShapeCircle radius="10">
   <Point x="700" y="700"/>
   </ShapeCircle>
   </Zone>

Winzone Code

   <Zone effect="win">
   <ShapeCircle radius="5">
   <Point x="700" y="700"/>
   </ShapeCircle>
   </Zone>

If you wish to tamper with the zone effects, change the Map settings


What your final map code should look like

This section is about what your final coding should look like, so you can double check before you test your map.


Free-for-all

<Resource>
 <Map>
  <World>
   <Field>
    <Axes number="4"/>
    <Spawn x="200" y="100" xdir="0" ydir="1"/>
    <Spawn x="200" y="300" xdir="0" ydir="-1"/>
    <!--Your field layout goes here-->
   <Wall>
    <Point x="0" y="0"/>
    <Point x="400" y="0"/>
    <Point x="400" y="400"/> 
    <Point x="0" y="400"/>
    <Point x="0" y="0"/>
   </Wall>
   </Field>
  </World>
 </Map>
</Resource>

This format will have two sets of opponents (even though it is still free-for-all) facing each other like so:


The level stats are: Size: 400x400 Axes:4


Fortress

<Resource>
 <Map>
  <World>
   <Field>
    <Axes number="4"/>
    <Spawn x="200" y="100" xdir="0" ydir="1"/>
    <Spawn x="200" y="300" xdir="0" ydir="-1"/>
    <!--Your field layout goes here-->
   <Wall>
    <Point x="0" y="0"/>
    <Point x="400" y="0"/>
    <Point x="400" y="400"/>
    <Point x="0" y="400"/>
    <Point x="0" y="0"/>
   </Wall>
   <Zone effect="fortress">
   <ShapeCircle radius="20">
   <Point x="200" y="100" />
   </ShapeCircle> 
   </Zone> 
   <Zone effect="fortress">
   <ShapeCircle radius="20">
   <Point x="200" y="100" />
   </ShapeCircle>
   </Zone>
   </Field>
  </World>
 </Map>
</Resource>


How to Test your map:

Map Testing


Commands:

This is a Map settings link to the page where we have set up a list of commands (or settings as they are more usually known) that you can add to your map to make it more effective


Examples

The following are examples of the codes and pictures of each of the other two main types of maps


Free-for-all map with walls

This is a map that is a free for all melee, but it has some neat obsicles that you may want to avoid, like the four triangles in the middle

Code

<Resource>
 <Map>
  <World>
   <Field>
    <Axes number="4"/>
    <Spawn x="200" y="50" xdir="0" ydir="1"/>
    <Spawn x="200" y="350" xdir="0" ydir="-1"/>
    <!--Your field layout goes here-->
   <Wall>
    <Point x="0" y="0"/>
    <Point x="400" y="0"/>
    <Point x="400" y="400"/> 
    <Point x="0" y="400"/>
    <Point x="0" y="0"/>
   </Wall>
   <Wall>
    <Point x="175" y="100"/>
    <Point x="100" y="175"/>
    <Point x="175" y="175"/>
    <Point x="175" y="100"/>
   </Wall>
   <Wall>
    <Point x="225" y="100"/>
    <Point x="300" y="175"/>
    <Point x="225" y="175"/>
    <Point x="225" y="100"/>
   <Wall>
    <Point x="175" y="300"/>
    <Point x="100" y="225"/>
    <Point x="175" y="225"/>
    <Point x="175" y="300"/>
   </Wall>
   <Wall>
    <Point x="225" y="300"/>
    <Point x="300" y="225"/>
    <Point x="225" y="225"/>
    <Point x="225" y="300"/>
   </Wall>
   </Wall>
   </Field>
  </World>
 </Map>
</Resource>

Picture

FreeForAll-example.png


Fortress map with walls

This is a map that incorporates two fortress zones per team, one of each teams is in the middle, forming a sumo. There are some walls and side entrances to allow some sneaky attacking and defending.

Code

<Resource>
 <Map>
  <World>
   <Field>
    <Axes number="4"/>
    <Spawn	x="100"	y="40"	xdir="0" ydir="1" />
    <Spawn	x="100"	y="360"	xdir="0" ydir="-1" />
   <Wall>
    <Point	x="0"	y="0"	/>
    <Point	x="200"	y="0"	/>
    <Point	x="200"	y="400"	/>
    <Point	x="0"	y="400"	/>
    <Point	x="0"	y="0"	/>
   </Wall>
   <Wall>
    <Point	x="0"	y="200"	/>
    <Point	x="65"	y="200"	/>
   </Wall>
   <Wall>
    <Point	x="135"	y="200"	/>
    <Point	x="200"	y="200"	/>
   </Wall>
   <Wall>
    <Point	x="65"	y="240"	/>
    <Point	x="65"	y="160"	/>
   </Wall>				
   <Wall>
    <Point	x="135"	y="240"	/>
    <Point	x="135"	y="160"	/>
   </Wall>
   <Zone effect="fortress">
   <ShapeCircle radius="30">
   <Point x="100" y="40" />
   </ShapeCircle>
   </Zone>
   <Zone effect="fortress">
   <ShapeCircle radius="30">
   <Point x="100" y="360" />
   </ShapeCircle>
   </Zone>
   <Zone effect="fortress">
   <ShapeCircle radius="35">
   <Point x="100" y="200" />
   </ShapeCircle>
   </Zone>
   <Zone effect="fortress">
   <ShapeCircle radius="35">
   <Point x="100" y="200" />
   </ShapeCircle>
   </Zone>
   </Field>
  </World>
 </Map>
</Resource>

Picture

Fortress-example.png

Personal tools