# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Construct a new CollisionRateLimiterArray.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Construct a new entity manager.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
create a new SORTED UpdatedEntityList by giving it a channel on which it will receive entity IDs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
create a new UpdatedEntityList by giving it a channel on which it will receive entity IDs.
No description provided by the author
Construct a new EventFilter which asks about Type and a user-given predicate.
No description provided by the author
translated from SDL2's SDL_HasIntersection(SDL_Rect * A, SDL_Rect * B) takes rectanges defined with pos in the center of the rect.
No description provided by the author
No description provided by the author
takes rectanges defined with pos in the center of the rect.
No description provided by the author
Construct a new EventFilter which only asks about the Type of the event.
No description provided by the author
No description provided by the author
Returns the index to insert x at (could be len(a) if it would be new max).
produce a function which will act like fmt.Sprintf but be silent or not based on a supplied boolean value (below the function definition in this file you can find all of them used).
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
a subscriber getting 4096 events in a single update tick is insane, but memory is plentiful so, allow some capacity to build up.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
AudioManager stores audio as mix.Chunk pointers, keyed by strings (filenames).
No description provided by the author
No description provided by the author
Defines a kind of trianglular 2D array which allows you to store a RateLimiter at the intersection of each entity ID and each other entity ID, assuming they are indexed [i][j] where i < j ("collision-indexing")
For example, the table would look like the following if we had MAX_ENTITIES = 5, where r is a rate limiter (atomic.Uint32):
j
0 1 2 3 4
0 r r r r
1 r r r
i 2 r r
3 r
4
*/ The rows are actually slices of a contiguous backing array, to make sure the rate limiters are all loaded in the same cache line
(the motiviation entirely behind maintaining this weird triangle despite having a tricky algoirthm to expand if we increase max entities at runtime; it would be far simpler to just use a 2d array, use only the handshake cells, and it is trivial to expand.
No description provided by the author
No description provided by the author
No description provided by the author
the EntityManager is requested to despawn an entity.
No description provided by the author
No description provided by the author
used by the EntityManager to hold info about the allocated entities.
Provides services related to entities.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
a state val which can *set* modal values in the worldstate as the action chain runs forward, and which can *read* modal values when an action's pre is being checked.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
moves entities according to their velocity.
No description provided by the author
Like the above, but it can be reset while sleeping.
No description provided by the author
No description provided by the author
used to store a set of logicUnits which want to be executed together and frequently, but which are tolerant of being partitioned in time in order to stay within a certain time constraint (for example, running all the world logic we can within 4 milliseocnds, picking up where we left off next Update() loop).
No description provided by the author
No description provided by the author
responsible for spawning screen message entities managing their lifecycles, and destroying their resources when needed.
No description provided by the author
used to compute the spatial hash tables given a list of entities.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
a list of entities which have active = true, which receives updates to its contents via the Signal() method.
simple 2D vector geometry class.
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
used so that game code using the engine can define their own contiguous arrays of complex struct types and take advantage of cache-line performance rather than use the `Generic` component type which stores `interface{}` (thus involves dynamic allocation peppered through memory that won't have nice contigous cache lines)
the user should define the Allocate() function so that it allocates the contiguous memory (slice), and Name() should return the name, for example, if the CCC is holding StateTree objects, the name should be "StateTree"
notice that the accessor method is defined for generic pointer return, which corresponds to the Entity.GetCustom() method defined in component_table.go
so, user code should cast to the appropriate type on retrieval
for example:
st := e.GetCustom("StateTree").(*StateTree).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
used to communicate insert / remove events.
No description provided by the author
No description provided by the author
SpatialHashTable is the table of cells; the actual data structure is a gridX x gridY matrix where each cell is []*Entity.