Introduction
Welcome to the WorldsGL documentation This is a documentation and guideline page for some of the basic, and more complex parts of the WorldsGL engine.
The Basics
Before we get into more complex parts of the engine like Behavior Trees amnd the properties of custom animation, let's start out with simple object creation and manuevering in Worlds.
Create your first object in the scene by right clicking in the Object Inspector window. You can create a blank .obj object, a light source, a particle, background music, or a scene trigger.
You: So now i've created my first object. Now how do I make changes to it, or assign textures!!!
Right click the object, and open its Properties window. This allows you to change and alter all properties relating to that particular object.
You: Now how do I handle general AI functions, like combat damage, and making my enemies move and patrol around the stage?
For this you must enter the next stage of documentation, covering Behavior Trees.
Behavior Trees
Behavior Trees are a highly elaborate and robust node-dragging system in WorldsGL that allow you to create vartious enemy AI action/behavior patterns and map them under several "Nodes", which we will cover over here:
Root
The most essential part of assembling behavior trees, your behavior tree WILL not work without a Root node.
Selector
The second most important node of the behavior tree system, the selector is crucial for running multiple nodes. If you have not used a selector, your other nodes will not work.
Sequence
Sequences aren't nearly as crucial to your trees as the Selector and Root nodes are, but they are still important and some of your functions may not work properly if they were not properly defined as a Sequence first. Because most behavior tree structures already run on several trigger/self- instigative nodes like Collision/Radius, Sequences are mainly just for better organization.
Action
Action nodes only make simple UI + - increments and decrements towards things like the player's health, enemy health, and the score points. Although a behavior node can self-execute itself straight from the Root node, Actions need to be triggered either by Collision, Radius, or OnDeath.
Behavior
A behavior node determines the object's general behavior like patrolling, auto-rotating special items, etc. Unlike Sequences and Action nodes, Behavior is not designed to be or triggered by any specific function (though it can be)
Radius
Execute the node within a specified radius.
Collision
Execute the node within a direct collision.
OnDeath/Destroy
2 black nodes usually used in direct tangem with eachother, used for executing node actions when the object's health reaches 0 and for destroying the object respectively.
Visibility
Toggle the object's visibiltiy rather than outright removing it from the scene.
Random
Random is designed to randomly pick from any one of its children and picks a sub-node to execute.
Time
Time node is used for cooldowns/countdowns, and will not execute the node until the desired time limit is reached. A time node has to be triggered first, either by Radius, Collision, or OnDeath to begin the cooldown. (a visual cooldown of the time remaining on the node can be seen in the Behavior Editor) A time node will not halt any of its sibling nodes from executing, but no nodes connected to a time node can execute until the cooldown is reached.
Respawn
Respawn node resurrects a dead object by re-activating it and re-storing their health back to full HP(Respawn nodes have a special function to specifically customize the amount of HP the health bar is restored to), it is generally always assumed that you will use a Respawn node directly following a Time node to schedule respawn times.
Sound
Sound node collects a sound file from the AudioManager library to execute after a node trigger (it is not encouraged to add background music through the behavior tree, use the feature in the object inspector to directly add Background Music items to your project instead)
OnClick/AddItem
"OnClick" is a node that you add on a behavior tree to determine what an item-enabled object does when it is clicked on in the inventory. "AddItem" is a secondary node used to actually add the item to your inventory in an instance like OnDeath.
You: WOW, thanks for all those tips! But... how do I animate?
Animations Editor & the .WGANIM format
.WGANIM (WorldsGL Animation) is an entirely new file type created/managed within the program. WGANIM files are created from the Python script compiled with the program, which is used to extract/bake individual frames of an .FBX into the new hybrid .WGANIM format which can be parsed/read back into .OBJ, and used for animations in WorldsGL.
Dedicated Animation Program & Python Script
Animations are added into the WGAnim_Library from the Animation Editor, where they are stored inside the .tpgproject and re-loaded any time the project itself is opened.
Deep WGAnimProfile storage system
Rather than simply extracting and building animations, each .WGANIM state (Idle, Movement, Attacking and Jumping) is stored into an affiliated WGAnimProfile, which can be attatched to each individual object or player.
You: I'm feelin' like Bob Ross, how do I approach landscaping in Worlds?
Heightmaps & Landscaping
Heightmapping and landscaping are a crucial part of the Worlds engine for crafting beautifully designed terrain.
Importing Heightmaps
Heightmaps are imported and managed from the Heightmap Editor tool, where they are importable to your scene stage.
Water Levels
The Water levels of your heightmap are natrually generated from the black areas of the heightmap. You can from there adjust the elevation from World/Environment settings
You: Does Worlds have Multiplayer support?
Multiplayer, Servers, & HTTP WebSockets
Yes actually, WorldsGL does have a fully tested multiplayer division that runs on local tunnels (allowing your web server to be visible all over the web) Here is a graph showing the general progress of how Worlds deploys your game servers to the web:
For the Hoster: How to turn your WorldsGL game into a multiplayer server
- Export your .JAR under the special "Export .JAR with multiplayer/servers" button
- Run the server.py script that is inside the .JAR's export folder
- Set up your details and start running the localtunnel!
For the Player: How to connect to another user's WorldsGL server?
- Open the "WorldsGL Online" .exe that comes with the download for the program.
- Input a valid local tunnel server address currently running for WorldsGL (the official WorldsGL server is usually alway running at https://worldsgl-server.loca.lt
- The webserver HAS to be online and running, the WorldsGL Online launcher was built and tested to be able to directly detect if it gets a signal from the server URL.
- Once you have the _Client.jar installed and downloaded, just connect to the wss://worldsgl-server.loca.lt/game WebSocket to join the server!
(USE SHIFT + C TO OPEN CHAT WINDOW)
Downloads
If you have completed this guide and are interested in using the software, download the file from here: