openage icon indicating copy to clipboard operation
openage copied to clipboard

Decoupling of subsystems

Open Tomatower opened this issue 7 years ago • 2 comments

Set up the GameState as a dump data store.

The core loop consists of:

  • simulation
  • input events
  • presentation (renderer, sound, gui)
  • network

They all work on the GameState (read/write).

The GameState may carry some information for the subsystem (e.g. Unit objects have some member struct from another subsystem or have a forward-declarated pointer etc), but all the subsystem methods should stay in the subsystems.

Tomatower avatar Oct 03 '16 22:10 Tomatower

@Vtec234 and I were talking about this in IRC, so I'd continue the discussion in here how we split up the networking, simulation, renderer, input etc. Related: #287 #286

TheJJ avatar Jan 10 '17 17:01 TheJJ

I added a general architecture draft here: https://github.com/SFTtech/openage/blob/master/doc/architecture.md so please update it with more ideas.

TheJJ avatar Jan 27 '17 12:01 TheJJ

This was implemented in https://github.com/SFTtech/openage/pull/1497 and documented in https://github.com/SFTtech/openage/pull/1525

heinezen avatar Sep 08 '23 21:09 heinezen