Jump to content


Photo

Particles and optimizing


  • Please log in to reply
2 replies to this topic

#1 Joh

Joh

    GMC Member

  • GMC Member
  • 233 posts
  • Version:GM8

Posted 11 March 2012 - 11:01 PM

So i have been making a game for a while and it was running great, always at 30.
I have added quite some stuff before i noticed not that the game is not at a stable 30 fps anymore.
Well, its still mostly at 30fps like 90+% of the time but im not sure if i should be concerned, as its pretty early in development.
First id like to know if i should worry ad were to look to fix the occasional drops.
(also, dont know if it matters but with the task manager it shows 60-99% cpu usage, while its normaly under 50)


things that might be a cause... (recent added stuff)
Spoiler




My computer visual card? well, whatever it is when it goes down, my Pc resolution goes down and it goes in 4 bit mode.(very ugly with barely any color) started crashing too. could it be related to the particles? (problem 2)

second, I have added particles to my game (they run fine unless there are a lot of them)
I use a global system, create all particle types at launch (and systems) and store them in global variables.
Then use them when needed with part_particle_create.
i never destroy types or systems, Is that alright since i only create them once?
  • 0

#2 NukeTheCat

NukeTheCat

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM8.1

Posted 29 March 2012 - 05:23 PM

I think its the particle system because, even in the help file, its warned to slow down the game and increase the of the .exe.
The best is to destroy the particle system when not in use. e.g. destroy all the particles when leaving a room then create all particles again.
Particle system will always hang or crash the game when there is too much.
Also your graphic card seems not suited for particle systems, what PC software are you using? Windows 97?

P.S. My name starts with a 'Joh' :biggrin:
  • 0

#3 fluidic ice

fluidic ice

    GMC Member

  • GMC Member
  • 792 posts
  • Version:GM:Studio

Posted 29 March 2012 - 05:32 PM

Err:

Also your graphic card seems not suited for particle systems, what PC software are you using? Windows 97?

If your using windows 97 just give up now...

As for the topic, its 90% the particles fault and not destroying them as mentioned above could just eat up memory and cpu. Although it would lag just as bad if your using lots and destroying them properly so use with caution.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users