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

2019/2/24

game crash because out of memory

petyritonel petyritonel

2019/2/24

#
so ive been working on thi game for a week now, and over time it got slower and slower due to the usage of many worlds and actors. some of them even have gifs as their image and this often causes greenfoot to run out of memory, so i have to restart the program. now the game is almost done but you can barely finish it, because you get errors, and if you run it from an exported java file, it simply stopped. i tried the game time set to a shorter interval, and this way it works better, but the game is supposed to be longer, and in this cases it stops around the end. one of the problems that i think it could have is the many world changes. after the game starts there almost 30 world changes and i believe this is what causes the game to stop. i would like to know if there is a simple solution to fixing this, or i should just try and do it with less objects. note: there are 4 actors that are constantly in the scenario, they dont get removed, only replaced. there are some added animations that after playing, get removed. idea: i was thinking of fixing the many world changes with adding actor, but i want to know if that would even fix the problem...
danpost danpost

2019/2/24

#
We will probably have to go over each one of your classes -- one at a time, starting with your initial world class.
petyritonel petyritonel

2019/2/24

#
I changed a part of it, so now it doesnt have to change worlds that often, it just adds actors, and it fixed it. thanks tho
You need to login to post a reply.