User Tag List

Results 1 to 6 of 6

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

  1. #1
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

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

    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 original example post.

    My version works in a very similar way.

    > Array Level Builder 2.5.mfa

    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 tilemap widget, 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 @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  2. #2
    Clicker Multimedia Fusion 2 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-on
    iamjot's Avatar
    Join Date
    Nov 2008
    Location
    Austria
    Posts
    718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you. I will test this on ios and android on the weekend. But it should actually work. Very good job.

  3. #3
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Updated

    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.

    Array Level Builder 2.5b.mfa

    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 @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  4. #4
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by iamjot View Post
    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 @ ovine.net
    Awful Jokes - a new cartoon every day: http://awful.ovine.net/
    Ovine's games: http://www.ovine.net

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,112
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    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!

  6. #6
    Forum Moderator Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleMac Export Module
    AndyH's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    1,445
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.

Similar Threads

  1. Replies: 19
    Last Post: 2nd January 2014, 12:44 AM
  2. Detect level info from Array or Collisions?
    By Bipolar_Games in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd March 2011, 08:58 AM
  3. Array Level Editor
    By DJ_Wild in forum File Archive
    Replies: 14
    Last Post: 30th September 2007, 03:59 PM
  4. Level Creator using array
    By danworth in forum File Archive
    Replies: 17
    Last Post: 14th July 2006, 06:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •