Design Patterns
10 reasons to use Design Patterns to design a game, 10 reasons not to, an approach to design an extensible, 2d action rpg game using vanilla javascript
https://gameprogrammingpatterns.com
GIM6UU2V
architecture is about change (https://gameprogrammingpatterns.com/architecture-performance-and-games.html)
And also, testing…
Phaser.HEADLESS
https://dev.to/davidmorais/testing-phaser-games-with-vitest-3kon
Data structures
Memory, Cache Locality, and why Arrays are Fast (Data Structures and Optimization)
Pass by Value vs Reference (JavaScript): Memory, Functions, and more!
pass by value – packages a copy of the values (more memory use)
pass by ref – passes a ref to the values (less memory use)
JS chooses it fo you…
primitive types are passed by type, non-primitive types are done by reference
underscore for function names in javascript
Spatial Hash Grids
problem –
Spatial Hash Grids & Tales from Game Development
optmising it:
LERP – Linear interpolation
An In-Depth look at Lerp, Smoothstep, and Shaping Functions
smoothstep:
MVC design pattern
controller class
display class
game class
engine class (utility items etc)
AN example – Create a Platformer Game with JavaScript – Full Tutorial
Keep them as separate .js files
Observer
https://refactoring.guru/design-patterns/observer