More Actors Low Speed

zayed

  • Posts: 14
Please i have a problem in this software and i want an argent solution , if i add 30 coins in the screen their is a bug every thing goes slow and very slow if there is more actors in the screen and when removing this actors or reduce it it will be came fast , i want a solution to that please , i want to add as more as i needed


ShivaFang

  • Posts: 248
To get an argent solution you'd need to grind up some silver and put it in water.

As for the urgent solution to your frame rate issues, we'd need to know more about these coins.  Are they all running 'always' blocks?  What are they doing while they are on the screen?

(EDIT:  Joe's articles will be helpful.)
Justin "ShivaFang" White
Aquamentos Games - The origin of challenging Strategy and Role-Playing Flash gaming!
Visit our Developer Blog and Google+ Page!

zayed

  • Posts: 14
thanks Joe i will check it and i will post what the result then


ShivaFang sorry for that its typing problem ,about the coins i added them from the scene ( drop it to the scene )  and it does not move only staying in their position

ShivaFang

  • Posts: 248
^-^ it happens, I just thought it was amusing.

Is there any behaviour on the coins at all, or is it just a blank actor with an image?  Is their a collision behaviour and do the coins overlap with each other?  (Do you want the coins to detect collisions on each other?)

Hit the 'tilde' key (~) which is usually above the 'tab' key - are there any errors being reported by stencyl?
Justin "ShivaFang" White
Aquamentos Games - The origin of challenging Strategy and Role-Playing Flash gaming!
Visit our Developer Blog and Google+ Page!

zayed

  • Posts: 14
 ShivaFang the coins only have one behavior when the player hit them they disappear from the scene and they are not moving only staying in their position  , i add 10 coins its OK but 30 and above the scene became very very slow

zayed

  • Posts: 14
Joe the problem does not solved , i will explain what i do to imagine with me what happen , i added 2 actors ( player , coins) , i create tiles and i place the player in the start of the scene , and i place the coins throw the whole scene may be about 50 coins and the game became very very slow , what i should do , i read the articles on performance and i do all thing except of the recycle actor because i do not crate an actor throw the behavior , i add the coins and the player direct from the scene window , i need a help on that 

ShivaFang

  • Posts: 248
A few last thoughts;
1)  What are the specs on your computer and how old is it?  (This is my go-to problem when things run slowly, mine is 12 years old but I'm changing that this week.)
2)  Try going Run->Preview in Browser - is the speed any better?  (Sometimes debug mode runs slowly)
3)  Try creating a new 'coins' collision group and make sure it is set to only collide with the player (not other coins, and not tiles).  I don't know why, but for some reason I think this is what's causing your problem despite the fact they are not moving.

Beyond that, I'm not sure what else to suggest.  Good Luck!
Justin "ShivaFang" White
Aquamentos Games - The origin of challenging Strategy and Role-Playing Flash gaming!
Visit our Developer Blog and Google+ Page!

zayed

  • Posts: 14
ShivaFang thanks for your replay , i did not understand your first point , i test it in browser the same thing happen , i create a new collision group and the same , i do my graduation project on that , what i do know and i am sure its from the software because every thing is OK

ShivaFang

  • Posts: 248
The first point - maybe your computer is too slow/too old.  Try exporting it and test it on a different computer.

That's the only thing that seems to remain after everything else we've tried.

Barring that, you'll have to not create the offscreen actors until the player is close enough to them that they might appear on screen.
Justin "ShivaFang" White
Aquamentos Games - The origin of challenging Strategy and Role-Playing Flash gaming!
Visit our Developer Blog and Google+ Page!

Joe

  • *
  • Posts: 2478
Are you using an "always simulate" block inside the Behavior attached to the coins? That will slow your game down.

zayed

  • Posts: 14
Joe : no , i am using when this collides with some thing else , and most of posts is about that , i think its from the software or their some steps to do  .


ShivaFang : my computer is new , 64 bit , 4GB RAM , i am thinking like you to not   create the offscreen actors until the player is close enough to them , can you give me a hit to do it as simple as possible

Joe

  • *
  • Posts: 2478
If you're not explicitly using that block, the overhead from having coin Actors that are offscreen should be negligible. Can you share screenshots of your Scene and Behaviors?

zayed

  • Posts: 14
OK joe ,i will provide you with a test of one scene how its slow and screen shoot of coins behavior  but i want to tell you the problem is not in coins specially because i remove them and added more enemies the slow return back so the concept when there is more actors the scene because very slow and when removing them the game become fast

Joe

  • *
  • Posts: 2478
What do your collision groups for the coins look like? Create a single group for your player character ("Players") and set that as the only group that your coins collide with.

Also, you're constantly writing to the console. That can slow your game down dramatically as well.