Generic engine implementation notes - Anticheese/Cataclysm GitHub Wiki

Just some thoughts on the organization of the general framework we arrived at in the [2013-01-17 conference call](Conference call notes 2013-01-17).

C++ side

  • Contains renderer and input subsystems
  • Contains utility functions, things that need to be fast etc.
  • Contains general notions of:
    • Game objects
      • Area (city, building, room)
      • Item
      • Vehicle
      • Creature
    • Map
    • Controls
    • Modelling
      • e.g. ecology, water
      • On several levels
    • Data files
      • Save files
      • Config files
      • DSL for attributes (see below)
      • Scripting (see below)

scripting side

There are two possible cases here, need to investigate which is best / easiest

  • Parameters are in data files, behaviour is in scripts
    • Allows suitable file formats for either instead of one for both
  • Everything is in scripts (likely winner)
    • Everything in one place
    • Lua allows for nice syntactic sugar

Scripting

  • Basic unit of behaviour: component
    • Consists of code and parameters
    • Possibility of same code, different parameters
  • Undecided: API??? Options:
    • Events?
    • Selectors or something?
  • Random scripting language feature wishlist
    • Possibility for adding syntactic sugar (e.g. instead of data/config files as above)
    • Functions as first-order objects (this makes programming so nice)
    • Integrated basic data structures like strings and lists
    • Lua satisfies all these!