src/necsus

Necsus: An ECS (entity component system) for Nim

In depth documentation can be found here:

Types

NecsusRun = enum
  RunLoop, ExitLoop
For the default game loop runner, tells the loop when to exit
SystemFlag = object
Fixes type checking errors when passing system procs into the necsus macro

Procs

proc gameLoop(exit: Shared[NecsusRun]; tick: proc (): void) {.
    ...raises: [Exception], tags: [RootEffect], forbids: [].}
A standard game loop runner
proc `~`(system: proc): SystemFlag
Ensures that system macros with various arguments are able to be massed in to the necsus macro

Macros

macro necsus(runner: typed{sym}; systems: openArray[SystemFlag];
             conf: NecsusConf; pragmaProc: untyped)
Creates an ECS world
macro necsus(systems: openArray[SystemFlag]; conf: NecsusConf;
             pragmaProc: untyped)
Creates an ECS world
macro runSystemOnce(systemDef: typed): untyped
Creates a single system and immediately executes it with a specific set of directives