Array Level Builder for Fusion 2.5 (variation on Shawn's example of the same name)

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 example file expands upon a technique Shawn demonstrated in an application for MMF2. Due to a new feature in Fusion 2.5, it is now possible to create an active object by name, which reduces the number of events required to reconstruct a level.

    Here's the Please login to see this link. post.

    My version works in a very similar way.

    > Please login to see this attachment.

    I have made some changes:

    1) Each active object used in the level building must have a Group Qualifier to identify it as before.
    2) It uses two alterable values. "A" is used to uniquely count it. "B" is used to define what type of object it is (background, obstacle, platform, ladder or active)
    3) An alterable string is used which has an EXACT COPY of the active objects name. This is because at present there is not an expression to retrieve the active objects name at runtime. Have raised a feature request for this in the bug tracker so hopefully we will get this in the future and then we will not need to use the alterable string. *EDIT* - the latest BETA of Fusion now has this feature, so perhaps I will update this soon.
    4) On the level building and construction frames I have a counter object to define what room number to save/load the data from in the array (rooms/levels are referenced in the Z index)
    5) I am storing each property in the Y index of the array as text. It's possible some optimisation could be done by using just one Y index and combining the properties as a single string.
    6) On the level construction frame I no longer need a paste object because Fusion now allows creation of an object by it's name.

    I have added comments in the frame and event editors. It's not very complicated but if you have any questions please post here. If you have any improvements or good ideas, please post those too.

    I have also made a Please login to see this link., the advantage of the widget is you could make a level editor to be used in game or by people who do not have Fusion but otherwise it solves the same problem of building levels in one frame. However, I really like this technique demonstrated by Shawn as it fits in well with Fusion and although levels/rooms can only be constructed at edit time by someone who owns Fusion, its simplicity and flexibility is quite appealing.

    I've not tested this on Android or iOS exporters yet, so it may need some further optimisation.

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

    Edited once, last by AndyH: Note about latest BETA of Fusion (December 26, 2016 at 7:16 PM).

  • Here is an updated version using the string parser object and just one index in the array per room ( x ). Makes the array file much smaller. Also stores and displays a room name.

    Please login to see this attachment.

    One other change is that Alterable values C, D and E are recorded in the level builder frame and restored in the level viewer frame. This could be used for some interesting things, such as an invisible active object that defines a door area to take the player to another room. You could record the room number in alterable value C for the door in the level builder frame and when using this in the game you would know what room to move to when the player goes through it. Each room you build you could assign a different value for the door. Will be looking to create an example of this in use over the next few days.

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

  • Thank you. I will test this on ios and android on the weekend. But it should actually work. Very good job.

    Just tested on Android and there are a couple of things causing it to crash. On frame 1 the array save will crash it. Take that out and include a pre-built array file and there is a crash on frame 2, not sure what is causing that. Have sent this file to the bug box so hopefully CT can identify the cause.

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

  • Andy if you're using this exact code on Android the Array will crash because you need to use the Android Object to specify where to read/write the array data. (DataStorageDirectory$( "Android object" ))

    BTW - these are some nice improvements to the original idea!

    Check out my Game on Itch.io
    Please login to see this link.

  • I shall try that, although it would not be ideal to have to have Android specific behaviour like this as it would then not work on Windows and iOS? The MFA should ideally work on any platform without modification.

    On iOS, the exporter works out where to read and write the array and other files, on windows if I do not specify a path it automatically goes in the same folder as the mfa/exe. I'd hope Android would behave the same in this instance.

    In the case of my Android test, I disabled the save array and attached a created one to the data elements which I'm sure has worked before, i'll have to check. I also took out the loading of the array and it still crashed, so there could be something else causing problems ( eg: string parser reading empty string ) but it should just do nothing and not crash in all cases.

    Thanks for the tip though, I shall see if it helps.

    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!