Computer Science Canada sparkle/explosion thing |
Author: | shoobyman [ Fri Jan 12, 2007 8:44 pm ] | ||
Post subject: | sparkle/explosion thing | ||
I made this sparkle effect for my space shooter (it was for an explosion effect). I will be posting the full game up in a couple of weeks. Although it is for my shooter, it is still a cool effect on it's own. There is some gravity somewhere in there.
|
Author: | CodeMonkey2000 [ Fri Jan 12, 2007 10:17 pm ] |
Post subject: | RE:sparkle/explosion thing |
Pretty cool. Only problem is that the sparkles should delete it self as soon as it gets off screen. Or have a limit on the amount of sparkles that apper on screen, it really lags on my comp. |
Author: | Saad85 [ Mon Jan 15, 2007 1:00 am ] | ||||
Post subject: | Re: sparkle/explosion thing | ||||
the lag factor needs to be cut down. a good way to do it is to make a procedure to kill them as soon as they go off screen. then, make a function to either return the lowest dead element in the array, or, if they are all full, make a new element and then return that. then, make the new sparkle in the returned value. also, check to see if the last element in the array is dead. if so, get rid of it. that's what i did in the game im making, which you can check out here http://www.compsci.ca/v3/viewtopic.php?t=14869 here's the specific code im referring to
because it's a function, it returns a value. that means you can then do something like this:
this way, you can cut down on adding to the array when it's not necessary. should improve the fps greatly |
Author: | agnivohneb [ Mon Jan 22, 2007 10:48 am ] |
Post subject: | RE:sparkle/explosion thing |
Very lagy. Should find a way to fix it |
Author: | Barloq [ Tue Jan 23, 2007 1:50 pm ] |
Post subject: | Re: sparkle/explosion thing |
Really laggy, but it is really cool! |