søndag 20. september 2009

Myth busted?

In my recently released "game" I think I kinda busted the vector point myth.. I used a background with a BAZILLION (23928 to be exact, and it DOES move.. :D) vector points and...

NO LAG?!?!

I think it depends on how you render the graphics. If you render at frame start, you're fucked, because the event will fire 24 times per second. If you render in the ADDED event, it renders ONCE, and that's it. This means delayed startup by a few milliseconds, but, uh, who cares about that, right?

Of course, this is the background, BUT, I tested with a character with a fairly high number of vector points, and he was happily, uh, flying around.

So... Myth busted? Comments are very welcome.

And as a side note.. FUCK PEN TOOL!! I'm sticking with my beloved brush tool. Brush tool FTW!

3 kommentarer:

  1. Could you explain more about "added event", and link to sources with information about it if you have? Haven't heard about anything like that can skip out on the FPS

    ...and there is no myth, Flash can handle alot of vector points and there are plenty of insane vector graphics images made in Flash. The problem is rendering high vector count images in 24 FPS (or higher), since it has to calculate the changes and that is taxing on the CPU when it gets heavy.

    There is also the fact that playing offline and online is two completely different things. Every byte counts online, and the .swf file can get quite large with complex vector shapes.

    If it is 20kb with light vector graphics, and 100kb with heavy vector graphics, it means the server holding the file has to serve 80kb extra.. if it becomes a popular game, thats effectivly "80%" increase in server bandwidth compared to how easy you could have made light vector graphics (I say "80%" because you have stuff like cache).

    ...also, the myth is a little exaggerated ;p Flash can handle more than what people think.. I hit the mark at around 10k (if I remember correctly) mostly because of the background moving and thus updating at 30 FPS ;p

    SvarSlett
  2. Veldig god jobb med anmering. Bra at du tester myten. Oppgaven er godkjent, men til neste gang skal blogg-rapporten være mer som en rapport; lenger og det skal skrives om prosess og dine tanker rundt oppgaven.

    Jeg har forresten lagt ut fullt kommentert kode nå på fronter inne i mappa vår.

    SvarSlett
  3. Interesting. You'll have to show me this tomorrow! I didn't know about added event. sWEEt!

    SvarSlett