problem description
suppose the map in a 2D game is made up of floors, monsters, chests, etc.
how to generate maps randomly.
my current idea is:
characters generate a fixed-length random map for each sprint. For random maps, first generate a map randomly according to a certain distance and height difference.
then divide each randomly generated parcel into several parts, and then randomly place monsters or treasure boxes on any part of any parcel.
but this method has obvious drawbacks. For placed monsters and treasure boxes, if they are on the same parcel, then their spacing is the same.
in addition, even if the parcel is divided into several unequal parts, or the position of the monster and treasure chest is slightly moved, the effect is very poor, and the size of the monster will become larger later in the game.