Sorry about this, but I am extremely dumb and I'm having trouble. I purchased this engine mostly to figure out how to generate room layouts based on predefined blueprints but I can't for the life of me figure out how it works in this engine. I've been scouring all the scripts to figure out where the blueprints are defined or how to make new ones and it's driving me crazy.
Yal's Basic Dungeon Crawler Engine
A downloadable Engine for Windows, macOS, Linux, and Android
A basic dungeon crawler engine (Game Maker Studio 1.4 source file) that creates a map of any desired size, populated with rooms that can be 1x1, 2x1 or 2x2 'map cells' big.
- Rooms are populated with enemies/treasure and decorated by passing selection scripts as arguments to the dungeon generation functions; these can be as simple as a choose() statement or be arbitrarily complex and access data in the dungeon data structure to make their choices.
- Rooms are categorized as 'big' and 'special' separately, and can be 'special' in one of several ways (treasure room, secret treasure room, boss, player start point, ...). The meta-data is accessible by dungeon room ID and lets you adapt enemy spawn rates and other things as you see fit (such as always spawning zero enemies in the player start room, and using a set dungeon pattern for this room so it always looks the same)
- Dungeon rooms use separate tilesets for walls, floor and obstacle objects. This enables you to partially combine biomes, such as forest clearings mixing resources for forest and plains rooms.
- Dungeon room models are created using a sprite-based system; you can add in new room blueprints very quickly and easily.
- Macros and constants are used to maximize legibility of code. No 'magic numbers' are in the code.
- Big rooms are created by mirrored copies of a small-room blueprint, making big rooms symmetrical and have access to as many different shapes as smaller rooms do.
- Smooth scrolling that follows the player character but won't move onto the next room until you cross the boundary. Only objects in view are active, speeding up the game processing and ensuring enemies in other rooms don't do anything stupid while you're not watching.
- The engine is kept very general; enemies and items are just visual placeholders with very basic behavior. You can just load the resources from this engine into an existing game to get dungeon crawler functionality! (If you do this, make sure you also copy over the macros/constants from the dungeon generator source file).
- Code is cleanly separated in multiple scripts and grouped by functionality, letting you find what you look for easily should you desire to tweak anything to better suit your needs.
- Can be used for commercial projects; credit appreciated but not required.
- Uses Floofpaws' surface sampler scripts, which are released in the public domain.
In order to download this Engine you must purchase it at or above the minimum price of $3.99 USD. You will get access to the following files:
Log in with your itch.io account to leave a comment.
The rooms are actually defined using four sprites (one pixel corresponds to one tile in the room, each color means a different type of tile) - Sprites-->Room Maps will give you those, and their names should explain the purpose of each map. Just add more subimages to a sprite and they should automatically get added to the random selection.
You'll also need dungen_render_room() and dungen_render_tile() to actually create a room from the blueprints, though. (And also all the scripts in the folder Scripts-->Assist Scripts--->Floofpaws' Sampler Extension). I think they're pretty much standalone enough that they can be used on their own without the rest of the dungeon generation structure around them with just some small changes to dungen_render_room():
- Remove the part that spawns enemies and treasures.
- Remove the lookup of the "doorflags" variable and pass that as an argument instead.
In either case, the important bit is how dungen_render_room() uses a sampler to read the sprite data. The colors that are used to represent different types of tiles are defined in the list of macros, under __VaultMapData__, and these constants is what dungen_render_tile() is checking for.
If there's anything more that's unclear, feel free to ask :3
I thought it worked something like that, and now I know what my problem was:
when you import another project, the sprites show up as black squares in the resource menu until you view or edit them. so my eyes just sort of passed over these seemingly unhelpful square sprites. Thanks for replying!