It's always disappointing when people's cool demos have obfuscated/minified JS source. It destroys the readability and hackability of the code, and it means that if you find bugs (like I did in this demo) you can't trivially fix them either.
I don't know why they even bothered un-white-spacing it. Doing so doesn't save much space, nor provide any kind of real obfuscation. At best it just makes it un-debuggable (hmm. seems like an oversight (that most debuggers also miss) that you can't set breakpoints inside a single line of code...)
welcometo: http://www.fullmalls.com
The website wholesale for many kinds of fashion shoes, like the nike,jordan,prada,, also including the jeans,shirts,bags,hat and the decorations. All the products are free shipping, and the the price is competitive, and also can accept the paypal payment.,after the payment, can ship within short time.
free shippingcompetitive priceany size availableaccept the paypal
===== http://www.fullmalls.com =====
For Ubuntu (and probably most of the other distros) theres a keyboard layout switcher. I'm sure there's something similar for windows and almost every browser. You can use those extensions to rapidly switch to qwerty layout when needed.
Of course, but why should I need to? Most "real" games let me remap the controls however I like. Is there a technical limitation of html5 that prevents that or is just that nobody bothers to implement it?
Personally, it usually doesn't cross my mind to remap the keys when I make simple games, because I'm so busy thinking about all the logic to actually make the game work. If the game is particularly simple, it's not worth my time to make a settings page anyway.
And if you think about it, mario is usually played on a device where you only have a limited number of buttons. There's no reason to remap the keys if there's only 6 buttons to use.
It's a Tetris clone and very much a work in progress: Only "Standard" mode (and the controls menu) is implemented at all. There's also a simplistic AI and it saves your replays, but none of that is actually integrated into the game interface-wise yet :\",
It's pretty interesting, a lot of people wrote/are writing high falutin' machine learning algorithms, but they are consistently trounced by good old A* techniques.
Is there anything like this for lua? It might be just the thing to help me finally learn the language (I have an inexplicable dearth of problems to work on in lua)...
Try looking through some of the resources for the Corona game engine (http://www.anscamobile.com/resources/). The SDK compiles Lua source into iOS and Android. I've just started looking at it myself -- it's the first time I have seen Lua code -- and it looks extremely clean.
Infinite Mario is actually a rather useful piece of code for all sorts of games research. It's a very good "simplest non-trivial example". The code itself is decently clean, OOP code, which a lot of open-source games, even those written in Java, are not.
The original[1] was made by the Minecraft guy. Like most of his projects, the levels are randomly generated. The levels themselves end, but there is no end to the actual game. It just keeps generating new levels.
I don't mean to sound cocky, but I don't get why people are still impressed by simple game demos in javascript. I've been working on a full Metroid-like game (some very old screenshots here http://ektomarch.com/games/) that'll have ~100 rooms, ~40 enemy designs, and a full plot for a year now and I've been doing it at a glacial pace, yet it's still nearing completion. How is it that seemingly nobody has made any real games in HTML5/javascript yet? We've had over a year of nothing but basic demos.
I think its partially that people are impressed by simple things when completed, more than complex things in the works. Looks like you have a cool game, but it will get the attention it deserves when its complete more than beforehand.
I don't think the GP was complaining about lack of attention given to his game, more wondering why nobody else has yet released a full game when he's almost done and not going particularly fast.
"Over a year"? Given that the canvas element was introduced in 2004, I suppose this is accurate.
I agree, I am also mystified by how people are consistently impressed with game demos that say little more than "See, we can now do some of the things that Flash has been able to do for ten years, as long as you run the right browser."
This seems to have the same property I've seen in quite a few other HTML5 games: the arrow keys get used for movement but also still get interpreted by the browser to scroll the page. Both seem important: I usually don't want anything to break the arrow keys for scrolling, but on the other hand for something like this I don't really want the page to move around as I play. (Of course, for something like this perhaps the page just needs to become small enough to not need scrolling, which would fix the problem, but the general issue still applies.)
This brings up a good point. The controls are even set swapped compared to gamepads, so using the wrong hand isn't comfortable. Old computer games did use the pc arrows of course. But now since this is a remake of the classic, it should at least be hand aware :)
Now that I think about it, it's really weird. I play FPSes at times, and WASD feels natural, but WASD+JKL for, say, Sega emulation feels wrong compared to ↑←↓→+ASD(/ZXC, for you crazy Japanese-targeted-game fans).
Which is why you restrict it by A) the list of known keys (the values are already in an array in the same file), and if you're feeling nice B) after clicking inside the container the game lives in.
All of which is mind-numbingly easy, but far below 50% of "HTML5" games I've played have done so.
The three starting lives are actually plenty, I stopped playing out of bordem not game over. By the time I stopped I was sitting at 12 lives and I think I died 3 or 4 times in the process.
Sheesh. That's why it's jumping up and down when you use the arrow keys. All keyboard input is based on checking `IsKeyDown`, and nothing else. `event.preventDefault()` please. Why do people do this? .preventDefault() is missing in a huge amount of HTML5 demos that aren't full-screen; surely it's not that obscure.
edit: seriously, that's all there is to it. Pop open the console / inspector in your browser of choice, and run this:
Viola. No more jumping. No more keyboard scrolling either, which is why you check if the cursor location / last-clicked location is within your canvas.
edit2: that aside, very nice work. Smooth playing and so far no glitches, and highly readable code :)
edit3: if you're on IE, that code is `event.returnValue = false` btw. Yaaay, IE :|
74 comments
[ 4.9 ms ] story [ 144 ms ] threadFor Chrome, there's the built-in de-obfuscator http://www.sitepoint.com/whats-new-in-google-chrome-12/
Crystal
Nope, it's actually open source.
I don't know why they even bothered un-white-spacing it. Doing so doesn't save much space, nor provide any kind of real obfuscation. At best it just makes it un-debuggable (hmm. seems like an oversight (that most debuggers also miss) that you can't set breakpoints inside a single line of code...)
[1] https://github.com/robertkleffner/mariohtml5
jordan shoes $32nike shox $32Christan Audigier bikini $23 Ed Hardy Bikini $23Smful short_t-shirt_woman $15ed hardy short_tank_woman $16Sandal $32christian loubo utin $80 Sunglass $15 COACH_Necklace $27handbag $33AF tank woman $17puma slipper woman $30
===== http://www.fullmalls.com =====
===== http://www.fullmalls.com =====
===== http://www.fullmalls.com =====
===== http://www.fullmalls.com =====
===== http://www.fullmalls.com =====
"Receiving objects: 100% (113/113), 1.07 MiB | 164 KiB/s, done."
Just 1 MB. Further
ubuntu mariohtml5 $ du -k code Enjine/
364 code
68 Enjine/
roughly 400K of code
And if you think about it, mario is usually played on a device where you only have a limited number of buttons. There's no reason to remap the keys if there's only 6 buttons to use.
It's a Tetris clone and very much a work in progress: Only "Standard" mode (and the controls menu) is implemented at all. There's also a simplistic AI and it saves your replays, but none of that is actually integrated into the game interface-wise yet :\",
Details and papers here: http://www.marioai.org
Video of last years winning entry at work here: http://www.youtube.com/watch?v=DlkMs4ZHHr8
It's pretty interesting, a lot of people wrote/are writing high falutin' machine learning algorithms, but they are consistently trounced by good old A* techniques.
For example, I modified Infinite Mario to become self-repairing: http://www.zenetproject.com/pages/lakitu
edit: I'm not sure about this, but I got the idea that it randomly generates the map/levels.
[1]: http://www.mojang.com/notch/mario/
http://www.youtube.com/watch?v=T2OytHzZ72Y
My favorite part is when he misses the goalpost in his first pass and then goes back a second time and hits it.
I agree, I am also mystified by how people are consistently impressed with game demos that say little more than "See, we can now do some of the things that Flash has been able to do for ten years, as long as you run the right browser."
I have a fix, if you're interested, in my top-level comment: http://news.ycombinator.com/item?id=2798835
Here's a pull request: https://github.com/robertkleffner/mariohtml5/pull/3 Feel free to comment / add.
All of which is mind-numbingly easy, but far below 50% of "HTML5" games I've played have done so.
http://www.microsoft.com/appliedsciences/AntiGhostingExplain...
edit: seriously, that's all there is to it. Pop open the console / inspector in your browser of choice, and run this:
Viola. No more jumping. No more keyboard scrolling either, which is why you check if the cursor location / last-clicked location is within your canvas.edit2: that aside, very nice work. Smooth playing and so far no glitches, and highly readable code :)
edit3: if you're on IE, that code is `event.returnValue = false` btw. Yaaay, IE :|