Documentation/Articles/Overview of Game Object Editor
From NeoAxis Engine Wiki
| Language: | Status: | Approved |
Overview
Game Object Editor is a part of Resource Editor and is used for creating and editing game objects (.type files). A game object is an object of a specific class with specified properties. Anything in the game world is a game object, including player character, vehicles, buildings or trees. Properties of a game object may include appearance, physics model, sounds, etc.
Some properties are implemented as System of Attached Objects, such as the appearance property. Systems of attached objects enable attachment of various resources to an object. For example, after a mesh is attached to an object, this object will look like that mesh. You can also attach sound, thus making the object produce that sound.
Learn more about Game Object System.
You can also read the following articles on creating game object types:
Editor configuration
Press the Options button in the Tools menu and then select Entity Type Editor in the Editors list to configure Object Editor.
Editor parameters:
| Parameter | Description |
|---|---|
| Background Color | This parameter is used for background color adjustment of the work window. You can specify color values in RGBA mode (Red, Green, Blue, Alpha (transparency)) (Each color has a 0-255 range) or use the color selection tool.
Note - Background is only visible when Sky Box is not used. |
| Show Axes | If this parameter is set toTrue axes will be displayed. This may be useful when positioning objects on the map. |
| Show Grid | If this parameter is set toTrue the grid will be displayed. The default length of a cell is 1 meter. Grid may prove to be usefull for object scaling. When editing physic models grid is also a kind of floor preventing objects from falling down. |
| Sky Box | This parameter is used for changing skybox (sky) displayed at the editor background. |
After having finished with editor configuration press OK to save the changes or Cancel to cancel all changes.
Editor windows overview
Now, let’s have a look at the windows of the Game Object Editor.
The following fields are marked with numbers:
- 1 – Attached objects list.
- 2 – Properties window.
- 3 – Bottom panel.
- 4 – Working window.
- 5 – Upper panel.
- 6 – File tree.
Working window, Upper panel and Files tree are integral parts of Resource Editor and do not require any specific presentation. Fow this reason we will concentrate on the first three elements of the Game Object Editor.
Attached objects list
Attached Objects List enables selection of attached objects in order to change their parameters.
Attached Objects List also has a context menu with the following option available:
- Select. If an object is selected in the Attached Objects List this parameter switches the working window to the object selection mode.
- Move. If an object is selected in the Attached Objects List this parameter switches the working window to the object movement mode.
- Rotate. If an object is selected in the Attached Objects List this parameter switches the working window to the object rotation mode.
- Scale. If an object is selected in the attached objects list this parameter switches the working window to the object scaling mode.
- Attach Object. This option enables attachment of new resources to game objects. We will be dealing with attached objects in this chapter in detail.
- Delete. If an object is selected in the attached objects list this parameter deletes the object.
Properties Window
The Properties Window is used for changing type parameters. Most operations of the development process are performed through this window.Bottom panel
The Bottom Panel provides additional options for type editing. The list of its functions includes:
Edit Physics Model button. If a physics model is assigned to a game object the Physics Model Editor will be started.
Show Physics checkbox. If this one is checked, attached objects are displayed with the physics model of the game object.
Show Invisible Objects checkbox. If this one is checked, invisible attached objects are displayed. Invisible object is any object with the Visible parameter (of the General list) set to False.
Filter Objects By Alias combobox. Displays objects only with specified alias (Alias parameter in the General list of attached object's parameters). The list includes all objects aliases including the following entries:
- No filter – displays all objects,
- Without alias only – displays all objects without aliases.
Game object parameters
Game object type is a set of parameters. In order to create a new game object type you have to specify these parameters. The set of available parameters depends on the object class. Object class determines what set of parameters will be available in the editor.
Classes are inherited from each other, thus, forming a class tree. Entity class is the basic class for all classes. Most game classes are based on the MapObject class. You can find all game object classes with their descriptions on this link.
Entity class parameters:
| Parameter | Description |
|---|---|
| AllowEditorCreate | If this parameter is set toTrue, object of this type can be created in Map editor. |
| AllowEmptyName | If this parameter is set to True, object of this type can have an empty name. |
| NetworkType | Determines the way object operates in network. |
MapObject class parameters:
| Parameter | Description |
|---|---|
| AttachedObjects | Attached objects list. One of the key parameters for a game object type. Attached Objects List contains various types of resources, game object consists of. Read the next part to learn more about the types of attached objects and their parameters. |
| DieObjects | List of objects that appear after object has been removed. For example, a particle system implementing an explosion can be a tank’s DieObject. Thus, there will be an explosion after a tank is destroyed. |
| PhysicsModel | Physics model of a game object |
Attached objects
Such properties as appearance for example are implemented via the attached objects system. This system enables attaching various resources to the object. For example, attaching a certain mesh will make the object look like that mesh. You can also attach a sound to make the object produce that sound.
The AttachedObjects list in the MapObject parameter section is responsible for attached objects. You have to edit this list to add or delete any attached object.
You can also attach an object to a game object type. To do this, right-click on the editor window, select the Attach Object menu and specify an object type to attach. An object with default parameters will be added. In order to adjsut object parameters select the attached object and proceed to the AttachedObjects list The following objects can be attached:
- Mesh (three-dimensional model),
- Particle (particle system),
- MapObject (game object),
- GUI (user interface),
- RibbonTrail (ribbon trail),
- Light (light source),
- Billboard (flat object facing the camera),
- Sound (sound),
- Helper (auxiliary object).
We will deal with all attached object types in detail below.
General parameters of attached objects
Parameters of any attached object can be split in two groups: basic (General) and special ones. Basic parameters are the same for all object types when special parameters differ depending on the object type.
Basic General parameters list:
| Parameter | Description |
|---|---|
| Alias | Alias of the object. It can be used for filtering objects according to this criterion. |
| Body | Name of the body to attach the object to. |
| BoneSlot | Name of the skeleton bone to attach the object to. |
| OnlyForEditor | If this parameter is set to True, the object will be visible in editors only. It will not be created in the game. |
| Position | Object's shift relative to game object's position. |
| Rotation | Object's rotation relative to game object's rotation. |
| Scale | Object scaling. |
| Visible | If this parameter is set to True, the object will be visible. |
Mesh (three-dimensional model)
Attached three-dimensional model that determines object's appearance.
Mesh parameters list:
| Parameter | Description |
|---|---|
| BoneSlots | List of bones, other objects can be attached to. |
| CastDynamicShadows | Turns on/off dynamic shadow generation for this object. |
| CastStaticShadows | Turns on/off static (lightmap) shadow generation for this object. |
| ForceMaterials | With this material you can specify an alternative material for the mesh. |
| LinkBonesToBodies | If this parameter is set to True, bones will beattached to the bodies. |
| MeshName | Mesh file name. |
| ReceiveStaticShadows | This parameter enables shadow rendering at this object. If the parameter is ON, other objects' shadows will be drawn at this object. |
| RenderingDistance | With this parameter you can specify the distance at which the object is invisible. If this paremeter is set to 0, object will always be rendered. |
| RenderingDistanceForShadows | With this parameter you can specify the distance at which object's shadow is invisible. If this paremeter is set to 0, object's shadow will always be rendered. |
| UseOwnerScale | If this parameter is set to True owner scaling is used for the game object. |
Physics parameters list:
| Parameter | Description |
|---|---|
| Collision | Turns on/off object's processing when calculating collisions. |
| CollisionMaterialName | Physics material. You can chose one of 4 values - Metal, Wood, Rubber, Ice. This parameter affects physical bodies interaction properties. |
| CollisionSpecialMesh | With this parameter you can change collision geometry for this object. Use this parameter to speed up calculation of complex physical objects. On collision the mesh from this parameter will be processed, the mesh specified in the MeshName parameter will be visible, though. |
Particle (particle system)
Attached particle system.
Particle parameters list:
| Parameter | Description |
|---|---|
| OwnerRotation | With this parameter set to True, owner rotation of the game object is used. |
| ParticleName | Particle name |
| RenderingDistance | With this parameter you can specify the distance at which the particle is invisible. If this paremeter is set to 0, particle will always be rendered. |
| RenderingDistanceForShadows | With this parameter you can specify the distance at which the particle shadow is invisible. If this paremeter is set to 0, particle shadow will always be rendered. |
| StartTime | The moment of particle activating after it’s creation. |
| UpdateWhenItNotInView | ifthis parameter is set to True, the particle is updated even if it is invisible. |
MapObject (game object)
Another attached game object.
MapObject parameters list:
| Parameter | Description |
|---|---|
| ChildBody | Body name of the attached object. |
| DetachOnOwnerDestroy | If this parameter is set to True, object will be detached if the owner is destroyed. |
| Type | Attached game object type (Entity). |
Gui (user interface)
Attached user interface.
Gui parameters list:
| Parameter | Description |
|---|---|
| AspectRatio | Aspect ratio of displayed user interface. |
| DrawFromBackSide | If this parameter is set to True, user interface will be visible from behind. |
| RenderingDistance | With this parameter you can specify the distance at which the user interface is invisible. If this paremeter is set to 0, user interface will always be rendered. |
RibbonTrail
RibbonTrails can be used for multiple purposes.
ShotgunGravityBullet.type located in the "Data\Types\Bullets\ShotgunGravityBullet" directory is the example of using RibbonTrail. Alternative (right mouse click) fire mode of the Shotgun in Game.exe is implemented using the ribbon trail.
RibbonTrail parameters list:
| Parameter | Description |
|---|---|
| CastShadows | Turns on/off shadow generation for the object. |
| Chains | List of chains making the trail’s shape. |
| LifeTimeAfterDestroy | Trail’s lifetime after REMOVAL. |
| MaterialName | Material applied to the object and setting the ribbon trail's appearance. |
| MaxChainElements | Maximal number of ribbon trail elements (the larger the number is, the smoother the trail looks). |
| RenderingDistance |
With this parameter you can specify the distance at which the trail is invisible. If this paremeter is set to 0, the trail interface will always be rendered. |
| TrailLength | Trail length. |
Let’s have a look at the Chains parameter which determines the trail shape. Press the "..." button of this parameter to move to chain edit mode.
Each Chain has four parameters:
| Parameter | Description |
|---|---|
| ChangeColor | End color of ribbon trail . |
| ChangeWidth | End width of ribbon trail . |
| InitialColor | Initial color of ribbon trail . |
| InitialWidth | Initial width of ribbon trail . |
Trail color gradually changes from InitialColor to ChangeColor as long as the trail is visible. The same happens with the ribbon trail width: it gradually changes from InitialWidth to ChangeWidth.
Light (light source)
Attached light source.
Light parameter list:
| Parameter | Description |
|---|---|
| AllowStaticLighting | Enables static lighting (lightmap) calculation. If this paramer is set to True this light source will be used when calculating static lighting. |
| AttenuationFar | Fade out distance of the light source. |
| AttenuationNear | Distance at which light spread starts. |
| AttenuationPower | Light fading factor. |
| CastShadows | If this parameter is set to true True, all objects blocking this light cast shadows. |
| CustomShaderParameter | Shader SPECIFIC parameter. |
| DiffuseColor | Light source color in RGBA (0..255 values of three components: red, green, blue and alpha (transparency)) |
| DiffusePower | Brightness of light. |
| FFPAttenuationConstant | Fading factor which is a multiplier affecting other light fading parameters. |
| FFPAttenuationLinear | Linear fading. This parameter determines the value of light fading when the distance to the illuminated object increases. Linear function (first-order function). |
| FFPAttenuationQuadric | Quadratic fading. This parameter determines the value of light fading when the distance to the illuminated object increases. Quadratic function (second-order function). |
| LightType | Light source type. You can chose from three values: Point, Directional, Spot (conical). |
| SpecularColor | If the SpecularColor parameter or the SpecularMap parameter are used in the illuminated object, this parameter predetermines specular light color of that object. The range of values is from 0 to 255 in the RGBA color model. |
| SpecularPower | The parameter determines specular light intensity on the surface of the illuminated object. The range of values is from 1 to 10. |
| SpotlightFallof | This parameter determines light fading from internal to external cone. The more this value is, the smoother fading is. Maximal value is 1. This parameter works only for the Spot light source type. |
| SpotlightInnerAngle | This parameter determines the inner cone width – the intensity of light concentration near the center. The difference is visible only when the SpotlightFalloff parameter is more than minimal value.
If the SpotlightInnerAngle and the SpotlightOuterAngle parameters have the same values, the effect is the same as if the SpotlightFalloff value is minimal. |
| SpotlightOuterAngle | This parameter determines inner cone width of a light ray. The range of values is from 0 to 180, with the value 180 for the widest beam of light. |
Billboard (flat object facing the camera )
Attached billboard.
Billboard parameter list:
| Parameter | Description |
|---|---|
| BillboardType | Billboard type. You can select from five values: Point, OrientedCommon (directed and rotated by the CommonDirection vector), OrientedSelf (directed and rotated by its own vector), PerpendicularCommon (perpendicular to the CommonDirection vector), PerpendicularSelf (perpendicular to its own vector). |
| Color | Billboard color in RGBA. |
| CommonDirection | Vector directing the billboard. This parameter is only required for OrientedCommon and PerpendicularCommon types. |
| CommonUpVector | Vector describing billboards ‘up’ direction. This parameter is only required for PerpendicularCommon and PerpendicularSelf types. |
| FadeVelocity | Billboard fading speed when the object is invisible. |
| MaterialName | Material name. |
| RenderingDistance | With this parameter you can specify the distance at which billboard is invisible. If this paremeter is set to 0, billboard will always be rendered. |
| Size | Billboard size. |
Camera Visibility parameter list:
| Parameter | Description |
|---|---|
| CameraVisibleCheck | If this parameter si set to True, object visibility check will be performed. If object’s center is invisible, the object will not be displayed. |
| CameraVisibleStartOffset | Distance at which the object is visible for the camera. |
Sound (sound)
Attached sound. Used for making game objects produce a sounds.
Sound parameter list:
| Parameter | Description |
|---|---|
| MinDistance | Minimal distance at which the object is audible. |
| Pitch | Playback speed. 1- normal speed, 2 – two times faster. |
| Priority | Playback priority. |
| SoundName | Sound file name. |
| Volume | Sound volume. |
Helper (auxiliary object)
Attached auxiliary object. This object is used at developer’s option. It can be used for specifying the position of something relative to game object position.
Helper objects do not have any special parameters.
Moving, rotating and scaling attached objects
Each attached object has a set of basic (General) parameters. The following three of them are of most importance:
- Position,
- Rotation,
- Scale.
These parameters can be set up from the keyboard and using the desktop window instruments (gizmo). Desktop window instruments are available from the upper panel of the object editor window.
Select an object before moving, rotating or scaling it. You can do it by clicking on the object in the working window or by selecting it in the attached objects list.
Here, you can see picture of editor working window in object moving mode:
in rotation mode:
and in scaling mode:
Attaching objects to BoneSlot
It is often necessary to attach an object to a bone of a three-dimensional skeleton . E.g. attach gun model to character’s hand bone.
For this, you have to do the following two things in Object Editor:
- create a BoneSlot,
- attach an object to the BoneSlot.
BoneSlot is a point in the space connected to one of skeleton bones. Any mesh attached to a game object has the BoneSlots list. Thus, to create a new BoneSlot you need to select the mesh to use its skeleton and press the "..." button in the BoneSlots parameter.
Bone slot list editing window will appear.
Add and Remove buttons are used for adding and removing the bone slot respectively.
Each BoneSlot has 4 parameters:
| Parameter | Description |
|---|---|
| BoneName | The name of mesh bone which is used in this slot. It is selected from the bones list of the attached mesh. |
| Name | Slot name. |
| Position | BoneSlot position relative to the bone. |
| Rotation | BoneSlot rotation relative the bone. |
Once the BoneSlot is created you can proceed to specifying a BoneSlot for this attached object. Select the attached object and and specify the BoneSlot parameter to do that.
As you can see, it is quite easy to attach an object to a BoneSlot.
Creating new game object type
In order to create a new game object type, press right-click on the folder, you want to create a new type in. Press the New Resource button in the context menu.
Now, specify the type of the resource to be created: Enity Type. Press the Continue button.
Finally, specify the name and class of the new game object type. Press the Next button.
A game object type file was created and you can start editing it now.
You can see the following tutorials on creating game object types:
















