-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Position is handled by a resource which tracks where specific entities are & what set of entities are on specific locations. Each floor gets its own hashmap in order to have somewhat acceptable find-within-area queries. Previously an index of colliding entities was maintained, but as movement has moved away from transactional batches the need to iterate over the set of all colliding instances as vanished
Ticker manages events. Originally started as an event queue which drained every frame, it expanded to carry future events to handle thrown physics & multi frame melee instances
A Tick is a frame ID, subframe ID pair. Ticker stores events in a binary heap which it can be requested to pop all ticks with a the current frame ID. It also stores a hashmap of frame ids to current subframe ids
Currently actions are implemented as boxed functions taking mutable references to RNG & World. I intend to move these specific actions into an enum eventually
rg uses a scanline floodfill algorithm. It avoids redundant lookback by using 2 stacks: an up stack & a down stack. When a segment finds itself expanding, it queues segments to go in the opposite direction on the expanded portions. This is handled by flipping up/down parameters to the roll method