The Daily Click ::. Forums ::. Klik Coding Help ::. can too many particles cause lag?
 

Post Reply  Post Oekaki 
 

Posted By Message

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
9th February, 2014 at 09/02/2014 06:26:40 -

im just curious. because i'd like to use lots of active objects with set movements to make sp effects look neat, but most of the time ive done this it seems to slow the game down quite a lot. could this be due to the amount of objects or would it be because of the movement of the objects?

 
[Game design makes my brain feel like its gonna explode.]

nim



Registered
  17/05/2002
Points
  7234
9th February, 2014 at 09/02/2014 15:57:30 -

Try setting the Display Mode of your application to Direct X 9 in the Runtime Properties of your application.

 
//

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
10th February, 2014 at 10/02/2014 02:09:21 -

I tried that and it didnt help, it just made all my particles fade to a black cube when they were destroyed


 
[Game design makes my brain feel like its gonna explode.]

nim



Registered
  17/05/2002
Points
  7234
10th February, 2014 at 10/02/2014 14:01:36 -

Is your computer really old, then? HWA (enabling DX9) boosts performance so much that to see slowdown from sheer volume of objects you'd have to be deliberately trying to do just that.

I doubt it's movement, although I've experienced slowdown in one of my games when around 600 objects had built-in movement (even though they were all stopped.) The only other thing I can think of is if you're using a lot of fast loops. MMF doesn't seem to cope well with a lot of them, but there are techniques you can use to keep them in check, too.

How many objects do you have for the special effects?

 
//

J.C



Registered
  22/03/2013 05:18:14
Points
  118
10th February, 2014 at 10/02/2014 19:57:09 -

In my experience, it can. If you have an endlessly looping event that summons hundreds of particles at once that is. At least the flowing water example found on CastlesofBritain would demonstrate.

If you are looking for something like a sand or rainstorm, or some explosions here and there, then it really shouldn't be lagging your computer at all, unless its really old.

 
n/a

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
10th February, 2014 at 10/02/2014 21:40:28 -

No, my computer is quite good in fact. i can run borderlands 2 and the mass effect series plus others on max graphics settings no lag. and it might be the pre set movements of them then, because all the particle effects have set movements and when the effect happens it rockets the number of actives from 100ish to over 500 sometimes over 6 and 700. im guessing this is my issue. and im guessing the problem is partly due to how frequently this many objects are being created. so perhaps i will try to dither the amount of objects a bit and see if that causes a speed up.

 
[Game design makes my brain feel like its gonna explode.]

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
11th February, 2014 at 11/02/2014 00:06:19 -

So i decreased the amount of particles created for all my elemental effects and that sped things up a little, but not too much. although i went from spawning upwards of 400 objects to about 200-250. seeing as this is still too many, how many objects do you think mmf2 can handles spawning before it starts to lag?

 
[Game design makes my brain feel like its gonna explode.]

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
14th February, 2014 at 14/02/2014 19:25:05 -

Can you post an example?

Are you spawning tons of particles with blending effects on top of each other? If so, yes that can cause a lot of slowdown. Try temporarily disabling all blending effects to see if that speeds things up. If it does then your problem is, in fact, too many particles with blending effects.

 
n/a

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
27th February, 2014 at 27/02/2014 10:02:23 -

I changed the ADD effect to none and that got rid of almost all my lag. is there a way to use the shader and blending effects without getting that much lag?

it happens with shock weapons a lot and any fast firing elemental weapon. heres the link

http://www.mediafire.com/download/trbc5gq8pdmt92c/Celestia+Rebuild+0.8.exe

controls are as follows...
A,D: Movement
W: Jump (W in air for double jump)
Guns: aim at mouse
Left Click: Fire Gun
Right Click: Melee Weapon
Hold Shift: Dash
SpaceBar: pick Up weapon/ Open Chest
M: add 250 Creditz, exactly enough to open the chest
1: spawn gun near spawn point
2: spawn melee weapon near spawn point
L: add to experience bar

Edited by siven

 
[Game design makes my brain feel like its gonna explode.]

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
2nd March, 2014 at 02/03/2014 17:21:16 -

Had a few go-rounds with the 0.8 build...

No lag to speak of, and I use a laptop machine that's not been upgraded since I bought it like 6 or 7 years ago. I'd say your lag issues have been addressed for the time being.

I'd recommend the following:
- Allow the player to configure the controls to their liking by using CTRL+Y or something like that. I'd rather not jump by using the W key, for example. I'm not able to change any of the key assignments on my own.
- Allow auto fire for all weapons, or none at all. Personally I'd implement auto fire for everything, since frequent clicking with mouse-aimed games is a pain in the ass.
- Find a reason to have different currencies: money versus Credz. At this point I'm not able to spend money on anything, but that may be implemented in a later build. Otherwise I'd recommend you'd use a single currency for everything in the game to make things simpler (both for you and the player).
- Move the right-hand side HUD info (weapon stuff) to the upper-right corner. It frequently is in the way of the player's field of view.

