Celestial Objects

From HSpace

Jump to: navigation, search

Contents

Celestial Objects

Everything in HSpace is represented as an HSpace object. There are a variety of types that these objects can take. As of version 4.4.0, the following objects are supported: Ships, Missiles, Planets, Wormholes, Black Holes, Nebula, and Asteroid Belts. See ‘HS-TYPES’ for the current list of types and type identifiers. Each type of object contains a core set of attributes common to all objects and may contain additional attributes that specify details specific to only that type. The core set of object attributes are the name of the object as viewed from space, its size from 1 to n, the X, Y, and Z coordinates of the object, and the universe identification number of the universe it belongs too.

Additionally, HSpace provides support for multiple universes and territories within those universes. All objects must belong to a universe. It is common to have at least two universes: One for the actual space environment and another for simulators where player’s can practice their piloting skills without being killed in combat.

Universes

Since every HSpace object must belong to a Universe, it is the logical starting point for construction the space environment. A single room represents every universe. Thus, a room must exist for every universe. This room is used for when ships are actively flying through space. Administrators can also look at the contents of the room to determine what objects are active in that particular universe. Games can have one or as many universes as they deem appropriate.

To create a universe, first dig the room that will represent it.

@dig Space Room

Note the DBREF of the room after the command completes. The DBREF is needed when adding the universe into the HSpace system. To add the universe to HSpace, do the following:

@space/newuniverse <room dbref>

You can use @space or @space/list universes to verify the new insertion. Beware, you must not delete the room representing the HSpace universe. Doing so will cause the HSpace system to fail.

Universes can also be removed from the HSpace system. To be removed, the Universe must no longer contain any HSpace objects. Follow the instructions for deleting other object types prior to deleting the universe. Once all objects are removed, do the following:

@space/deluniverse <universe id>

The <universe id> can be determined by using @space/list universes. After the universe is removed from HSpace, the room representing the universe can also be purged with @destroy. Celestial Bodies: Planets, Wormholes, Black Holes and Asteroids Having a universe is all well and good and quite necessary, but without something in the universe, its just a big blob of three dimensional space. The next step is to insert the HSpace objects that exist within our new universe. These objects are the suns, planets, moons, etc. that make up the space environment.

HSpace does not contain representations for galaxies or solar systems. Those can be accomplished by the X,Y,Z coordinates of the suns, moons and planets. Depending on your needs, you may have only a few celestial objects in your universe. This could be a simple solar system or a dozen galaxies with a dozen solar systems. Similarly, HSpace does not differentiate between planets and suns. Suns are essentially just large planets.

Considering you’ve read this far, I’ll assume you have some idea of what space will contain. Throughout the rest of this example, I’ll use the Earth’s solar system as its easy to visualize for us mere humans. Many games, however, will not use Earth based systems so this is merely an example.

Earth is in the Milky Way galaxy. It is in a solar system with 9 planets, several with one or more moons orbiting around the Sun. A black hole is at the center of the galaxy. An asteroid belt lies between Mars and Jupiter. Throughout the galaxy are many more stars: some with planets, some without. One or more Nebulae may be spread throughout the galaxy.

Planets

Yeah, yeah, you know all that already so let’s place them into our new universe. First off, every object to be inserted into HSpace must also be represented by an actual game object. Thus, it is necessary to first create the game object that will represent the HSpace object in the MUSH server. These objects are THINGS in MUSH terminology and created via @create. HSpace does not create the game object for you.

So, do the following:

  • @create Sun
  • @create Mercury
  • @create Venus
  • @create Earth

And so on for all the objects you plan on inserting. You can do these one at a time if you so choose. Keep track of the DBREF’s of each object as they will be needed for the next steps. Now the objects need to be inserted into HSpace. To do this, the @space/addobject command will be used. @space/addobject requires two arguments: the thing to be inserted and the type of object to be added. The thing is the object created above and the type is the HSpace type identification number. See HS-TYPES for a current list of identification numbers. As we are adding planets, the type will be 3. Do the following to insert our new planets.

  • @space/addobject sun=3
  • @space/addobject mercury=3

Continue along for each new planet. To see a list of the current contents of HSpace, you can use @space/list again. Since planets are being added, it is useful to just list just that type by: @space/list objects/0=3

