Ok...I've spent about a month coding this project and it's not yet complete, but I run it in game mode after each set of changes to make sure it's still working the way I imagine. Every so often I save it as a new file so I have backups of the work in progress and I'm up to file 23 now. I admit there was a learning curve and it took me about a week to grasp the basics of GE, but I'm really impressed with it. I'm sure there are more insights I could learn and I'm hoping some of you can enlighten me about an issue I'm having with GE.
There are no collisions of any kind in my project, but a lot of actors to serve as buttons and messages. There are also a lot of global variables which are dependent upon each other so they constantly change during game play. In that respect, it's math-heavy and I expect this game to be consuming a fair amount of memory. However, based on prior posts, I understand there shouldn't be much memory draw when actors are out of view. I've studied some of the demo codes and don't think my project is all that demanding as far as scripts go.
Out of nowhere I start getting errors when I go into game mode saying GE has encountered a problem and needs to close. Thankfully, the recovery option lets me get my work back. I keep trying to run the game and suspect a memory issue is causing me trouble. Sure enough, one time I get an error saying there is not enough memory to run the game. I went out and bought 1G more RAM and installed it on my PC. I tried running it again and keep having the same issues, even once getting the "not enough memory" error message.
The problem started after I added the "buy home" and "rent home" calculations. For some reason, that caused the "start career" button to trigger the error even though it worked before. Now the game won't even begin to enter game mode.
I've spent two days screening my scripts, replacing some if statements with switch statements, etc. Sometimes I even blocked out large pieces of code with // to see if that helps with the memory issue. Nothing seems to resolve it and I'm out of ideas.
Maybe I've gone about this project with the right idea but with the wrong logic? Surely there is a way to make this work.
I've attached the WinZip file which includes the .ged and data file.
A few questions:
When not using certain actors I move them off-screen, oftentimes pressing a button which quickly calls them back into view again. Would it be better for the memory usage to destroy those actors instead of moving them off-screen?
What are the primary problems associated with the "GE must close" error? Is it mostly a memory issue, a clash of code segments, too much scripting going on at once, etc.?
I'd appreciate any insights to get this project back on track. Thanks.