The visuals seem very cool and distinctive, and the HUD portrait and info in the upper left looks very impressive. You've obviously spent a lot of time on this game so far. Keep up the great work!


 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
3rd March, 2014 at 03/03/2014 00:52:29 -

There are definitely issues...
It starts out fine, but gradually gets slower and slower, until it's a slideshow. That's even with me picking up all the dropped items, and even when there's not much happening on screen (no explosions / bullets /etc) - so I'd guess some objects aren't getting destroyed when they should be, or something like that.
I'm noticing some graphical glitches too, that appear to have something to do with the background - it looks like you're using parallax scrolling, but only one layer is visible - except for when body parts etc are randomly pasted into the background.
In an earlier post, you said you weren't using DX9 - if that's still the case, it's a big mistake.

 
n/a

Akai_R



Registered
  16/04/2008
Points
  436
5th March, 2014 at 05/03/2014 20:00:02 -

I just tried it as well, had no lag here, and I ran into, and blasted , a huge group of zombies without any issues...


However, I managed to get a slowdown when I found this weird bug:
Image
It's a small crack that let's you shoot projectiles up into the cliff, and they don't disappear.
So it might be a problem with object destruction as Sketchy said. Count every single instance of object while you play (monsters, guns, projectiles) and you'll see what should and shouldn't be there


 
______
http://akai-r.com/

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
7th March, 2014 at 07/03/2014 00:25:55 -

Interesting. i wonder why some people have lag and others dont. there has to be an event thats causing the lag, because anytime i do manage to have lag from the game its after playing for a little while. im guessing it has something to do with the elemental effects and one of them not being destroyed and building up off screen. thats the only thing i can think thats causing the lag over time issue.

@s-m-r: i had planned on adding in the ability to remap, i've just been too lazy to worry about it.
Also, all weapons do have autofire, if you ran into a weapon that was not autofiring or auto reloading it must have been glitched, which as of now i think i fixed that problem, dunno if that version has the fix or not though.
i believe i may have forgotten to mention that the money you pick up can be spent on the chests. if you have 250 and press spacebar while overlapping it will spawn a random gun. and the money and credz are the same, the money gives you more than the coins.
and yeah, i have no idea why i put that on the bottom of the screen lol. and thanks! ive spent quite a bit of time on the new graphics, especially elemental effects etc. most everything is now hand drawn on my 3ds with Colors 3d, except characters and such, they will still be sprited, probably just cuz i like the look of the clashing styles, dunno about anyone else though lol.

@ sketchy, i believe i did switch it over to DX9, if not ill be sure to change it next time i open up the project. currently, theres no parallax scrolling. its just a backdrop that sits still. ive noticed that toggling the "save background" or whatever feature on actives plays a part in the pasting to the background thing. i missed a few objects is all i think.

@Akai_R: .... i had no idea that crack was there. that is a big problem lol. im guessing that plays a huge part in the lag.

Thanks a ton for the feedback guys! hopefully ill be able to clean up this lag issue and get everything working right so i can start on an inventory system, though im sure that will be a long drawn out painful process seeing as ive never done one.

 
[Game design makes my brain feel like its gonna explode.]

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
7th May, 2014 at 07/05/2014 03:20:24 -

I think you should seriously consider your graphic effects here and start thinking about minimalism.
Your single-level example is over 50MB and a lot of your graphic effects actually distract from the game mechanics... like that dang crosshair.
Your game looks rife with unnecessary active objects. I'm sure if you converted most of them to background objects, you'd be able to include particle effects without much slowdown.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
23rd June, 2014 at 23/06/2014 05:09:09 -

not intending to revive a dead topic, but i just noticed the other reply. i have changed the display mode to Direct 3d 9 and it has completely removed all forms of lag from the game. i even spawned over 200 guns which previously caused immense lag, did nothing to the gameplay, i even intentionally spawned a x4 rapid fire lighting weapon, which had previously been able to cause the game to crash, no longer lags the game at all. the things that are active objects in the game, are so because they must be, i cant control backdrops the way i can actives. in fact, the reason the file size was so large is because there were actually an additional 4 frames in the project that were exported, but not accessible, i decided to clone the file, delete them and export the title screen and just the test level, and the file size dropped from over 50mb, to barely above 20mb. i realize 20mb is still a large game file for simply one level, but this one level has over 900 lines of events, a good portion of which will become global events in the finished project. regardless, the game will still be large, partly (actually almost entirely) due to the random gun generator. this game was never intended to be a small file size. by the time this game is finished... its going to be incredibly huge for a click game, tons of large music files, sound effects, graphic effects etc, i just simply dont see a way to minimize it to get the same effects that i want, though im still open to suggestions. also... i will change the cursor, it can be very distracting lol. again, thanks for the feedback guys!

 
[Game design makes my brain feel like its gonna explode.]
   

Post Reply



 



Advertisement

Worth A Click