2D Physics Engine! // Code Review

Published: 20 November 2022
on channel: The Cherno
51,500
1.4k

Keep exploring at https://brilliant.org/TheCherno/ Get started for free, and hurry—the first 200 people get 20% off an annual premium subscription.

Patreon ►   / thecherno  
Instagram ►   / thecherno  

Twitter ►   / thecherno  
Discord ►   / discord  

Code ► https://github.com/St0wy/GPR4400-Phys...
Designing a Physics Engine in 5 minutes ►    • Designing a Physics Engine in 5 minutes  

Send an email to [email protected] with your source code, a brief explanation, and what you need help with/want me to review and you could be in the next episode of my Code Review series! Also let me know if you would like to remain anonymous.

CHAPTERS
0:00 - Recap
1:14 - How to design an API
2:52 - 2D Physics Engine design
9:02 - Pointers and ownership semantics
13:00 - Using std::weak_ptr to be "safer"
14:39 - More physics
16:42 - Spatial partitioning for optimization
22:55 - Be careful when trying to optimize!
26:37 - Physics solvers
31:50 - Final thoughts and extra challenges

This video is sponsored by Brilliant.

#CodeReview


Watch video 2D Physics Engine! // Code Review online without registration, duration hours minute second in high quality. This video was added by user The Cherno 20 November 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 51,500 once and liked it 1.4 thousand people.