Post by Lýfelíëk Heroblãde on Jun 9, 2008 4:34:44 GMT -5
From http://blog.nihilogic.dk:
Seems I just can't let go of Mario. This is a prototype of a Javascript Mario Kart-like racing game.
It uses the canvas element to do most of the rendering and should work in both FF2, FF3, Opera(9.27 and beta) and Safari 3.1.1. There are a few glitches in Safari in the kart sprites, but other than that it should be playable. Also, if you're using WebKit nightly builds, make sure you're using the latest, as some of the recent ones had some canvas problems. I haven't even considered getting IE support, sorry.
The (minified) code weighs in at about 11 Kb, but unlike the Mario game from last month, this one uses several external image files. This was more a test of how smooth I could get a game like this to feel, anyway, so filesize wasn't an issue. I think it runs pretty ok, though.
There are a couple of rendering settings you can play with. "Quality" controls how many horizontal lines are rendered, "Screen scale" controls the size of the screen (duh). Both trade visual appearance for performance.
There are also two different rendering modes. The "Single canvas" mode seems the fastest for all browsers (EDIT: People in the comments have reported better performance with "Per-line" when using FF3 beta). For the technically curious, the difference is in the way each horizontal line is rendered. In the single canvas mode every line is drawn unto the same large canvas, whereas in the "Per-line canvas" mode, each line has it's own canvas. They both give different visual appearances, so try them out if you want.
The sprites were all found at The Shyguy Kingdom and the maps were found at Rick N. Bruns' snesmaps.com, so thanks to those two sites!
So far, it's just racing. No weapons or any of that fancy stuff. At the moment, you can choose from 3 different drivers (Mario, Luigi and Princess Peach) and 2 different maps (Mushroom Cup Round 1 and 2). There is no lap count, no timer and no finish. You can just race around forever and try to beat the others (it's not hard, especially if cut a few corners). The AI is rather crude, but seems to work ok for the time being.
There is (simple) collision detection against the boundaries of the map and the colored "blocking" blocks, but not against the karts, so you can't crash into the other drivers. Drive safely, anyway!
It uses the canvas element to do most of the rendering and should work in both FF2, FF3, Opera(9.27 and beta) and Safari 3.1.1. There are a few glitches in Safari in the kart sprites, but other than that it should be playable. Also, if you're using WebKit nightly builds, make sure you're using the latest, as some of the recent ones had some canvas problems. I haven't even considered getting IE support, sorry.
The (minified) code weighs in at about 11 Kb, but unlike the Mario game from last month, this one uses several external image files. This was more a test of how smooth I could get a game like this to feel, anyway, so filesize wasn't an issue. I think it runs pretty ok, though.
There are a couple of rendering settings you can play with. "Quality" controls how many horizontal lines are rendered, "Screen scale" controls the size of the screen (duh). Both trade visual appearance for performance.
There are also two different rendering modes. The "Single canvas" mode seems the fastest for all browsers (EDIT: People in the comments have reported better performance with "Per-line" when using FF3 beta). For the technically curious, the difference is in the way each horizontal line is rendered. In the single canvas mode every line is drawn unto the same large canvas, whereas in the "Per-line canvas" mode, each line has it's own canvas. They both give different visual appearances, so try them out if you want.
The sprites were all found at The Shyguy Kingdom and the maps were found at Rick N. Bruns' snesmaps.com, so thanks to those two sites!
So far, it's just racing. No weapons or any of that fancy stuff. At the moment, you can choose from 3 different drivers (Mario, Luigi and Princess Peach) and 2 different maps (Mushroom Cup Round 1 and 2). There is no lap count, no timer and no finish. You can just race around forever and try to beat the others (it's not hard, especially if cut a few corners). The AI is rather crude, but seems to work ok for the time being.
There is (simple) collision detection against the boundaries of the map and the colored "blocking" blocks, but not against the karts, so you can't crash into the other drivers. Drive safely, anyway!