The weekly newsletter for Fed2 by ibgames

EARTHDATE: February 20, 2011

Official News page 3


HOW TO MAKE MOBILES MOVE

by Hazed

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 object editor has always had fields on it for movement but they haven't been usable. Now, some of them are. There is a grid labeled Movement which is still not implemented, so ignore that for now.

The relevant fields 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.


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.)

Incidentally, Alan was planning to make the speed increments of 16 seconds, and insist the value was typed in hexadecimal, but I managed to dissuade him from that...

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!


How the Mobile will Move

How the movement works is that when the game fires up after reset, the mobile will be sitting in the start location. After the appropriate time, 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 boundaries set by the high and low values.

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.

This has some implications:

  • 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.
  • 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.

So that's some things for you to bear in mind when deciding which bits of the map the mobile should move around it.

One final thing: mobiles are confined to their own maps - you can't make them move to other planets in your system.


Fed2 Star index Previous issues Fed 2 home page