Changelog:
- Add map to collect collision events
- Resolve collision events after the solid entity resolving
- Bounce player on collision with crates and destroy crates
- Add fragile field under bbox component. This makes it such that an
entity can push others away (solid) but still apply gravity (fragile)
- Ground check requires solid and not fragile bbox
- This basically allow player to 'pass through' crates as crates
are fragile but solid
Changelog:
- Render entity after tile, display numbers after entity
- Add array to avoid re-checking collision against the same entity
- Increase maximum entity
Changelog:
- Fix crouch not holding when ceiling is too low for uncrouch
- This is due to a removal of the check for low ceiling. However,
the current state of the crouch action needs to be stored.
So, use second bit of the is_crouch for this in player state.
- Remove bit fields in player state. Optimise later if need be
- Draw entities over tiles, and gridlines over entities
- This is to prevent water covering the entities
- rework this in the future maybe
Changelog:
- Add solid field in bbox component
- Ground check now checks for solid entities
- Reset acceleration after movement update
- Crates are considered solid
- Print info on spawning entities and spawned entities
Changelog:
- Add new component: container
- Add function to spawn a crate
- Refactor player spawning into level scene init
- Modify tile collision to work on bbox components
- Add actions to switch entity to spawn
- Update spawn system to spawn a crate
Changelog:
- Refactor ground and water state as a separate component
- Refactor upthrust and gravity calc. as a separate system targetting
the new component
- General modification to use the new component
Changelog:
- Store entity idx for component map as key. This allows reference
to the entity for related components in a system
- Modify systems to iterate over components instead following the
above change. This follows closer to the intended ECS architecture
Changelog:
- Move ground and water states into CTransform
- Update state in movement update system
- Use 2 bits to check state transition for water and ground
Changelog:
- Fix incorrect queue size init in mempool
- Replace map with boolean array for use list which is much simpler
- Remove unused component mempool
Changelog:
- Map space to jumping
- Allow jumps in water but lowered speed and with cooldown
- Update out<->in water transition logic and jumps handling
- Out->in water: if player center is in water
- In->out water: if player bbox is not in water
- Apply upthrust conditionally in water
Changelog:
- Add function to calculate offset needed to maintain anchor when
changing bbox size
- Simplify down bbox changing for player
- Some minor fix from last commit
Changelog:
- Make bbox handling a separate system
- Simplify crouch handling
- Remove grid update system as it is not useful
- As there is too many factors influencing the grid positioning,
it is not useful to pre-store the grids to check, might as
well compute it during checks
- Remove tilecoords component
Changelog:
- Adjust Gravity and movement accelaration
- Replace friction with acceleration instead of fractions of velocity
- Add upthrust in water
- Cut movement acceleration in water
Changelog:
- Add player state component to keep track of crouching
- Add crouch key handling
- Crouch mechanics:
- Reduce vertical bbox, slightly stretch horizontally
- Offset position to be on ground
- Reverse for un-crouching
- Can jump out of a crouch, reverting the bbox
- Dont allow un-crouch if there is something overhead (maybe should
check directly overhead, instead of a full overhead?)
- Above also apply for jump out of crouch
Changelog:
- Combine player collision handling with screen bounce
- Add simple single jump
- Remove ceilf and just remove the -1 to achieve the same effect in
broad-phase grid check
- Clip out small velocities
- Adjust general movement and friction
Changelog:
- Fix missing grid check in broad-phase collision check due to
float truncation. Use ceilf to fix this
- Cover a potential edge case of equal prev overlap. In this case,
use min overlap.
- Recompute acceleration for player every start of frame.
- Add gravity for testing
Changelog:
- Store player dir input in LevelScene Data instead of pointer,
to avoid use-after-free (non-fatal as mempool is used, but can cause
unintended behaviour)
- Only process player movement in system update. This is done in the
movement update system
- Normalise before apply acceleration, duh
Changelog:
- Add double buffer to handle key presses and release
- Add more actions
- Update action mapping of level scene
- Implement action function for level scene
- Remove action queue for Scene struct. This is handled by raylib
and the game engine
- Update scene struct with action function field
Internal Changelog:
- Implement scene boundary bounce system (subject to change)
- Add tilemap in preparation for collision system
- Allow early exit of scene testing
Changelog:
- Rewrite the Mempool Struct to be generic enough
- Static alloc for components mempool and entities mempool
- Component mempool now uses the component enum as index
- Update all mempool functions to work with the new struct
Internal Changelog:
- Update BBox component to use Vector2
- Add new CTransform component
- Implement level scene movement system and render system
- Implement scene test procedure
Changelog:
- Add actions and assets headers, not implemented and not used
- move original main to entManager_test
- Add proper main to create window and display nothing
- Implement scene base class and level scene
- Add a simple level scene test
- Update CMakeLists to compile main and tests
Internal Changelog:
- Use data store similar to component map
- Add init and free for entities tag
- Use enum instead of char for tag
- Switch to use clang for compilation
- Add -Wall for compilation