For Smash Hyper Drive I needed to make a map editor to place things in a meaningful manner for the rooms.
I have developed a map editor and this then brought on more things that I needed to decide.
Rooms (“maps”) will typically have the same layout on room start no matter how they are picked. X amount of bad guys in the room in Y location. The game will decide where to place the doors. I the designer will decide where it can place those doors if it is going to use them.
This led me to understanding that the collision boxes for the walls aren’t going to be predefined, but they will depend on the doors in the room. There are a lot of tricks I can use to simplify how I approach this, but in my case I’m going with top,bot,left,right wall doors. That simplifies the need to do collision detection to determine if a wall should have a gap for the door or not.
In the map editor, I was thinking to have multiple layers for a door. First layer would be the door itself. The second layer would be what to show if the door is not present. This can be doodads and other things. Which leads me to the idea that I need to have a way to control all that.
Doodads can be managed by simple
struct doodad {
int posX;
int posY;
AtlasSprite sprite; // Gives the texturePosX PosY width height for rendering
};
This works out fine to start. Unfortunately, I can see this growing into something bigger if the doodad has animations. And if I want to have interactions I will need a whole different things. I could do the monolith struct approach. I have to think more on this.
For simplicity sake, I can move forwards with the idea of doors and them being “enabled/disabled” and drawing the collision boxes with that data. That will at least get the game to a playable state. The additional task of visual layers is a concept I definitely want to flesh out.
Which I could do so now.
Visual layers can be used when a door is disabled. I’m thinking of quite a few ways to utilize it.
Blank
Decor Set 1
Decor Set 2
Decor Set 3
Which would be 3 unique styles and a default empty style for the wall. This would help spruce things up with variety. You may have noticed by now I have 2 styles I want things to have:
Random - RogueLike
HandCrafted - Designed by a human.
In this game I’m going to combine a lot of randomness and handcrafted elements. Randomness will decide which handcrafted elements to use. So we will have deliberate puzzles, room layouts, etc. However, we will have random connections between rooms and the floors will have random layout per run. Mid session bosses could be picked from a pool.
Ultimately my design decision here is that the game is deliberate events laid out semi-randomly through a playthrough. This allows for my game design skills to shine while also increasing replayability.
That is all for now. I needed to get my thoughts on paper so I could move forwards in development.