Ahaha, generally, you use a
language to make an engine.
* Suffix strokes his sandpapery chin
The use of an engine is to render objects so that they can interact with each other, right? Older Mario games are all tile based, so if your engine rendered all the blocks as a sort of 2D array, you could check to see if your character's position was about to enter that space is currently taken up by a block or other object. To be honest, this is all theoretical. I have no experience in making sidescrollers other than that one experiment I did on Deezer's birthday, where hit tests with other objects dictated the player's situation. That did not work out so well, but it was hilariously glitchy.