csanyk
Member
After importing my project, I decided to have a look through the compatibility scripts.
In my project, it happens that mostly the compatibility scripts that were generated for me had to do with wrapping calls to the deprecated instance_create() function. Also some scripts that replace the old view system.
I quickly went through my project and replaced all calls to the instance_create() compatibility script with calls to the new instance_create_layer() function, then once I was satisfied that I'd updated the entire project, I got rid of the compatibility script for instance_create() and tested the project, and all is well. Once I knew that was working, I was able to get rid of the helper scripts that set up the legacy object depth system, as well.
I haven't yet tried to get rid of the compatibility scripts for the view system, but only because I've yet to get into the new camera-based system. I'll likely get to that later.
I am wondering whether there's any great advantage to doing this post-import cleanup maintenance.
From what I can see, from this little bit of exposure to it, it's not that hard to get the imported project completely off of the compatibility scripts. I imagine that larger, more complicated projects may not be so simple to do this for, depending on what deprecated functions they used.
I believe that there are a few advantages, and would like to hear other people's opinions.
In my project, it happens that mostly the compatibility scripts that were generated for me had to do with wrapping calls to the deprecated instance_create() function. Also some scripts that replace the old view system.
I quickly went through my project and replaced all calls to the instance_create() compatibility script with calls to the new instance_create_layer() function, then once I was satisfied that I'd updated the entire project, I got rid of the compatibility script for instance_create() and tested the project, and all is well. Once I knew that was working, I was able to get rid of the helper scripts that set up the legacy object depth system, as well.
I haven't yet tried to get rid of the compatibility scripts for the view system, but only because I've yet to get into the new camera-based system. I'll likely get to that later.
I am wondering whether there's any great advantage to doing this post-import cleanup maintenance.
From what I can see, from this little bit of exposure to it, it's not that hard to get the imported project completely off of the compatibility scripts. I imagine that larger, more complicated projects may not be so simple to do this for, depending on what deprecated functions they used.
I believe that there are a few advantages, and would like to hear other people's opinions.
- I just feel better knowing that I've written every line of code in the project. It gives me confidence, knowing that I've built everything, so I understand how it all works, and I'm not afraid of touching any of the code if I need to. Reducing the amount of code in a project always feels like a good thing to me. I'm pretty obsessive about keeping my code clean and simple and understanding everything in my projects.
- I would think that there's likely some tiny amount of performance improvement from removing the wrapping around instance_create_layer() and calling it directly, rather than through the instance_create() compatibility script. And likely with other functions as well, if there had been others in my project that needed to compatibility scripts to be generated for them. I'm sure it doesn't matter in the vast majority of cases, and I did not any performance differences to be at all noticeable, but I wasn't expecting to, either. It may even be that the compiler optimizes this stuff so it doesn't matter even a little bit.