I have big plans for this game, and I think I can accomplish them this time!
By the end of today, I hope to have my random world generator done.
Because I’m using a (Rather large) continuous open world, I’m going to use a spatial hash. The world cell that the player is in will be filled with entities, as will the cells neighboring the player’s.
I’m using a cell-based generator to create (Hopefully) interesting rooms while still having the entire world filled with rooms. Because it’s a man-made structure, big dead spaces aren’t good. My generator will treat every cell as part of a room, and create bigger rooms by linking cells together. Between cells that aren’t linked, there will be hallways with doors placed in such a way that every room is accessible from at least two places. This doesn’t seem like it’d be too hard, but I’ve been wrong before.
Rooms will also have columns and boxes placed randomly when the room is generated. Columns will simply be placed at random coordinates, with the engine insuring that they are not adjacent to any other wall pieces (Columns are treated as wall segments). Boxes will only be present in larger rooms, and will be placed in rectangles bordered by boxes strewn about by a drunken walk routine.
Hot dogs will be placed semi-randomly, scattered around the world. Guards dogs will be similarly handled. The semi-random part is that both will be placed more or less densely based on how far the area is from the objective. (IE: The hot dog mother lode)
Areas that are more than two world cells away from the player will be stored in files that will contain the room cell layout, door positions, box and column locations, and the number of guard dogs and hot dogs. When the area is loaded, one or two guard dogs will be added or removed randomly, and hot dogs will be added according to the density prescribed for that area. If the player has led many guards into a world cell, and this will be saved in the world cell file, but the number will be cut down dramatically when it is reloaded depending how overpopulated the area was when it was saved.
The game will (Hopefully) have short cutscenes for the beginning of the game, finding the hot dog motherlode, and escaping the game after finding it.
If I have time after that, there may be a cutscene for dying, as well. I’m not sure.
The controls are as follows: Movement with WASD or arrows (WASD because my keyboard is wonky and doesn’t like registering arrow keys at the same time as… Just about anything else) and space to run. Doors will open automatically when they are approached, and the player will eat hot dogs when they walk up to them.
Guards will use an A* algorithm to follow the player (As well as to guide their wandering), and a hitscan-like system to tell whether they can see the player. The player won’t have line-of-sight, because that’s very expensive in real-time, even more so in Python. The guards will also be able to hear the player when (s)he is running, if they are within a certain range. They can’t hear the player walk or eat, because (s)he is a fox, and thus sneaky and quiet. When a guard loses sight of the player, and can’t hear them running, they will run to the last placed that they saw them. If they still can’t see or hear the player, they give up and go back to wandering.
Hot Dog Hunter will certainly be a challenge, but that’s my style. Hopefully the difficulty will scale well, though. That’s one of my goals.
Here’s hoping…
— Mr.Dude