Super Mario in HTML5
florian-rappl.de
florian-rappl.de
This is an incredibly deep and fascinating topic in the context of the original Super Mario Bros. The answer to how close you can get to a wall edge is one or two pixels inside it. This is actually very important for SMB's playability, vastly increasing the tolerance for moves like jumping up in a narrow shaft or bending a jump to get on top of a block you're currently under.
The game then needs a mechanism to eject Mario out of those walls if he ends up inside. Among many emergent behaviors, this gives rise to the famous entry to Negative World, which occurs by fooling the game into ejecting Mario in the macroscopically wrong direction. (BTW, we hackers should know World -1 is really World <Blank>-1, accessed by entering a warp zone pipe before it initializes.)
Fascinating reading on the topic: http://tasvideos.org/GameResources/NES/SuperMarioBros.html
This sort of detail is absolutely key to making a Mario clone that feels right.
apart from <!doctype html> and <audio/> I do not see what is so HTML5 about moving divs using JavaScript.
A friend of mine hacked https://github.com/odbol/mariohtml5 with me during arthackday.net/gaffta . We made it a one-button game that you can only die once. It was fun!
I am using a recent MacMini (I bought it I think 6 months ago) and the browser is RockMelt (fork of Chrome).
Seriously, if it was slower, it would go backwards.
Have you tried it in any other browsers?
Not a great demo, but it's functional.
- Straight after you jump on enemies you're able to pass through some blocks
- You are not able to jump on top of shells and stop them from moving
- You could improve jumping
Heads up.