Re: [Atomos-discuss] That's the way the money goes; pop goes the weasel.
Status: Pre-Alpha
Brought to you by:
dleet
|
From: Scott E. <ps...@gm...> - 2007-01-11 21:22:48
|
On 1/11/07, Bryan Elliott <for...@gm...> wrote: > Scott: > > Nice clean code. I love it, and the dock in particular. Has me > > wondering if a version could be implemented for the AOS desktop. > > Along the lines of an applet maybe? > > Perhaps, but note that performance decreases dramatically with a greater > number of icons. There's little that can be done about it; it's because of > the way resizes are done in JavaScript under a browser (ie: somewhat > inefficiently). I mean, one could theoretically write Warcraft in > Javascript. All the components to do so are there and available (ie: sprite > placement and control), but (and I know this from experience; I tried. Had > a good pathfinder when it was just two peons and a few rectangular barriers. > ) when you get up to sheer numbers of stuff (at least 256 just for a 16x16 > viewport), performance drops down the tube, into the septic tank, and keeps > on racing down until suddenly bursting out of the ocean just off the coast > of Australia. Ok, please forgive me if this post isn't entirely coherent... Just finished a 17 hour shift. Lol - one of the benefits of being on-call 24/7. ;-) I can understand your comments about applying game development theory to web design... In fact, that might even be a good way to throttle the performance issue. Say that performance is acceptable with 6 icons, but not 16. Why not use parallax scrolling techniques? That's the way old 2D side scrollers (like Super Mario World for example) did it IIRC. Use an array that contains indexes to the icons, and then use a pointer and "window width" to show only the 6 icons currently available + portions of the two icons on either end of the "window" that may be (potentially partially) visible. CSS clipping techniques should work for this, same as it does for DirectX, SDL, OpenGL, Allegro, and other Graphics/Game development libraries. Using this technique the browser won't have to render/scale the 10 "extra" images all the time, therefore keeping performance manageable. (Not sure what impact preloading the icons would have in this situation but I suspect it would help... maybe not during page loading, but at "execution-time" perhaps.) I have several game programming texts laying around and would happy to provide some pseudo-code if you'd like. K, need some sleep. I'll reply to your other post just as soon as I get up and am more than 20% concious. ;-) - Scott PS - Are you familiar with the canvas tag? <insert-evil-grin-here> -- Scott Elcomb http://atomos.sourceforge.net/ http://search.cpan.org/~selcomb/SAL-3.03/ http://psema4.googlepages.com/ "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin '"A lie can travel halfway around the world while the truth is putting on its shoes." - Mark Twain |