Commit Graph

10 Commits (dc760bf8db899ae596c9f172d35adf283c1adbb5)

Author SHA1 Message Date
En Yi dc760bf8db Attempt to apply code style consitency
Squashed commit of the following:

commit 249fb96c63f68913ef632b8d1006e8a2d1c1b6d3
Author: En Yi <en.yi@tutanota.com>
Date:   Sat Apr 15 22:51:08 2023 +0800

    Ensure 120 column width limit

    Changelog:
    - this is just to avoid overly long line of code

commit 4b1ffa8fc89f17418de15f5fc3f0e73040f1d40c
Author: En Yi <en.yi@tutanota.com>
Date:   Sat Apr 15 20:05:07 2023 +0800

    Ensure style consistency in For loop

commit dcb41960407224592f78278313e97c2cc4bf66a5
Author: En Yi <en.yi@tutanota.com>
Date:   Sat Apr 15 17:26:20 2023 +0800

    Ensure consistency in code style

    Internal Changelog:
    - Use char* var instead of char *var. Preference
2023-04-15 22:52:38 +08:00
En Yi 82b8a3b988 Implement simple animation system
Changelog:
- Add sprite map for player
- Add an animation system
- Add a placeholder player sprite transition function
2023-03-18 13:55:55 +08:00
En Yi ac6d93565b Add Sprite Component
Changelog:
- Move Sprite struct into components
- Add asset field in engine
- Update scene test code to add engine for assets
    - This fixes the crash when q is pressed
- Add sprite component to player
- Update render function to draw the sprite
2023-03-13 21:12:37 +08:00
En Yi 45972d6416 Slow down player when crouching
Changelog:
- Add friction coefficient to transform component and its update system
2023-03-04 09:36:26 +08:00
En Yi c8ea03359c Prevent crate bashing at the corner
Changelog:
- Allow two hitboxes in hitbox component
- Create a cross-shaped hitboxes for player
2023-02-28 20:54:48 +08:00
En Yi a8567e2666 Implement hitbox and hurtbox system
Changelog:
- Add new components: hitbox and hurtbox
- Update player and crates with hitbox and hurtbox
- Add printing of mempool stats
- FIX CRITICAL BUG: use entity idx when removing from component map
    - Previously, it incorrectly uses the component idx
- Check for entity aliveness before removal and collision checks
- KWOWN ISSUE: Player can get stopped by metal crates when walking on
  them
2023-02-16 22:44:05 +08:00
En Yi cf38949956 Fix jump spam and recovery
Changelog:
- Hold to jump is removed. Need to release jump action to recover jump
- Fix jump recovery issue when interacting with crates and ground
2023-02-14 23:05:31 +08:00
En Yi 9106899c8a Remove unused components 2023-02-11 22:12:17 +08:00
En Yi e2ae30e45e Prepare for menu scene implementation
Changelog:
- Add components:
  - selectable : indicate an entity is selectable
  - selection : indicate an entity has a list of choices
- Add menu scene implementation and test
- Reduce repetition in CMakeLists in specifying libraries
2023-01-31 21:17:11 +08:00
En Yi e1cbce2703 Make a directory for ECS
Changelog:
- Move Entity and Component files into a dedicated folder
- This is for clean up
2023-01-21 09:38:14 +08:00