Maps

More
18 years 9 months ago #18518 by MajorTom
Maps was created by MajorTom
So how do we make a map with a new planet?

we need a .map file and a corresponding .lws for it. The ones used for MP typically have 3 objects on them, one of which is the planet you see in the background. it includes the nebula image. How that is actually made is up to you moddlers. We just need a map with as little stuff on it as possible and one planetv which uses the image for the cool new planet. (one .map file for each planet we want to see). The .map and corresponding .lws file have to be in StarWarsA1/geog/multiplayer.

How it works (how Particle systems set it up)

When we have the map we place a multiplayer "arena" on it. The arena is typically 50 km in diameter (but we have used 250km). The smaller the arena is, the more accurate collision detection will be (repeatable hit rates for weapons ect.).
The pog functions used to make the arena, rely on two .ini files. one is the map.ini and the other is the package.ini.

The map.ini defines the stationary objects in the arena (stations, asteroids, debris, and other visual stuff) and the position of those objects. It defines the spawn points (where your player ship appears when you join a game. It also contains the human readable name of the arena that you see on the GUI when you select a game. The map .ini also defines which .map file (with it's nebula) is to be used and specifies the package.ini that works with this arena. (multiple maps can specify the same package.ini file)

The package.ini specifies the pog script to be used for the particular game, the default score (points) limit that will end the game and the game time limit. It contains the human readable name of the game type shown in the GUI. It also defines the bot ship types used in that game, the names of the bot ships, and a few other things that apply to the particular game, game performance and the method used for scoring.

How is the arena created?
First flux loads the map specified in the map.ini and runs through the map entity objects on the map. It stops at the first map entity it finds with a geog index of 2. (a Planet). It determines the radius of that planet by reading the data in the .map file.
The script then defines a point in space that is called the "arena Centre" which is directly in front of the planet at 3 x its radius distance (i.e x=0, y=0, z=3*radius). (so you can see the planet in the background)
Once the point in space "arena Centre" is defined there is no further interaction with the .map file(!)

The pog script then reads the multiplayer map.ini and places the different objects (Resources) in the listed position. The position listed in the map.ini is always relative to the imaginary point "arena Center".


A MP arena (it's generally called a MP map) may have over 100 objects on it, the objects are basically scenery, give you cover, support different attack strategies ect. Some of the static objects may have a function, like repairing your ship or re-arming you when you dock to a station. Some static objects can be destroyed, some cannot. Every destructable object in the arena has a defined number of points that you and your team gets credited when the object is destroyed.

Why do we have an arena? Primarily for accuracy reasons. a .map file doesn't place objects accuratly enough for our use. Second, when you join a multiplayer game you want to play with other people: if the map is endless in size (your sensor range is only 200km) you would probably never find the other players because they have drifted off in the heat of battle.
The arena concept also allows us to make different MP scenarios with different objects in the scene (background) so you don't get bored playing in the same arena all the time. It also allows us the greatest flexibility to create and interact with the objects in our little game world (the arena) i.e to have missions with objectives.

The size of the Arena is determined by the pog script for a specific game. Theoretically it could be 400 km in diameter, (200 km in radius). The players do however drift from the center when playing and a big arena means it takes a long time to get to the action. (we don't have LDS in MP) because you normally enter a game near your own base as determined by the spawn points in the map.ini file.

There is actually no boundry on the edge of an arena that you hit hit and bounce back. The game just monitors the position of each player and when a player gets too far away from the center he is respawned a distance back inside the arena. There may be other ways to do that but this method is generally accepted, so I don't want to change it for the Beta version.

Now, why all this explanation stuff? I would like to see some new .map/.lws files we can use so we have different planets in the background. We can have/use as many .map files as we want. a different .map requires absolutly no change to the pog scripts.

When you make a new .map file it needs to be put in the list in StarWarsA1/geog/multiplayer_clusters.ini.
The .map file and it's .lws go in the directory StarWarsA1/geog/multiplayer. To try the map out just change the map url in the map.ini file for the game you want to use it in.
Map.ini files are in StarWarsA1/multiplayer/maps

(Remember to always change stuff in the StarwarsA1 directory and then use the install batch file to update the game files in the resource directory)

Any questions? When do we get a new .map with a cool planet[?]














Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
18 years 9 months ago #13514 by Second Chance
Replied by Second Chance on topic Maps
Awsome! Thank you, MT. This info is a huge help. I'll start getting some maps ready for multi-player.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
cartoons.sev.com.au/index.php?catid=4
.

Please Log in or Create an account to join the conversation.

More
18 years 4 months ago #14497 by Second Chance
Replied by Second Chance on topic Maps
Oops! Forgot about this, too. I'll get started right after the holidays. Sorry I got so lackadaisical about things.

mailto:second_chance@cox.net
The Ultimate Guide To Modding: I-War 2 - Edge Of Chaos
.

Please Log in or Create an account to join the conversation.