-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Addition Guides
All objects are stored in TileSet.tres, where they are given an ID and data depending on their type.
Additionally, object IDs are stored as enum values in Global.gd.
To add an object, create a new "tile" in the tile set, and ensure its ID is unique from other objects. (READ BELOW FOR ID RULES ON SPECIFIC OBJECT TYPES)
- Tiles have IDs between 0 and 500.
- Tiles must be added using an atlas source, which is a simple image of the tile. Images of tiles should be in
res://Assets/Defaults/Assets/Sprites/Tiles. - Tiles must have a single alternative variant with a dark/red modulate. This will take effect when hovering on an invalid slot using the tile.
- Tiles must have a hitbox, created using Physics Layer 0, as well as a custom data layer called "name" which is simply the name of the tile. This can be used to add unique behavior when the player is standing on a certain tile.
-
Entities have IDs between 500 and 600.
-
Entities must be added using a scene collection source. This allows entire scenes to function as tiles in the tile map.
-
Entities always have animations rather than static images. Store images for entities in
res://Assets/Sprites/Entities, create a folder for a new entity, and create subfolders for each of the entity's animations. All images pertaining to an animation should be in that respective animation's subfolder. -
Entities should have a "preview" variant in
Scenes/Previewthat's a script-less image of the entity. This prevents the preview from interacting with the main tile map via collision. -
Preview variants of entities should be added as alternative tiles to the main entity with an ID of 2.
- Props have IDs of at least 600.
- Props must be added using an atlas source, similarly to tiles. Images of props should be in
res://Assets/Defaults/Assets/Sprites/Props. - Props will have 7 alternative tiles, with 8 total variants.
- Props with IDs 0 to 3 will have a z-index of 1, being in the foreground.
- Props with IDs 4 to 7 will have a z-index of -1, being in the background.
- The 4 variants of props act as rotations in the clockwise direction.
- IDs 1 and 5 will be rotated 90° clockwise. Enable "Flip H" and "Transpose."
- IDs 2 and 6 will be rotated 180°. Enable "Flip H" and "Flip V."
- IDs 3 and 7 will be rotated 270° clockwise. Enable "Flip V" and "Transpose."
In the editor state, objects have respective buttons to allow the user to select them.
These buttons are stored in TileSwitch.tscn and divided into sections based on the object type.
Each section contains a list of buttons, based on the template scene TilebarButton.tscn. To add a new button, add an instance of this scene to the appropriate section, and fill all the exported variables using the inspector.
- This Item ID: Set this to the ID of the object this button pertains to.
- Tilebar: Drag the root Control node into this field.
- Is Texture Updating: Enable to ensure this button's texture updates with custom assets (MORE INFO BELOW)
- Entity Name: Fill in to make this compatible with swapping animations (MORE INFO BELOW)
- Button Type: Set to Tile, Entity or Prop appropriately.
- Button Image: Automatically set to this object's child TextureRect. Do not modify.
To add compatibility with the asset manager (and allow an object to have its asset swappable,) different steps are taken for each object type.
To make a tile or prop compatible with image swapping, simply add it to the appropriate string array in ImageSwapping.gd.
Resources
Known Issues
Future Work
Globals
Managers
- Main Menu Manager
- Master Manager
- Camera Manager
- Hotkey Manager
- Import Export Manager
- Audio Manager
- Animation Manager
- PopUp Manager
UI
Managers
- Editor Manager
- Tile Manager
- Entity Manager
- Icon Manager
- Preview Manager
- Tool Manager
- Asset Manager
- Custom Cursor Manager
Tiles & Entities
- Grid Lines
- Preview Line
- Tiles & Entities
- Enemies
- Patrolling Enemy
- Flying Enemy
- Shooting Enemy
- Stationary Enemy
- Moving Platform
- Property Editing
Asset Swapping
UI
Managers
Player