summaryrefslogtreecommitdiff
path: root/utils/utils.lua
AgeCommit message (Collapse)Author
2025-03-13feat: player now can click right to punch mobsEltrac
2025-03-13refactor: read object list as a utility functionEltrac
2025-03-13fix: shots do not die in contact with wallsEltrac
2025-03-13refactor: move room switch trigger to door contactEltrac
due to the requirement for adding doors and door bodies before initializing body lifecycle manager, move lifecycle manager to game initialization and create more bodies with this manager
2025-03-12chore: better onContact hook when dealing collisionsEltrac
2025-03-11refactor: add walls as world bodyEltrac
2025-03-11refactor: maintain all objects in room objectEltrac
2025-03-09Revert "feat: remove door back when entering a new map"Eltrac
This reverts commit c4b1a488b3c995dff5597f1dc4e725232682c231.
2025-03-09feat: remove door back when entering a new mapEltrac
also ensure randomness when connecting two rooms
2025-03-07fix: some rooms are not accessible due to door misplacementEltrac
2025-03-04perf: localize all objects moduleEltrac
2025-03-04refactor: rewrite map generationEltrac
2025-03-04refactor: simplify room generation functionEltrac
2025-02-25feat: shiny hearts speed up player and stun enemies within rangeEltrac
2025-02-23fix: some rooms spawns with no enemiesEltrac
Due to incorrect reference to room date directly, killing enemies in one room means killing enemies in other rooms of the same kind. The problem is now fixed by copying room data instead of referencing it.
2025-02-22refactor: reuse isBlocked() functionEltrac
2025-02-21fix: incorrect collison detection /w player and obstaclesEltrac
2025-02-20feat: place obstacles in roomsEltrac
2025-02-20refactor: use Body objectEltrac
- Body defines an object's size and shape - Body provides a universal function to detect collision
2025-02-19refactor: organize project structureEltrac
- change the way modules are imported, defining module directly in globals - move enemy data and heart data into individual files and /data directory
2025-02-19fix: screen darkens when player is shieldedEltrac
2025-02-18style: remove commentEltrac
2025-02-18feat: entering new roomsEltrac
- door connects two rooms - detects if player enters a door, if so, then switch room and update player location
2025-02-16feat: detect obstacles for bulletsEltrac
also, add another utility function for obstacle detection with no specific direction (often used when no further movement is required)
2025-02-16refactor: encapsulate obstacle-detection as a util functionEltrac
2025-02-16refactor: project structureEltrac