Necsus: An ECS (entity component system) for Nim
In depth documentation can be found here:
Imports
-
necsus/runtime/entityId, necsus/runtime/query, necsus/runtime/systemVar, necsus/runtime/inbox, necsus/runtime/directives, necsus/runtime/necsusConf, necsus/runtime/spawn, necsus/runtime/pragmas, necsus/runtime/tuples, necsus/compiletime/parse, necsus/compiletime/systemGen, necsus/compiletime/codeGenInfo, necsus/compiletime/worldGen, necsus/compiletime/archetype, necsus/compiletime/tickGen, necsus/compiletime/common, necsus/compiletime/marshalGen, necsus/compiletime/sendGen, necsus/util/dump
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 `~`(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
Exports
-
$, ==, incGen, EntityId, hash, toInt, Query, len, Not, QueryNext, asQuery, items, newQuery, asFullQuery, AnyQuery, RawQuery, FullQuery, single, QueryItem, pairs, items, NecsusConf, newNecsusConf, newNecsusConf, newNecsusConf, NecsusLogger, SharedOrT, getOrRaise, unwrap, clear, SystemVar, isEmpty, items, items, unwrap, ==, get, SystemVarData, from, isSome, get, :=, $, getOrPut, LocalOrT, set, getOrPut, Shared, Local, len, Inbox, items, (), (), OutboxProc, TimeDelta, exec, Swap, SaveSystemInstance, exec, EntityDebug, TimeElapsed, Delete, (), (), get, get, (), get, DeleteAll, exec, Save, EventSystemInstance, get, Outbox, TickId, Detach, Bundle, Lookup, (), newCallbackDir, Restore, (), Attach, SystemInstance, asFullSpawn, set, RawSpawn, FullSpawn, with, set, asSpawn, beginSpawn, newSpawn, with, Spawn, startupSys, restoreSys, maxCapacity, loopSys, accessory, eventSys, depends, active, teardownSys, instanced, saveSys, as, extend, join