Hi, I'm finishing a demo game in AGD 4.7 (Spectrum) and the actual code in main loop 1 and 2 is big. After inserting some new code in main loop 2, I realize that I can't access again in main loop 2. When I press space, the screen clears but instead of showing the code, it shows the event menu again. In the upper corner says that I have still more than 3500 memory free.
Is there any limit for the code in main loops?
Any workaround to continue adding some code or it's full?
Hi mate, the limit isn't for a specific event, but for the whole project in general: e.g. if you try to delete some code lines in another event (just for a test purpose), you should be able to see the Main Loop 2 code again. A workaround could be to trasform a part of the AGD code into Assembly and call it through the ASM command, saving a lot of space inside the AGD event. It'll require some work, but it's worth the effort. Contact me via email and send me the AGD code to be transformed into machine language if you need help.
This problem occurs because when opening the script it needs to be decompressed into a buffer, and large scripts need anything up to 5 or 6k free, and AGD cannot free up that amount of space for you when you have a lot of sprites.
The issue is addressed in AGDx by storing all sprite data in a bank whilst editing. You just need to load your game in AGDx and you won't have this issue anymore.