Array Level Builder (variation on my old editor that used ini)

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • This is a modification to my level builder located here: Please login to see this link.

    I simply overhauled it to use an array instead of the ini object. Other than that it's exactly the same. Array is probably more efficient (and maybe faster) than the ini, is also supported by all runtimes like the ini, and doesn't need any extra encryption added.

    Edit: Re-uploaded because I forgot to remove the unused ini object. lol. Also, another thing to note, you could alter it to save/load the file via a selector instead of using the file name string in the paste object's values. Another benefit of the array object over ini. I just left the saving/loading via the string name so you don't have to open the dialog every time you adjust something, not to mention that if you're importing the loading frame into your game, you're not going to want to use the selector anyway.

    I just noticed I didn't include apppath$ in the saving/loading portion so I re-uploaded that change. It still saves in the local directory with just the file name but I've been told in the past you should always add apppath$ + the file name so I went ahead and fixed that.

  • No problem, you all are welcome! One of the reasons I got around to posting the array example is that loglady brought to my attention an issue with the ini taking forever to save on a larger level. I figured it probably had to do with how the ini works, so I whipped up the array example. If this fixes the issues loglady was having, I'd say the old ini example is obsolete and shouldn't be used. The array is easier to use than having to set items and groups in an ini anyway. :)

  • Hey Shawn,
    I wii be using your editor in my platform game. I will probably use this one instead of the ini.
    If I ever get to the point of implementing it into my game I'll let you know how it goes.
    Thanx again for taking the time to make this.

    Please login to see this link.

  • I did implement this array update and it does load faster than before. Now levels compile and load instantly and I've doubled the size of on frame with zero slow down. Thank you.

    Please login to see this link. My tumblr and devlog for my current project.

  • So when I want to change frames using your system, say by having the character go through a door, I'm doing that by restarting the loading frame with a new level. Is that the best strategy?

    Please login to see this link. My tumblr and devlog for my current project.

  • Yeah that should work fine if you're just using the "restart frame" event, the paste object is set to global so it will remember your value change when restarting. If you want, you could also just put the loading events in a group that you activate and deactivate as needed, but that will require additional events to clear the pasted objects and reset whatever values you need to reset upon loading the next level. I think for most purposes, simply restarting the frame is probably easiest, just depends on what exactly you're doing and if you don't want to reset everything by restarting.

  • Unless I've consistently made the same mistakes, global objects do not preserve their data when a frame is restarted. They do when it changes from one frame to another, but not if the frame they're part of ends or resets. I can work around this by using global values instead, but in case anyone else has had a similar issue, here's my experience.

    Please login to see this link. My tumblr and devlog for my current project.

  • A possible workaround that I have not tried yet: Instead of resetting the frame, "jump to" a frame whose only start of frame command is to jump back to the last frame. This would effectively reset the original frame without using the resent command.

    Please login to see this link. My tumblr and devlog for my current project.

  • Wonderful. Once again, this is an extremely useful piece of code to me, and I appreciate your sharing it.

    One additional note: I use this code a lot more for pasting objects in as active objects, sometimes pasting the object into the background after and destroying that object, sometimes not. In your example the code to change the position and layer of a newly pasted object occurs in that specific object's column, but it can more conveniently be placed in the Group.Obstacles column. If you do so, the repositioning of the newly created object will still apply only to that object, and the code itself can be more easily reused for addition objects. This way, only the create object line, which must stay at the top of the action list, needs to be changed for each new object coded in.

    Please login to see this link. My tumblr and devlog for my current project.

  • That's a good idea. One of the things I like about MMF, there's a lot of different ways to do things and optimize them. I'm glad you are getting use out of this and finding even better ways to do things!

  • Hi Shawn, this is a brilliant example file. I have an idea for a modification that is now possible in Fusion, I'll see if it works and post it up.

    Andy H @ Please login to see this link. - Please login to see this link.
    Retro Gaming @ Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!