I wrote it because of the html5.
Post your scores.
(, Fri 25 Jan 2013, 0:18, Reply)
But I have no idea what's going on. I know of the game, never played it before though.
Edit: Switched to Chrome, makes more sense now, doesn't work properly in Opera.
Edit2: It's fantastic, by the way
(, Fri 25 Jan 2013, 0:24, Reply)
Well, a lot, really. A javascript console of errors would be fab.
(, Fri 25 Jan 2013, 0:32, Reply)
It seems to totally ignore the cursor and all the missiles go south-east.
Then there are errors on impact: see zoril.co.uk/down/misscom.jpg
(, Fri 25 Jan 2013, 0:41, Reply)
It's a mess, I know. (boo hoo hoo I need to get my idioms together)
But it might have to do with concurrency and a lack of resource locking, but I'm still struggling with concurrent programming.
Using setinterval can of course create a, what did they say at 4thur? Cardigan integrity?
(, Fri 25 Jan 2013, 0:47, Reply)
It seems Opera/IE use offsetX/offsetY, not layerX/layerY.
This seems to work:
mouse_x = (evt.layerX || evt.offsetX) - xy[0];
mouse_y = (evt.layerY || evt.offsetY) - xy[1];
(, Fri 25 Jan 2013, 1:22, Reply)
Well I did anyway, man that's funky to parse!
But thank you for the patch!! Does it work now?
www.zettix.com/Graphics/js/missile_command.js
Diffs are hard because of the angle brackets...
< var x = 0;
< var y = 0;
< if (evt.layerX || evt.layerX == 0) { // Firefox
< x = evt.layerX; y = evt.layerY;
< } else if (evt.offsetX || evt.offsetX == 0) { // Opera
< x = evt.offsetX; y = evt.offsetY;
< }
< mouse_x = x - xy[0];
< mouse_y = y - xy[1];
---
> mouse_x = evt.layerX - xy[0];
> mouse_y = evt.layerY - xy[1];
(, Fri 25 Jan 2013, 1:35, Reply)
Hah, I see what you meanabout the brackets
1075,1076c1075,1076
< mouse_x = (evt.layerX || evt.offsetX) - xy[0];
< mouse_y = (evt.layerY || evt.offsetY) - xy[1];
---
> mouse_x = evt.layerX - xy[0];
> mouse_y = evt.layerY - xy[1];
edit: obviously this diff won't work now, but if you wanted to compress those if statements, this works too.
(, Fri 25 Jan 2013, 1:41, Reply)
But if I don't chew on something I'm afraid I might puncture my skull with unused curiosity.
(, Fri 25 Jan 2013, 1:55, Reply)
Anyway, time for me to stop shooting stuff in favour of bed I think
(, Fri 25 Jan 2013, 2:06, Reply)
I admire people who can code, because I wish i could do it. I love games. I want to make games. I can't code. Or draw. Or do maths.
(, Fri 25 Jan 2013, 2:06, Reply)
You can read 300 lines of code, you can make a game.
The missile command clone is built on this real basic stuff:
www.zettix.com/Graphics/js/dodge.html
Hit "view source" and just relax and read it casually. It will click after a short while and then you will have your mental tsunamis.
[Copyedited sneak misspellings inserted by cr3's nefarious code]
(, Fri 25 Jan 2013, 2:09, Reply)
I just looked at your code. I think the problem here is that I'm quite thick.
(, Fri 25 Jan 2013, 2:23, Reply)
Everything made sense until HTML. Then legions of retards took over. The majority of web development these days is fixing bugs. Most people get 5 nosebleeds before making their 1st web page. When faced with viewing html source most people prefer sticking needles through their eyelids using lemon juice as a lubricant. After a while questions like "my dick goes where" lose meaning and you just do it so it works.
Then you have bugs and scramble like someone dying in quicksand for arcane advice.
In this case posting to b3ta was such a line.
(, Fri 25 Jan 2013, 2:34, Reply)
www.zettix.com/Graphics/js/yellowtables.html
I kind of love 3w schools for the same reason I hate them. They are brief, and they expect you to get it real fast.
Still, you won't find my oddball quadtree program on 3schools, but the wealth of knowledge is without compare. Bookmark them now.
www.w3schools.com/
I could cry in joy for the rest of my life if I wasn't so dysfunctional, but I make my living in front of a computer. How cool is that?
(, Fri 25 Jan 2013, 2:46, Reply)
www.codeacademy.com
It'll get you all the basics and hopefully drive you enought o learn more. I'm currently working through the python. I'm a PHP dev but want to learn python for making shit games. Most languages have the same basic logic, but the syntax is different is all!
(, Fri 25 Jan 2013, 8:09, Reply)
Until then, I am deeply apologetic with regard to the incompatability with Apple's lovely renegade browser. While not having Opera myself is no excuse, pointing out browser friendliness is difficult will win no accolades, so submit to the blame. I am deeply sorry.
(, Fri 25 Jan 2013, 0:55, Reply)
Was hindered on the first level by not realising that A, S, and D fired the 3 interceptor stations.
Love me some Missile Command though. I used to rule at that game! =D
*clicky*
(, Fri 25 Jan 2013, 0:32, Reply)
But I like games that don't tell you right away how they work! That's the new fun!
(, Fri 25 Jan 2013, 0:33, Reply)
but still got 500. How do you fire? Don't tell me there are instructions to read, coz I won't.
(, Fri 25 Jan 2013, 1:24, Reply)