yellowstonegames / SquidLib

Useful tools for roguelike, role-playing, strategy, and other grid-based games in Java. Feedback is welcome!
Other
448 stars 46 forks source link

[Suggestion] Perfect WorldMapGenerator #212

Closed lihl666 closed 2 years ago

lihl666 commented 2 years ago

Hi, I just started looking at this library. It's great. But it doesn't have some functions I want.

We can use "WorldMapGenerator" to generate various types of maps. Although it already includes height, biota, etc. I think it still lacks some key elements of game development, such as city, building, road, etc.

I am developing a roguelike game of zombie survival, and I am currently worrying about the creation of city, road and building. My goal is to generate maps like Cataclysm DDA.

I hope squidlib can develop such an example to make "WorldMapGenerator" more perfect.

tommyettinger commented 2 years ago

Perfect is the enemy of good. You won't find a library or framework that can create an absolutely optimal city that fits exactly what you want in your specific game world. SquidLib doesn't have much knowledge of or requirements for what a game needs in it. There needs to be a concept of a wall and a floor for most algorithms to work, but not all games need a concept of a table and chairs (many are graphical and don't necessarily have existing graphics for those). I'm not planning on enumerating every possible game setting's plausible terrain features and items in SquidLib; that's silly. Even city/town generation varies wildly depending on setting era, and since you want a post-apocalyptic setting, that adds additional quirks to a modern-day or near-future setting. Virtually every aspect of city generation is dependent on the game, and so needs to be written as part of the game, rather than a library.

tl;dr I cannot write your game for you; this is code that you will need to write yourself. You may want to look at how Cataclysm DDA (or the original Cataclysm) does its city generation by browsing its source.