Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.
Alexandru Dan edited this page Aug 30, 2017 · 23 revisions

This part of the code has not yet been merged, but is fully supported by the AIMMO Unity project. The relevant pull requests are(in order) #220 and #224.

Extensible Level Generation Architecture

The intention of the level generation is to be as separate as possible from the rest of the AI:MMO implementation. The reason behind is that level requirements might change a lot on the way, so we want a as loosely as possible coupled module as part of the game logic.

The main class that gets exposed to the Django application is the JSONLevelGenerator, which implements the interface exposed by the BaseLevelGenerator.

The BaseLevelGenerator has the following template:

  • contructor(setting)
    • a set of basic settings that the map uses at generation
    • see DEFAULT_LEVEL_SETTINGS in simulation.world_map
  • get_game_state(avatar_manager)
    • exposes a game state used by the turn manager daemon
    • for details see Game State
  • check_complete(game_state)
    • returns false by default, should be overrided when inheriting
    • function to check if a map is "complete"
    • the turn manager runs the action for each avatar, then runs check_complete afterwards
  • get_map (@abstract)
    • returns the generated map
Clone this wiki locally