[Mote-dev] Allegiances - alliances and maps
Status: Pre-Alpha
Brought to you by:
edwinb
|
From: Stephen Q. <st...@ja...> - 2001-04-25 19:44:45
|
*** Allegiances - Defining strategic alliances and the game map. *** One of the main parts of the plot definition that will be needed for a game is the strategic alliances that will exist between different solar systems, planets, space stations, etc.. These alliances will be immensely useful in determining trade routes, the outcomes of wars, and just generally whether a system will welcome a player's ship with open arms or guns blazing! The definition of an allegiance has a two-fold purpose. Firstly it is to define the properties of this allegiance, i.e. what the people are like, for example, who are their friends and enemies. Secondly, to define the layout of the game map, if you want a map that looks like a Monopoly board or a map of Britain, it can be done! At this point i want to describe mainly how to define the game map. Basically i am just doing this bit as i don't know too well what the defining qualities of an allegiance will be, we need plot people to discuss this, hint, hint... Note that we consider our galaxy to be 2 dimensional, everything is occurring in an X,Y plane. In the same way all objects orbiting about another are doing so in the same X,Y plane. This may seem a bit boring and unphysical but it isn't really necessary for the game play to be able to jump out of the plane. When you define an allegiance you list all the areas of the map that are within this alliance. You do this by use of geometrical shapes, such as ellipses and rectangles, or with a user defined shape where you list all the vertices. If you want a complicated shape for a region such as an 'L'-shape you can achieve this by defining two rectangles that are contiguous. One of the nice things that comes from writing this in XML and then converting into Perl is that all this is done before game run time so there is no performance hit for having complex shaped allegiance regions. So design away to your heart's contentment! When you define a region you also set the number of solar systems in that region, thus you can control the density/scarcity of systems in an area. It is also quite possible to define the same region or part of it as having different allegiances, you will then get a blend of solar systems in that area according to the numbers of systems you specified. Thus border areas can become quite interesting with regular small wars breaking out between the neighbouring solar systems. As the game progresses it will be possible for solar systems to change allegiance either by choice or conquest. It will not really be possible to have planets/moons with mixed allegiance. We are really considering a planet/moon to be the smallest unit in this game. It will be possible to have mixed allegiance solar systems, but no smaller than that, think of a planet/moon as like a city on Earth. We tend to expect all of a city to be one allegiance, think of planets that way. ** Defining Regions ** When we define a region we use normalised X,Y (or radius) coordinates. There is a standardised Mote length, which you can change if you wish. This length equates to an X or Y offset of unity, i.e. 1. You may wish to set the length so that -1 is one edge of your square galaxy and +1 is the other edge. This is not required though and a galaxy can be of any normalised size. Regions are defined via one of five methods, either by specifying a rectangle, an ellipse, an annulus, a slice or a general polygon. *Rectangle* A rectangle is defined by the range in the X and Y axes, so you specify the bottom left corner (X1,Y1) and the top right corner (X2,Y2). As stated above you could build up other shapes by combining a number of contiguous rectangles, e.g. an 'L'-shape. *Ellipse* An ellipse is specified by its central coordinates, (X,Y), the lengths of its major and minor axes, A,B, and it's position angle, W. A circle is just a simple example of an ellipse. *Annulus* An annulus is specified by the central coordinates, (X,Y), the lengths of the major and minor axes A,B and the position angles, W, for the inner and outer ellipses. An annulus is basically the bit between two ellipses. This could be very useful if you want to define a region that is located around the rim of an elliptical shaped galaxy. By having total freedom to define the two ellipses you could of course create even stranger shapes... *Slice* A slice is, as its name suggests, like a slice of pizza in shape. You define the starting and finishing points of one straight side of the slice (X1,Y1) (X2,Y2) and the angle through which to turn to get to the other straight edge, W. You could use this, for instance, if you wanted a circular galaxy that is split into four quadrants. *Polygon* This is the most general shape of the lot and lets a writer create any crazy shape they like. You just make a huge list of all the vertices, i.e. X1,Y1,X2,Y2,X3,Y3,X4,Y4,...,XN,YN. I will sit down with xfig and make up loads of examples to demonstrate the use of these different styles, and also show how to combine them to make the sort of maps people will want. I will then stick them up on the Mote website alongside these notes. By using these regions a map is built up of the various allegiances. This is the map of the universe in which the game will take place. You can thus create any shape or design of map you like. If you want to create sectors of space that contain solar systems that belong to no-one all you have to do is create an allegiance type of "none" and define the regions where no allegiances apply. **Some example code** OK, so we have stated how to specify regions of allegiance in general terms, now let's see how to specify them via the XML. Here's a simple example set of allegiances: <ALLEGIANCE NAME="Wales"> <FRIEND NAME="Ireland" LIKE="5"/> <FRIEND NAME="Scotland" LIKE="5"/> <ENEMY NAME="England" DISLIKE="10"/> <REGION TYPE="RECT" X1="0" X2="-1" Y1="0" Y2="-1" NUMBER="8"> </REGION> </ALLEGIANCE> <ALLEGIANCE NAME="Scotland"> <FRIEND NAME="Ireland" LIKE="6"/> <FRIEND NAME="Wales" LIKE="4"/> <ENEMY NAME="England" DISLIKE="10"/> <REGION TYPE="RECT" X1="0" X2="1" Y1="0" Y2="1" NUMBER="12"> </REGION> </ALLEGIANCE> <ALLEGIANCE NAME="Ireland"> <FRIEND NAME="Wales" LIKE="6"/> <FRIEND NAME="Scotland" LIKE="7"/> <ENEMY NAME="England" DISLIKE="10"/> <REGION TYPE="RECT" X1="0" X2="-1" Y1="0" Y2="1" NUMBER="5"> </REGION> </ALLEGIANCE> <ALLEGIANCE NAME="England"> <FRIEND NAME="Ireland" LIKE="4"/> <FRIEND NAME="Wales" LIKE="4"/> <ENEMY NAME="Scotland" DISLIKE="10"/> <REGION TYPE="RECT" X1="0" X2="1" Y1="0" Y2="-1" NUMBER="20"> </REGION> </ALLEGIANCE> This specifies four allegiances, one for each quadrant of a square, i have defined how each allegiance feels towards the others. We have two types here FRIEND or ENEMY, along with each is a LIKE or DISLIKE indicator which shows the level of this friendship or enmity. With this you can see that friends do not have to feel the same level of friendship towards each other, 0 would be "no thought on the subject" and 10 (the maximum) would be "absolutely". You will notice that REGION is set up as a container, this means it is possible to add many other things into this region. For instance AI ships, plot devices, etc.. All that will be covered later on when i get around to writing that bit up. The NUMBER attribute for REGION is the number of solar systems that are contained within that area of that allegiance type. Here endeth the lesson, or somet' like that... |