Models

Models post thumbnail image

Models (often called Models.txt after its file name) is the master configuration for loading the models that will pear in a game. It also houses several global properties that affect game behaviors.

Configuration

The following are global unless noted otherwise, meaning they affect behaviors across the entire game.

Block Ratio

See Block Ratio.

Default Jump Height

See Default Jump Height.

Max Attacks

See Max Attacks.

MP Block

See Mp Block.

No Air Cancel

See No Air Cancel.

No Chip Death

See No Chip Death.

Loading Objects

Before you can spawn an entity, its base model must be loaded to memory first. OpenBOR supports both direct loading and an auto loader cache. By default, once a model is loaded it remains in memory until the engine shuts down. This includes items that are auto loaded. This behavior is optimal for most projects, as typical game design introduce new objects, and then reuses them as the game progresses. You can modify these behaviors to remove objects as needed to accommodate more memory sensitive platforms.

Load

load <name> <path>

Load a model into memory. Loads all of all of the model’s assets (sprites, sounds, etc.) including any nested loads.

  • Name: Label name for the model. It’s a good idea to make this the same as the model name to avoid confusion.
  • Path: Path to the model’s template file, relative to the engine’s location.

Load a model named cool_dude from a folder data/chars/cool_dude.

load cool_dude data/chars/cool_dude/cool_dude_sheet.txt

Know

know <name> <path>

Place a model into the auto loader cache. During level loading, OpenBOR will automatically load any models the level references to spawn entities.

Tip: You must load models that are available outside of gameplay, but in most projects that’s only the players. Use know for in level objects like enemies and obstacles that only appear during gameplay.

Related Post