This site requires JavaScript, please enable it in your browser!
Greenfoot back
FlyingRabidUnicornPig
FlyingRabidUnicornPig wrote ...

2013/6/9

Increase Performance

Do you know any general ways that would increase the performance of a scenario? I currently don't have a big issue about performance in my games, I'm mostly curious to see how others handle performance, and want to see if any suggestions may help me and/or others with increasing performance in our scenarios. Thanks!
bourne bourne

2013/6/10

#
Avoid garbage collection. i.e. Lots of calls to 'new' every act cycle, of large Objects. For many of my scenarios, I use to create a new GreenfootImage every act cycle, draw on it, set as background, etc. This image would be the size of the World, so it was large and a new one was created and thrown out every act cycle. Solution: storing as instance variable and using clear() method before drawing
You need to login to post a reply.