Generators
Map Parts
The map is a nested structure of rooms made of screens.
Screens
A screen is exactly what it sounds like, the amount of space that can be represented on a screenful of space. A room can be a single screen and can have as few as one exit.
A screen represents:
- 640x360 pixels. Selected for easy integer scaling to most typical 16:9 screen resolutions.
- 32x18 tiles. Each tile is 20x20 pixels.
- A space with up to 4 exits. One per screen edge.
Rooms
A room internally represented as is a 2D array of screens.
Some tidbits about rooms:
- The space they contain is always bounded by a rectangle that has a position in the world.
- The space in the array does not need to be full of screens (gaps are allowed) as long as the room is used to make only a single connected space.
- Rooms are the level that represent a self contained space that is loadable by the game engine.
- There is no specific design limit on how many screens can be involved in a single room.
- Exits for the room are defined by the screens they contain.
Map Display
While playing the game, the player can pull up the map at any time. This map system shows the known world in a way that allows a player to look around, figure out routes, and find places where missing items could be. Information is added to the map when seen by the player or through map stations if they are part of the world.
For the in-game map:
- Each in game tile (20x20) is represented as a single pixel (1x1) resulting in a 20:1 scaling factor.
- Is a grid of 32x18 pixel rectangles representing each screen worth of the world.
- Can be zoomed and panned to search and explore.
- Highlights the screen the room is currently in.
- Can overlay in-world things like doors, upgrades, stations, and bosses. Typically these symbols are larger than 1x1 pixel each, so they should be expected to obscure parts of the map.
Map Generation Manager
This system orchestrates the layout of the entire map.
Orchestrates:
- Owns the random number generators.
- Makes decisions based on the world configuration.
- Decides how room generators are used to fill in the map.
- Places upgrades in the world.
- Owns item progression logic.
- Selects and assigns biomes to rooms.
- Creator of multi-room constructs, for example bosses with nearby saves.
- Escape path router.
Room Generators
Generators are pieces of code that generate individual rooms. They have several parameters that are provided by the map generation manager that control what is generated.
Types
There is a collection of room generators that is used to build the world. There are also Tutorial Generators that create the specific set of rooms used for the tutorial area if needed.
All generators receive parameters:
- Maximum size the room is allowed to be, in screens.
- Limiters that are allowed. These are items that could have been collected by the time the player gets to this room and can be used to limit travel through the room that will be generated.
Generators produce rooms that have markers for:
- Locations where doors place the player when entering this room.
- Enemy spawn points with difficulty flags.
- Locations where upgrade items can be placed if needed.
| Generator | Extra Parameters | Description |
|---|---|---|
| Single-Screen Dead-End | Type
Exit Direction |
This room is always exactly 1x1 screen and has a single exit. It can be any of the various 1 screen types. |
| Travel | Layout
|
This type of room is for travel across some distance. They always have 2 exits, one on each end. Some have something in them that makes them one-way or prevents travel at all until some criteria is met. Tubes suck you in immediately upon entering a door and elevators have a space that the player interacts with to cause the elevator to move. |
| Hub | Layout
|
This room is expected to have a larger number of exits than most areas. These areas facilitate interconnect between multiple places and can have upgrade items, tricky platforming, and hidden sections to make them interesting. |
| Platform Challenge | None | These rooms are specifically designed to challenge the player to get through them with a set of movement capabilities. They may be dead-ends or travel rooms, but essentially always have some sort of reward or progression at the end. |
| Boss | Type
|
Boss rooms are places where large battles take place. Rooms that are generated are done in a way that align with the selected battle. |
Structures
Structures are parameterized chunks of "stuff" that go in a room. They range from statues and platforms to puzzle mazes and hazards. The use of these is managed by the room generator that needs the stuff.
Types
There is a collection of structure templates that can be used by room generators to make things that go in the rooms during generation.
All structure templates receive parameters:
- Size of the structure, in tiles.
| Structure | Extra Parameters | Description |
|---|---|---|
| Platform | Type
End Caps |
This structure builds a platform using pipe style parts. It can also utilize either decorative caps or simple pipe ends. |