The weekly newsletter for Fed2 by ibgames

EARTHDATE: April 10, 2011

Official News page 2


THE TECHNICAL DETAILS OF MOBILES

by Hazed

Although I am using the word "mobile", in fact there is no difference in Fed2 between an object and a mobile. We're talking about an object that happens to move, but traditionally in previous versions of the game that meant it was called a mobile, so let's stick with that term.

If a mobile has been designed to move then here's how it works. When the game fires up after reset, the mobile will be sitting in the start location. After the appropriate time which the PO has specified, when it is time to move, the game will randomly select a direction to move it in from the eight compass directions (it ignores up and down, in and out). If there is no exit in the direction it chooses, the mobile will not move. It will also remain stationery if the selected direction would take it to a location outside the high and low limits that have been put on its movement range.

If the direction is permissible, the mobile will move to the new location. It will then wait for the interval determined by its speed, then do it all over again. You will be told if a mobile moves into your location or leaves it.


Designing a Moving Mobile

If you want to add a moving mobile to your planet, you use the object editor to design it. You provide the same information you would for any object - name, description, ID, start location and so on. A mobile can only move around on one map, so the object file should be the one that goes with the map in question. For example, a mobile for planet Bodville would go into the object file bodville.xob. If you wanted a space mobile you'd put it into the file space.xob. You can't make your mobile jump from one planet to another.

You can only make an object or mobile move if it is designated as Static. I know, that sounds strange, but if you set the object type as Dynamic it will mean people can pick the mobile up and carry it away, which would cause terrible problems; neither can a moving mobile be abstract because it has to be present in the game as a real item from the reset, rather than be created by events. So Static it is, even if that doesn't make sense. It's a moving static object!

The fields which related to movement are labeled Speed, Low and High. Low and High set the boundaries of the area the mobile will move around in, and Speed sets the speed it will move.

There is a grid labeled Movement which is still not implemented, so ignore that for now.


Setting the Movement Boundaries

If you want your mobile to move, look at the map and decide on the area through which you want the mobile to move, then type in the lowest numbered location into the Low field, and the highest numbered location into the High field. You also need to set the Start location which should be somewhere within the movement area. If you don't set that, the mobile will start off in your storeroom, and never be able to get out.


Setting the Speed

To set the speed, you type a number into the Speed field. It defaults to zero which means the mobile will never move. The speeds are in increments of 10 seconds. Type 1 to make the mobile move every 10 seconds, 2 for 20 seconds, and so on. 6 means it will move every minute. There's an upper limit of 1000 on the speed - that's approximately 2.7 hours which you would think is slower than the slowest snail. (That means the mobile will move eight times in a 24 hour game session.)

You need to think carefully about what speed you set. 10 seconds is not a lot of time, and the mobile will zip in and out of locations before players have a chance to notice them, let alone do anything with them. Even if all they can do is examine the mobile and read the description, 10 seconds means they will need fast reflexes. So unless you want to make the mobile uncatchable, slow it down!

If you intend the player to have extensive interaction with the mobile, such as a conversation, you need to make it very slow. It would be extremely frustrating to have the mobile suddenly walk off in the middle of a chat. How rude!


Movement Consequences

There are some things you need to consider when you decide which bits of your planet you want the mobile to move around in:

  • If there is only one exit from a location there's only a one in eight chance that the mobile will move, so it could end up staying in the same place for a while.
  • The mobile might spend a while moving backwards and forwards between two locations, if the random selections happen to work that way.
  • If you have one-way movements a mobile might be able to go into a location but not get out again, so get trapped.
  • There is a chance that a mobile will never visit some areas of the map even if the numbers do fall within the range, because the random movements might always turn it back before it gets there.
  • If there is no connection between areas of the map, or if the connection falls outside the range, the mobile won't ever get there.

As well as making your mobiles move, you can add events to them to make them do all the things that you can do with objects. See the mobiles in Sol for examples!


Fed2 Star index Previous issues Fed 2 home page