erkie / erkie.github.com Goto Github PK
View Code? Open in Web Editor NEWAdding asteroids to any site on the web
Home Page: http://erkie.github.com/
Adding asteroids to any site on the web
Home Page: http://erkie.github.com/
Hello there,
I have managed to change the ship shape to an arrow by editing the playerVerts, however, when the game initializes, the shape is in a wrong angle (pointing to the left), could you please tell me which line I need to edit?
Regards
James
Fly Erkie (hold Up). Let go. Watch him decelerate.
Now fly Erkie, and then start holding Left or Right continuously.
A. Let go of Up. Note Erkie starts spinning in place.
B. Keep holding Up. Note Erkie will indefinitely travel in approximately his previous direction of travel.
I would not expect A and B to have vastly different outcomes. I would expect that, in B, the ship would fly in circles, approximately in place.
I would say, personally, this is a game changer.
Letting asteroids roam a website is a really good idea and I'm surprised it hasn't caught on like it should. Maybe there's a marketing issue here? I would suggest SEM, like AdWords, to spread the word.
Again, like it a lot.
Let's list indestructible objects that you find.
I noticed:
This is great, but it would be even better if I could launch some missiles to destroy Flash elements.
Click on the New Asteroids bookmarklet, press esc to cancel, and click again. Nothing will happen.
The escape key doesn't work in Safari 5.1 on Lion to exit the applet. It seems clicking around on the page sometimes helps escape to work.
Additionally, the app store ad at the top of the page doesn't dismiss after a successful exit.
If you run the bookmarklet multiple times on the same page, you'll get multiple ships. Actually quite fun to do (they get out of sync pretty quickly, mayhem ensues)! However, each instance also gets a scoreboard and they all stack up into an unreadable mess of text :(
If you start the script in a particular browser size, it seems if resizing the browser doesn't quite carry over -- it'll remember that smaller size and wrap around within those smaller constraints even though the actual window is bigger.
I love this shit but it would be very handy if I can add a specific class to elements so that they cannot be destroyed.
Nothing happens when it is brought up except when it is used to create a new tab. chrome element/resource explorer is claiming there is an uncaught exception in the 'tagname.toUpperCase' function, saying tag name has no toUpperCase function.
when activated on a give page, join with other people that are also viewing the page with asteroid activated
Inspired by Anders Bjarby
Invoke the bookmarklet
Wait in sadness as the ship never shows up
Open the developer console and witness:
Uncaught TypeError: Object #<an SVGAnimatedString> has no method 'indexOf'
addClass
updateEnemyIndex
Asteroids
(anonymous function)
(anonymous function)
github likes to have a README file so it can show it on the main project page. A simple description and license text would be nice.
Used to work great in Safari OS X v4.0.5 (4531.22.7) but just tried it and it now yields the error:
"TypeError: Result of expression 'stylesheet.styleSheet' [undefined] is not an object."
The console also states that the error is on line 25 of asteroids.min.js
FYI: For comparison, the version on the Kottke blog (where I originally found this great script) does still work in Safari as they are serving up a local copy of an older version there.
Hi there, great stuff!
Unfortunately, the ship color (transparent with black border) makes it invisible in black backgrounds... It could be white with black border instead ;-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.