Code cleanup
roscale opened this issue · comments
Alex Rosca commented
After implementing fixed timestep physics
- Split main into multiple files (or functions at least)
- Remove "magic numbers". Maybe create a file containing all the game constants
- Move some free functions into custom traits or implement them as members (
get_block_aabb()
is a good contender for example) - Implement the Iterator trait for Chunk instead of writing a triple-for loop each time we want to iterate over all the blocks of the chunk
- Reduce complexity of functions by splitting the functionality into multiple smaller ones (main and physics modules need some work)
- Add comments and references to all external resources used. Briefly explain the algorithms and methods used to accomplish various tasks (collision detection and resolution for example)