Game resources

July 4, 2022

Game resources

Map

New map

The editor supports the creation of multiple different maps, and the objects in each map are independent of each other. The multi-map mechanism can easily realize functions such as scene jumping and copying.

When creating a new game project, a map named “Map 001” will be created by default. If you want to create a new map, pleaseOpen the map list in the game resources panel and click the “New Map” button

If you don’t find the button, click the button in the image below to return to the map list. )

Toggle map

in the map listdouble clickA certain map, you can enter the editing of the map.

delete map

in the map listright clicka map, you can delete the map.

map properties

Select the map object (ie the root node) in the resource tree, then you can set the properties of the map in the property panel.

Attributes Features block item non-block items
map name The name of the current map, the name only as a display name for the map, when calling the map through code, etc., you need to use the id of the map (right-click on the map object and select “Copy id” to get the id of the map).
Blocks in the map can be broken When checked, players can smash blocks in the current map during the game. When not checked, the blocks in the current map cannot be broken. ×
map fog Set whether to display the fog effect in the map, as well as the range, intensity, color, etc. of the fog. ×
death frontier The death boundary specifies the movement space of all units in the game, if the unit is in thehigh(the Y value of the coordinate) beyond the death boundary, then the unit willsustained damageuntil death.
skybox configuration Skybox switching method: Set whether the skybox switches automatically with the passage of time. The “time” here refers toIn-game scene time(you canGame settingsSet whether to lock the scene time in ).

Skybox map: The skybox consists of 6 pictures, corresponding to the 6 directions of up, down, left, right, front, and back. Although the editor does not limit the size of the skybox map, in order to achieve a better display effect, it is recommended to use a size of512*512picture of.
If you set the skybox to switch over time, you need to set the skybox map displayed for each time period.

Switching moment: Every time the scene time reaches this moment, it will switch from the skybox texture of the previous moment to the skybox texture of the current moment.

Switching time: Set the time required to switch the skybox texture (referring to the scene time in the game).

skybox rotation speed Sets how many degrees the skybox rotates around the Y axis per second. Positive values indicate clockwise rotation, and negative values indicate counterclockwise rotation.

Map Object Management

Introduction to Resource Tree

When opening a map for editing, the game resource panel will automatically switch to the resource tree interface. In the resource tree, it will be displayed in a tree structureAll objects in the current map, including units, parts, constraints, etc.

Selecting an object in the resource tree is the same as selecting it in the scene, but it is easier to manage and organize objects in the map through the resource tree, such as copying and pasting, renaming, deleting, etc. you can passright-click menuto perform the operations supported by this object.

locking

When there are many objects, they often overlap each other and cannot select a specific object accurately, and the locking function can solve this problem very well. When locking is enabled on an object, thenThe object cannot be selected with a mouse click in the scene

hide

Click in the resource tree“Eye”button, you can switch the display and hide state of the current object. When the object is hidden,the object will not be displayed in the scene, nor can it be selected by mouse clicks in the scene

Region

Region Introduction

Region can be easily detect entities entering or leaving a space, when the entity enters and leaves the region, the corresponding event will be triggered. Usually, the region can be used to make functions such as portals and safe regions.

Currently only cuboid shaped regions are supported:

Regions consume a lot of game performance, please avoid abusing regions.

New region

The button to create a new region can be found at the bottom of the game assets panel:

Click the New Area button, then move the mouse to the scene window, you can see that the area to be placed will move with the mouse. At this point, click the left mouse button to place the area at the position specified by the mouse.

Adjust region size and position

Once the region is placed in the scene, the zoom axis is displayed by default, and you can drag the zoom axis to modify the size of the region. In addition to this, you can also activate the move tool in the toolbar to adjust the position of the region.

    

Region properties

Select the region object in the world tree, you can view and set the properties of the region in the property panel.

Attributes Features
name The name of the current region, the name only as a display name for the map, when calling an area through code, etc., you need to use the id of the area (right-click on the area object and select “Copy id” to get the id of the area).
Location The world coordinates of the region (the coordinates of the region are expressed in terms of the coordinates of the center point of the region).
size The length, height, and width of the region.
Rotate the camera When the player enters the area, the player’s perspective can be rotated to a specified angle.

Enable rotating camera: Set whether to enable the function of rotating the camera.

Rotation Time: Sets the time it takes for the player’s camera to rotate from the current angle to the specified angle.

Pitch Angle: Set how many degrees to rotate the pitch angle of the player’s perspective when entering the area.

Horizontal Angle: Set how many degrees the horizontal angle of the player’s perspective needs to be rotated when entering the area.

Regional perspective When the player enters the area, you can specify that the player can only use a certain perspective mode, and when the player leaves the area, it will return to the original perspective mode.

Enable Area View: Set to enable the ability to switch the camera after the player enters the area.

Camera Type: Sets the camera mode to apply when the player is in the area.

Other properties: please refer to the game settings Viewing angle settings

Edit Events Use visual programming to edit the logic after the area triggers an event. Currently, the events supported by the area are: “When the unit enters the area”, “When the unit leaves the area”.