It is currently Sat Nov 23, 2024 5:12 pm



Reply to topic  [ 7 posts ] 
fun with javascript 
Author Message
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post fun with javascript
I play with javascript from time to time to keep my skills sharp, try new stuff, and because it's a nice diversion from the things I hate. At any rate, I created this:

http://clankiller.com/stuff/jsBurst/

It works in IE8, Chrome and Firefox for sure... since it's that cross-browser, it'll probably work in other browsers as well. It's an interesting comparison, too... from my testing, IE8 performs a bit better than Firefox, and Chrome whoops both their asses.

*edit*
err, in case someone can't figure it out, click or click & drag.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Thu Jun 10, 2010 1:21 pm
Profile WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 5:09 pm
Posts: 4004
Location: Walsall, West Mids, UK
Reply with quote
Post Re: fun with javascript
He that's pretty cool.

Is it possible to configure it to detect if FPS drops to force performance etc?

Just curious - so no real reason for asking.

On my laptop, it slowls down after I draw a line about half way accross the screen (My laptop is pants) which allows me to keep drawing more and more and more when it finally freezes. If you forced a stop if frame rate was low, you could keep it looking smooth.

Also, if you could have an actual pause feature, to click and place many 'bombs' etc.

Sorry, I'm bored ;)

_________________
Games to complete:
GTA IV [100%] (For Multiplayer next!)
Fallout 3 [50%]
Rock Band [35%]
http://www.cafepress.com/SmeepProducts


Wed Jun 16, 2010 4:07 pm
Profile WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post Re: fun with javascript
Hmm... there's no direct way to detect framerate... ie, I can't just tap into some API to see frames per second. However, every time something moves/changes, it's actually looping through something. I might be able to set up a timer to see how often these loops are being executed.

The pause thing, yes, that's certainly doable. :twisted: I could just have you click and remember all the click positions, but not set off the timers that cause the magic to happen. Then when you push a button or something, all the timers kick off at once.

BTW, if you use Chrome, you'll get significantly better performance.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Thu Jun 17, 2010 6:34 am
Profile WWW
Stranger
User avatar

Joined: Sat Apr 12, 2003 1:14 pm
Posts: 6362
Location: Estonia
Reply with quote
Post Re: fun with javascript
And a flashing blue background :D

_________________
When someone asks how rich you are, quote Rinox " I don't even have a rusty nail to scratch my butt with...!"

Be well or Get Help!!


Thu Jun 17, 2010 7:01 am
Profile
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post Re: fun with javascript
heh... can't help the flashing blue background, unfortunately. It's because the browser is interpreting the click & drag as an attempt to drag-select stuff on the page. I've been unable to find a counter for that... I have some javascript that de-selects, but that doesn't keep it from getting selected for a moment first. *shrug*

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Thu Jun 17, 2010 7:29 am
Profile WWW
Minor Diety
User avatar

Joined: Fri Apr 11, 2003 5:09 pm
Posts: 4004
Location: Walsall, West Mids, UK
Reply with quote
Post Re: fun with javascript
Just gonna try it on my PC - I don't get a blue flash on my laptop.

I was very, very tired when I typed what I did last night and as I read it I had a heart attack at my spelling.

EDIT: Nope, no blue flash on PC neither :)

_________________
Games to complete:
GTA IV [100%] (For Multiplayer next!)
Fallout 3 [50%]
Rock Band [35%]
http://www.cafepress.com/SmeepProducts


Thu Jun 17, 2010 12:41 pm
Profile WWW
Felix Rex
User avatar

Joined: Fri Mar 28, 2003 6:01 pm
Posts: 16662
Location: On a slope
Reply with quote
Post Re: fun with javascript
I think it partly depends on the browser, but I'm glad it works for you. :p If I get some time, I'll see if I can make some mods to it.

_________________
They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety.


Fri Jun 18, 2010 6:16 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.