smaspe / res_mgmt

A resource management game framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

res_mgmt

A resource management game framework

TODOs

  • Modeling
  • Creating a basic model with 3-4 resources and a few technologies
  • Describing the actions
  • Adding an API
  • Adding an administration API
  • Adding a basic UI and a basic configuration as an example
  • Stretch goal - adding a system to verify the balance of the resources when the game run
  • Stretch goal - placing element on a map and require stuff to move from one to the next

Modeling

  • Costs are given in amounts of resources
  • Time is given in units of time to be normalized (turn, s, ms, ns, ... whatever)

Basics

  • Resource
  • Technology
  • Worker

Buildings

All buildings have:

  • required technology
  • required buildings
  • construction cost
  • construction time
  • capabilities
  • number and type of building workers
  • maximum number of instances (-1 is infinite)

Capabilities

  • Storage (resources)
  • Producers (resources in, resources out, production time, workers)
  • Mine (resources out, production time, builders required, capacity)
  • Lab (technology, required technologies, research cost, research time)
  • Recruitment (worker, required technology)
  • Housing (capacity)

Upgrade

  • Same content as a building

More on Capabilities

Each resource capability can have 3 steps:

  • Putting things in the common stock (Storage puts everything back in the common pile)
  • Using the stock (Producers take from the common stock and put the result of their production in the stock)
  • Storing back

Example

(ITW)

{
  "resources": [
    "log",
    "lumber",
    "stone"
  ],
  "technologies": [
    "lumbering"
  ],
  "workers": [
    {
      "name": "lumberjack"
    }
  ],
  "buildings": [
    {
      "name": "Town Hall",
      "technology": null,
      "cost": {
        "wood": 10
      },
      "time": 0,
      "maximum": 1,
      "workers": 0,
      "capabilities": {
        "storage": {
            "log": 10,
            "lumber": 10,
            "stone": 10
        },
        "housing": 10,
        "lab": [
          "lumber"
        ],
        "recruitment": [
          "lumberjack"
        ]
      }
    }
  ]
}

About

A resource management game framework

License:Apache License 2.0


Languages

Language:Python 100.0%