ClanKiller.com
http://forums.clankiller.com/

fun with javascript
http://forums.clankiller.com/viewtopic.php?f=8&t=3585
Page 1 of 1

Author:  Satis [ Thu Jun 10, 2010 1:21 pm ]
Post subject:  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.

Author:  Mole [ Wed Jun 16, 2010 4:07 pm ]
Post subject:  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 ;)

Author:  Satis [ Thu Jun 17, 2010 6:34 am ]
Post subject:  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.

Author:  Peltz [ Thu Jun 17, 2010 7:01 am ]
Post subject:  Re: fun with javascript

And a flashing blue background :D

Author:  Satis [ Thu Jun 17, 2010 7:29 am ]
Post subject:  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*

Author:  Mole [ Thu Jun 17, 2010 12:41 pm ]
Post subject:  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 :)

Author:  Satis [ Fri Jun 18, 2010 6:16 am ]
Post subject:  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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/