Pre-release
AdventureJS Docs Downloads Bundler Devlog Score: 0 Moves: 0
Tutorial explaining how to work with substance assets in AdventureJS. tutorial, substances WorkingWithSubstances styles

Working With...Substances

 

Demo Game

// WorkingWithSubstances.js
/* global AdventureJS A WorkingWithSubstances G */

var G = (WorkingWithSubstances = new AdventureJS.Game(
  "WorkingWithSubstances",
  "WorkingWithSubstancesContainer"
));

// --------------------------------------------------
// Settings
// --------------------------------------------------

G.settings.set({
  display: "inline",
  layout: "classic",
  title: "Working With Substances",
  author: "Ivan Cockrum",
  description: "Today we are Working With Substances ",
  version: "0.0.1",

  debug: {
    general: true,
  },
  log: {
    all: true,
  },
});

// --------------------------------------------------
// Player
// --------------------------------------------------

G.createAsset({
  class: "Player",
  name: "Explorer",
  place: { in: "Start Room" },
});

// --------------------------------------------------
// Rooms
// --------------------------------------------------

G.createAsset({
  class: "Room",
  name: "Start Room",
});

// --------------------------------------------------
// Objects
// --------------------------------------------------

Demo Source files

Right-click and choose "Save as..." to download source files.

Notes:

  • Demo games are set to a small size to fit doc pages. They can easily be enlarged via display settings.
  • Demo games all use the same theme. Colors and fonts can be changed via custom CSS.
  • Demo games don't include the core AdventureJS code. To run downloaded games locally, you'll need to also download copies of the core JS and CSS and set up this local folder structure.
AdventureJS
└── js
|   └── adventure.js
└── css
|   └── adventurejs.css
└── games
    ├── demogame01
    ├── demogame02
    └── demogame03

 

Example Code

Reservoirs

Emitters

Mixers

Further Reference

Vessels

Emitters

Mixers

Reservoirs