civ_map_generator 0.1.5

A civilization map generator
Documentation

Civ Map Generator

A Civilization series game map generator library. The algorithm is primarily based on Civilization V implementation with some references from Civilization VI.

Adding a Map Type

How to add a map type

Example

use crate::{generate_map, map_parameters::{MapParametersBuilder, WorldGrid}, ruleset::Ruleset};

fn main() {
    let world_grid = WorldGrid::default();
    let map_parameters = MapParametersBuilder::new(world_grid).build();
    let ruleset = Ruleset::default();
    let map = generate_map(&map_parameters, &ruleset);
}

Complete example: Civilization-Remastered

Key Innovations

  • Dual Hex Orientation Support
    Supports both flat and pointy hex orientations. Original Civilization implementations typically support only one orientation, but this project supports both.

Current Limitations

  • Limited Map Generation Algorithms
    Only fractal and pangaea maps are currently supported. More algorithms will be added in the future.

  • Hex Grid Only
    Square grid support is not yet implemented.

Future Plans

  • Add more map generation algorithms
  • Add square grid support
  • Optimize JSON-based ruleset information (currently, only a subset of files in src/jsons are used as ruleset information)

References

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.