Why do Sparks stay for infinity?

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
Post Reply
User avatar
iDiot / sPuNkY
Average Program
Posts: 54
Joined: Fri Apr 21, 2006 5:46 pm
Location: instruction trace cache
Contact:

Why do Sparks stay for infinity?

Post by iDiot / sPuNkY »

Backstory:
Since a few month AA suffers from a lack of FPS...
When a round starts I get over 700 FPS...
but as soon as the first player ginds the FPS drops dramatically..
(sometimes down to 40-50 FPS)

When I disable the Sparks the drop is not as nearly as dramatic..
So I was wondering why...

I played with the Display Settings and disabled the Alpha Blending..
Then I saw it... It seems that all sparks created in a round stay forever
and wonder of the grid into infinity (still being rendered by my computer)..

And it seems this is happening with "Alpha Blended" sparks, too...

So one question: Why is that? Why does my computer has to render
"objects?" even if they are clearly not needed anymore?
(happens with an old 0.3.0 and a newly build 0.3_alpha20080319..
I have not tested it with a 0.2.x version)

I made a little video for those visual types of you...

http://de.youtube.com/watch?v=C_9x7kISAjo

(better quality available on request.. I did not want to spoil my webspace)

System:
Windows XP prof. SP3
core 2 duo @ 2x3GHz
GForce 8600GTS 265MB
2GB Ram...

VSync is disabled...

(should be able to render AA with much more than 50FPS...)
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

I suppose this might be because the particle engine was never really finished. It's still a work in progress as far as I know. The goal was to transition from using our own method of drawing and placing sparks to using some sort of algorithm/library that some very clever computer science person developed. It just never got finished. No one probably ever noticed that sparks were hanging around.

Lucifer?
Image
User avatar
Lackadaisical
Shutout Match Winner
Posts: 823
Joined: Sun Dec 21, 2003 4:58 pm
Location: Amsterdam, Netherlands
Contact:

Post by Lackadaisical »

Bump because I'm curious as well about this.. the difference between sparks on/off in a fortress match where everyone grinds at the start is really kind of ridiculous.
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

It's precisely as Tank said, AFAIK.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

The new, unfinished particle system keeps them around for infinity, which is one of the reasons it's still considered unfinished. The old sparks shouldn't, they get deleted after awhile.

So, if you've built with the new system turned on, please turn it off, it's not playable yet. :)

If you're using the old system, I don't have an answer, because I've studied the code, particularly the part that deletes the sparks when it's done animating them. Z-man? ;)
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

The old system should delete expired sparks just fine :) At least, any FPS drop it causes always goes away after the sparks are gone in my experience.
User avatar
nsh22
Round Winner
Posts: 378
Joined: Fri Sep 07, 2007 8:12 pm
Location: eating, cooking or writing (about cooking).
Contact:

Post by nsh22 »

btw, how in the hell did u get 700 fps lol
User avatar
iDiot / sPuNkY
Average Program
Posts: 54
Joined: Fri Apr 21, 2006 5:46 pm
Location: instruction trace cache
Contact:

Post by iDiot / sPuNkY »

Thank you for the answers. I do understand now and I hope this problem will not occur in the next release.
(I only play the betas because of the customizeable HUD)

nsh22 wrote:btw, how in the hell did u get 700 fps lol
Disable vsync and use a proper Computer :wink: .
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

Don't turn off vsync, unless you have a crappy video drivers which does not do it correctly(ie you don't get 60 fps). It's there for a reason.
Post Reply