HexDecimal / python-tcod-engine-2023

MIT License
4 stars 1 forks source link

Map generation. #1

Open HexDecimal opened 1 year ago

HexDecimal commented 1 year ago

Currently lacking a map generator.

I'm hoping to come with something that generates good looking maps with little code. Cellular automata cave generators typically give good results with very little but I'm not sure if I should include SciPy. Maybe BSP or large tiles might work well. Use Bresenham's line or pathfinders to dig tunnels rather than anything more complex.

I also want it to be modular and can be swapped with any other generator to the point where different levels will use different generators. Maybe to the point where generators can call into other generators.

Maybe try using generic methods of placing enemies and items rather than specific ones. Such as placing things on any free floor tile or using Djikstra to keep monsters spread out.

HexDecimal commented 1 year ago

A simple generator to start out, but if I end up with extra time then I could go ahead and make a several more generators.

HexDecimal commented 1 year ago

Running into issues with map identifiers. Maps have exits pointing to each other and adding these exits is causing minor import cycles in map generation code.

I could fix this by registering map generators in a database but then I'd lose the static type checking for those maps.