Overview
This tutorial will get you started in ADLENGINE.Learn the basics, including creating a new map, building rooms and exits, your first objects and interaction.
CREATING A NEW MAP
When you launch ADLENGINE it will load the demo map.
To start a new map:
It will start you at 0,0,0 and will automatically create an empty room that you start in.
CHANGING THE MAP NAME
New maps start with the name “game”. This is because if ADLENGINE detects a game.adlengine file it will be loaded at startup.
You may want to create a separate game or a map to transition to, you can do so by changing the map name.
To change the name of the map:
When you download the map it will download the file as a .adlengine file with the filename the same as the map name. i.e. dungeon.adlengine
CREATING ROOMS
You can build rooms in the following directions.
- n / e / s / w
- ne / nw / se / sw
- u / d
Building a room will only build a room IF a room doesn’t already exist in that direction (to prevent overwriting rooms)
It will also automatically build exits leading into the room and back out.
To build a room:
The above command will build a room to the north, along with an exit into the room (north) and an exit back out (south).
The location data reads, X, Y, Z
x = east / west
y = north / south
z = up / down (i.e. floors)
EDITING ROOMS
To change the name of a room:
To change the description of a room:
CREATING EXITS
To create an exit it works similar to building rooms.
The above command will build an exit to the north and automatically build an exit back into your current location (south).
DELETING ROOMS / EXITS
To delete a room or exit:
This will delete the room to the north east.
This will delete the exit to the south. The exit back into the room will remain. This is useful for one-way exits.
USING OBJECTS as EXITS
First create an exit.
Next create an object (such as a door)
Set the steel door as a controller for the exit north, this mirrors any action taken on the door with the exit north.
Then if the user opens the door it will also open the exit n etc. When first setting up the door, you will need to manually mirror the doors initial state.
To make the door require a key…
CREATING OBJECTS
To create an object:
This will create a static object called box.
CREATING OBJECTS (WITH CLASSES)
To create an object (using a class)
This will create a static object called box with the object class (.obj). This makes the object takeable.
CLASSES AVAILABLE:
- .obj
builds an object that starts as takeable. - .hidden
builds an object that starts hidden. - .food
builds an object that can be eaten. - .drink
builds an object that can be drunk. - .rope
builds an object that can be attached to / detached from other objects. - .exit
builds an object that represents an exit, e.g. a steel door. - .container
builds an object that acts as a container. - .ai
builds an AI controlled character.
DELETING OBJECTS
To delete an object:
EDITING OBJECTS
Change an objects’ name:
Change an objects’ description:
OBJECT INTERACTION
You can define an object by assigning it roles and states which control how they can be interacted with.
Let’s make an object takeable:
Let’s make an object hidden:
We can also specify an objects location:
STATES AVAILABLE:
- is visible / is hidden
- is open / is closed
- is locked / is unlocked
ROLES AVAILABLE:
- is takeable / is not takeable
- is droppable / is not droppable
- is a container / is not a container
- is eatable / is not eatable
- is drinkable / is not drinkable
- is equipable / is not equipable
- is unequipable / is not unequipable
- is openable / is not openable
- is lockable / is not lockable
- is readable / is not readable
- is wearable / is not wearable
- is removable / is not removable
The “is not” while it is largely the same as not giving it the property at all is a good way to turn off a role of the object. e.g. a curse item is no longer removable / droppable.