R
RoanArts
Guest
I'm working on an interactive fiction game engine, with a text parser I've written to be able to correctly draw text with different types of emphasis, as well as text colors, and so on. All of this is working perfectly. Because of the book-style layout, I use surfaces to let me draw sections of text within frames which can then be scrolled. In addition, because GMS2 doesn't have the text functions I need, the way my system works is to draw the parsed text to a surface, make a sprite out of that surface, and then draw the created sprite within the appropriate frame. I'm very careful to make sure that I use surface_free and sprite_delete to keep a handle on all of this, since I'm creating sprites for every page of text.
This is what it should look like, and it's what it correctly looked like up until runtime v2.3.1.406 was released.
Since runtime v2.3.1.406, I've run into a problem where the visuals, for lack of a better term, just break.
I've spent days going line by line and trying to isolate what is causing this, and I finally found the culprit: If I call sprite_delete anywhere in my code (which I need to do in order to remove the sprites I'm creating of the page text), the visuals break as in the above image. If I do not call sprite_delete anywhere in my code, everything looks the way it should--however, obviously then I have a memory leak because I'm not deleting the sprites I'm creating.
Again, none of this was happening prior to runtime v2.3.1.406, and this problem came up as soon as I updated to the new runtime; I had not changed a single piece of code. I have tried the project cleanup button multiple times. I have tried flushing sprites and textures. I've tried everything I can think of, and the only thing that fixes it is to not call sprite_delete, which is something I can't do because of the memory leak it causes.
I thought I saw that runtime v2.3.1.406 made changes to the garbage cleanup part of GMS2? Could there be a problem with that? The problem, as near as I can tell from looking at the visuals, seems to be that surfaces become corrupted and no longer function properly. I'm at my wits end. I would be deeply grateful to anyone who has insight on this.
This is what it should look like, and it's what it correctly looked like up until runtime v2.3.1.406 was released.
Since runtime v2.3.1.406, I've run into a problem where the visuals, for lack of a better term, just break.
I've spent days going line by line and trying to isolate what is causing this, and I finally found the culprit: If I call sprite_delete anywhere in my code (which I need to do in order to remove the sprites I'm creating of the page text), the visuals break as in the above image. If I do not call sprite_delete anywhere in my code, everything looks the way it should--however, obviously then I have a memory leak because I'm not deleting the sprites I'm creating.
Again, none of this was happening prior to runtime v2.3.1.406, and this problem came up as soon as I updated to the new runtime; I had not changed a single piece of code. I have tried the project cleanup button multiple times. I have tried flushing sprites and textures. I've tried everything I can think of, and the only thing that fixes it is to not call sprite_delete, which is something I can't do because of the memory leak it causes.
I thought I saw that runtime v2.3.1.406 made changes to the garbage cleanup part of GMS2? Could there be a problem with that? The problem, as near as I can tell from looking at the visuals, seems to be that surfaces become corrupted and no longer function properly. I'm at my wits end. I would be deeply grateful to anyone who has insight on this.