This lists all objects in Universe ID 0 of type 3. By default, @space/addobject will insert new objects into Universe 0 at the X,Y,Z coordinates of 0,0,0. It also provides a default name for the new objects. Having everything globbed together at the center of the universe with no relevant names isn’t likely what you want. To adjust positions, names, and universes, the @space/set command comes into play. @space/set is used to change the attributes associated with all HSpace objects. For the new planets, start by modifying the core attributes: name, coordinates, size and universe ID as appropriate. For example:

  • @space/set Earth/name=Earth
  • @space/set Earth/size=3
  • @space/set Earth/x=5000
  • @space/set Earth/y=9500
  • @space/set Earth/z=0
  • @space/set Earth/uid=0

The name is the name of the object as it appears in space. It can be different from the actual game object’s name or it can be the same. Size is the size of the object in space from 1 to n where n is the maximum value chosen for your game. Size affects how far away sensors on space vessels can detect the object. X, Y, and Z are the three-dimensional coordinates of the object. You can decide the layout of your 3D space as appropriate to your game. Finally, the UID is the universe ID to which this object belongs. The UID is the number shown in @space/list universes. If you only have a single universe, 0, you do not need to change the UID of the object as it will be placed into that universe by default. If you have multiple universes, this needs to be set appropriately for each object.

Repeat the above for each object you want in this first universe. You can verify the changes using the @space/list objects/0=3 as noted above. As with all intensive building, you may want to save the game frequently with @dump to preserve changes in the event of a crash. @dump automatically calls the save routines for HSpace as well as the game.

Planets can be inhabited or uninhabited. If a planet is to be inhabited, one or more landing locations should be added. Landing locations are described later in the document.

Asteroid Belts

Asteroid belts are created identically to the example of the planets above with a type ID of 7. Asteroids have one additional attribute: Density. Density refers to the amount of space occupied by the asteroids in the area from 1 (default) to 100 percent.. Ships can be damaged when within the region encompassed by the asteroid belt. The region is determined by the size of the object * 100 centered around the object’s 3D coordinates. Damage is randomly determined based on the density and size of the asteroid belt along with the speed of the target ship. You can see the current list of asteroid belts with @space/list objects/0=7.

An Example:

  • @create Kepler A
  • @space/addobject Kepler A=7
  • @space/set Kepler A/size=5
  • @space/set Kepler A/density=20
  • @space/set Kepler A/x=23000
  • @space/set Kepler A/y=-4320
  • @space/set Kepler A/z=-7623
  • @space/set Kepler A/uid=0

Black Holes

Black holes are identified in HSpace as object type 5. They have only the standard attributes but have the side-effect of dragging space vessels into their gravitation field. A black hole will pull any ship within its size *100 into it causing damage to the vessel. Damage varies from 0 at the edge of the gravitational field to 1000*size at the center. Insertion is identical to planets with the exception of the type ID number being a 5.

Nebulae

A nebula is a collection of gas or dust in interstellar space. Nebulae have two additional attributes in addition to the standard set: DENSITY and SHIELDAFF. Density is identical to that of asteroids and defaults to 1. SHIELDAFF is a floating-point percentage value from 0.00 to 100.00. It determines how effective a ship’s shields are while within 100*size of the nebula. Nebulae are inserted into HSpace just like planets but with a type ID of 6.

Wormholes

Wormholes are two black holes with an immense gravitation field between them. This field is so intense it folds the fabric of space and time, creating a passage from one point in space to another. Wormholes have a stability value, as a percentage, which represents the chance of successfully gating the wormhole. Failure to gate results in the destruction of the ship. Wormhole gating can move a vessel either from one point to another within a universe or between universes. Wormholes have the following attributes in addition to the standard ones.

BASESTABILITY: The percentage around which the stability of the wormhole fluctuates. STABILITY: The current stability percentage for the wormhole. FLUCTUATION: The margin within which the stability fluctuates. DESTX: X coordinate of the destination DESTY: Y coordinate of the destination DESTZ: Z coordinate of the destination. DESTUID: The UID of the destination universe.

All additional attributes default to 0. For example if the basestability and stability of 50.0, a ship would have a 50% chance of successfully gating through the wormhole. If the fluctuation were 10.0, the stability would vary between 40-60% chance of success. The current stability value is determined randomly at the time the ship attempts to gate through the wormhole. Wormholes are represented in HSpace as type 4 when inserted with @space/addobject.

Summary

All celestial objects are represented by both a game object created via @create and an HSpace Object inserted with @space/addobject and can be removed with @space/delobject. A type ID represents HSpace objects. This type is taken from the HS-TYPES list, when added into the space system. All Hspace objects have a core set of attributes that can be set. Some celestial object types have additional attributes that can be set as well. Attributes on HSpace objects are modified with @space/set. Once a game object is inserted into space, it should not be deleted unless @space/delobject is used prior to destroying it.

Views
Personal tools