Great Game Maker Wall Optimization Script - Printable Version +- The VG Resource (https://www.vg-resource.com) +-- Forum: Archive (https://www.vg-resource.com/forum-65.html) +--- Forum: July 2014 Archive (https://www.vg-resource.com/forum-139.html) +---- Forum: Other Stuff (https://www.vg-resource.com/forum-6.html) +----- Forum: Questions, Info, and Tutorials (https://www.vg-resource.com/forum-89.html) +----- Thread: Great Game Maker Wall Optimization Script (/thread-21539.html) |
Great Game Maker Wall Optimization Script - Koh - 09-28-2012 After reading about how to optimize Game Maker games to make them run faster, I decided to try out one method mentioned before, to combine all of the Wall objects into one sprite using a surface, then deleting them all, and creating one big wall, it worked out TREMENDOUSLY. So I thought it would be useful for me to share my script with everyone. It's not hard to do of course, but it could save time, and I recommend using it with every game that's bound to have a lot of Wall objects. You call this script in the Room Creation Code. Code: var; wallsurface=0; w=0; //Variables for the Surface on which all the wall sprites will be put on, and the New Wall object that will be made. RE: Great Game Maker Wall Optimization Script - Previous - 09-28-2012 Aside from that, I'd assume your code - if not just the idea - may come in handy for other GM users. Being an interpreted script language, GML tends to have performance issuesm and any larger game is prone to lag without such optimisation tricks. RE: Great Game Maker Wall Optimization Script - Phaze - 09-28-2012 Call it a nitpick but I love the Allman style of indentation, easier for me to keep track of braces RE: Great Game Maker Wall Optimization Script - puggsoy - 09-28-2012 Same here. When I began coding I opened braces on the same line as their statements, but when I started using FlashDevelop it's automatic code generation did it Allman style, so I adjusted to that. Now I favour it greatly, since as Phaze says it makes it easier to keep track of code blocks and such. In fact, a lot of my coding style is from FlashDevelop, so that code that I've written stays consistent with generated code. And since FlashDevelop does it how most people do it that also helps me use other peoples' code, and (eventually) share my own code. Also I use lots of empty lines |