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

2015/6/24

Greenfoot not working

fauxcaleb fauxcaleb

2015/6/24

#
I'm making a Street Fighter-like game, and my first character can walk around and jump. But when I tried to add a simple punch attack, the game froze, so I reset the world and it said: "The constructor for the world is taking a long time. You may have an infinite loop." So I restarted Greenfoot, and the same thing happened again. This also happened when I tried adding a second character with the same code as my first character except with different GreenfootImages and GifImages. I think it's a problem of cache memory and there not being enough of it. Is there any way to increase the cache memory of Greenfoot and if this isn't the problem, could you tell me what the problem is? Thanks in advance :)
danpost danpost

2015/6/24

#
The problem is in one of your constructors or in a method one of them calls. You need to go through what happens when you reset the project (trace the code). You could comment everything out and uncomment things one at a time until you come across the problem code. That would tell you where it is problematic.
You need to login to post a reply.