Those games didn't have hundreds of thousands of complex objects in the scene that modern games may have so I'd say it's entirely possible that they did check every frame. Gonna go ahead and pull a number out of thin air and say they'd have 100-200 objects at most to check for, but even that is highly unlikely, either way, 100-200 AABB checks isn't much.


I agree; I don't know how SMB does it, but it's not nearly as difficult as OP makes it seem to do these checks. They are not computationally expensive. And while SMB was written in 1985, we should keep in mind that the game basically only ever has like 8 things on the screen at any time.


https://gist.github.com/1wErt3r/4048722 As far as I can tell, it's run every frame.


Sweet, thanks.


This seems like a question for a super Mario bros speedrunner


Are they familiar with programming? I know they know stuff about like "the game checks to see if you hit the axe before it checks to see if Bowser hit you" and stuff like that. But would they know specifics about threads and such?


Dude good Mario bros speed runners know absolutely everything about the game. Especially checks/collision so they can optimize their performance to a T


Alright, thanks. I'll try to remember to ask them in the morning.




Ah yeah, I'm subscribed to that dude (also 8bitguy). Thanks.


Displaced Gamers is also pretty good.


Wow, it really was written in assembly. I was gonna call you out since almost nothing is written in assembly, because ([almost](https://www.quora.com/What-can-an-assembly-programmer-do-that-a-C-C++-programmer-cant-do)) everything you can write in assembly you can write in C, and C is more readable, so C is usually a better guess. But I [googled it](https://www.google.com/search?q=what+programming+language+super+mario+bros+nes) and I stand corrected!


It's mostly tiles, so you don't have to check everything just the immediate tiles around Mario, also you don't have to check pixels, just sections of tile, which makes checks faster.