3 ms·
The lack of runtime allocations in game engine programming comes from a different motivation: allocations are expensive, garbage collections are expensive, cach
by munchbunny 6y ago
The lack of runtime allocations in game engine programming comes from a different motivation: allocations are expensive, garbage collections are expensive, cache coherency matters, and you're chucking around a lot of very similar looking objects, so... object pools!
- orwin 6y agoYeah, the first time we coded a scroller shooting game with my friend (at school), we were baffled that our terminal-based scroller lagged more than the raycaster we did two weeks prior. Was it a C vs C++ thing? Turns out, creating then destroying every single missile/enemy was extremely costly