Skip to main content

Project Setup

Environment Configuration

Game files are stored in an environments directory. The default is environment_files in the project root. You can configure this in your .env file:
Or specify it directly when initializing the client:

Directory Structure

The environments follow this directory structure:

Creating a New Version

Copy your existing version folder to create a new version:
Your directory now looks like this:
Then update metadata.json with the new version (more info):
Test the new version:

Editing the Game File

The main game logic resides in game-id.py. This file contains:

Editing Existing Sprites

Modifying Sprite Pixels

To change an existing sprite’s appearance, edit its pixel array directly in the sprites dictionary: This sprite in ls20.py now uses colors 8 and 10 instead of 9 and 12.
ARCEngine uses a 16-color palette (0-15) plus -1 for transparent and -2 for transparent and collidable.

Editing Sprites in Level Definitions

When sprites are placed in levels, you can modify them inline:
This is now the new version of ls20 level 1:
level variant

Additional Information

Level Data

The data dictionary stores level-specific configuration. This will vary for every game.
level data is accessed in the game class:

Other Techniques

Dynamic Sprite Addition/Removal

Querying Sprites

Animation Pattern

For multi-frame effects, delay complete_action():
Note the game loop keeps calling step() until complete_action() is called.

Further Reading

For more detailed information refer to the ARC Engine.