-
Notifications
You must be signed in to change notification settings - Fork 0
Quick intro
- Want to fit more than your scene boundaries allows?
- Want to simulate physics differently that the default one Decentraland offers
- Not happy with the current Decentraland player controls?
If you answered "yes" to one or more of the questions above then Infinity Engine might be for you. The Infinity Engine enables you to workaround the limitations Decentraland has around Player Controls and Scene boundaries.
The Infinity Engine holds the player in an invisible box called the Avatar Trap and instead moves the scene around the player.
The moving of the scene around the player gives the illusion of the player moving through the scene and allows you to simlulate any player control movement style you like. Movement such as flying, jumping 10 meters high, etc.
Moving of the scene instead of the player allows the Infinity Engine to workaround scene bounds issue. The models come to the player and as long as the model can fit inside the scene boundary as the player "moves to the model" it will appear within the bounds of your scene. You can have 100x100x100 size scenes simulated inside a 1x1 parcel.
Previewing the scene
-
Download this repository.
-
Install the Decentraland Editor
-
Open the repository folder in Visual Studio Code.
-
Open the Decentraland Editor tab, and press Run Scene
Alternatively, you can use the command line. Inside this scene root directory run:
npm install
npm run start
Anything under a folder named 'demo' is reasonably self contained is safe to delete assuming you remove all references to it. These are for the demo only. Deleteing these folders will not impact the functionality of the Ininity Engine. If your src/myFirstScene/getting-started.ts or any other file references things in here models will stop showing up or code may complain about a now missing file. Update references where needed.
Files in here are specific for the demo of Race Track and Skate Park.
src/demo/*
src/scenes/demo/*
assets/demo/*
See here for a in-depth guide to importing your own scene: Creating a Scene from Scratch.
For a full example of a config file see Infinity Engine Configuration. See src/sceneConfigType.ts for configuration types.
Some of the most common config options are covered below:
-
Parcel size: defines the size of the scene. Set these to match the
tile_dimensionsdeclared inscene.json//src/config.ts - line #16 const ParcelCountX = 5 const ParcelCountZ = 5
-
Infinity Engine defaults: default properties used by the engine. These can be over-ridden on a per-scene basis.
//src/config.ts AVATAR_TRAP_DEFAULTS // #72 - defaults for how avatar trap is configured AVATAR_DEFAULTS // #81 - defaults for how avatar swap is rendered SKYBOX_DEFAULTS // #116 - defaults for how skybox is generated WORLD_VEHICLE_DEFAULTS // #124 - defaults for how world vehicle is configured GRID_DEBUG_DEFAULTS // #148 - the defaults when grid debug is enabled
-
Scene Admins: define a list of users authorised to see the various debug/control UI elements.
//src/config.ts, line #24 ADMINS = [ "any", // if set to any will allow anyone to see ];
TODO:
- Add in some introductory text
- Explain what Infinity Engine does
- Roughly explain how it works, benefits, etc enough to get the idea over
- Give the user the bare-minimum required to get the examples running
- Direct their attention to the config files and talk about some common config values
- Encourage them to check out the scene-from-scratch guide next