User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 25

Thread: Best way for a frame-based level editor in CTF 2.5+ ?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    87
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Question Best way for a frame-based level editor in CTF 2.5+ ?

    Hi!

    I'm currently looking at either making my own level editor or perhaps build/use an already existing level editor. I would love to know if there's any good example/extension for this.

    Currently, I'm creating my levels in different frames which isn't optimal at all.
    However, from what I have read, it should be possible to build a level this way. A way to save every items position from that frame into an array or file which will be loaded at the "engine frame".

    This is perhaps the only good way to go forward and not have to copy everything from the "engine frame" into all the other level frames?
    I also read that perhaps a level editor isn't needed with 2.5+ as we can now store all the coding in global events and/or in the behavior of an active object?

    Is there anyone who has done this that can give me any directions where to start, which way forward is the way to go as for now?

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,345
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    To make a save procedure, you can do it like this:

    Give all objects the same qualifier, for instance Group.Engine.
    Create a String Tokenizer object. Install it from the extension manager if you don't have it. It's extremely useful.

    In the event editor, have a button or key run a For Each loop on the qualifier. You may for instance name the loop "Save".

    Now make a new event and add an on For Each loop condition for the qualifier.
    In this event you will add all the needed information of each object to a string. You may use a global string for best performance. Let's call it LevelString.
    Split every data with a delimiter such as a comma or any other special character. Like this: OName$("Group.Engine") +","+ X("Group.Engine")+","+Y("Group.Engine"). Remember to include the name of the qualifier. It will pick the name of the actual object.
    Finally make an event to add another different delimiter to split each object in the string. Place it above the other event, and add a condition to check if the string is not empty, so it only gets inserted if there allready is at least one object present in the string.

    This should store the entire level. Now you can load the string into an edit object or something else and save it to file.

    To load the level, add your delimiters into String Tokenizer and 2D split the string. Then run a fastloop to run through all X items (the objects) and retrieve each Y item (the data / positions) where you need them. The first item is item 0, the one is 1 etc...
    Use the Create By Name action to create the object, and then set positions and other data to the qualifier.

    This method works whether you're making a fully custom level editor, or a semi-custom one like the one you're talking about.

    You can use an array instead of a string, but doing it this way makes it very easy for you to read through the levels in a file to see if everything's correct.

  3. #3
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    782
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Here you go: https://community.clickteam.com/threads/84185-Array-Level-Builder-for-Fusion-2-5-(variation-on-Shawn-s-example-of-the-same-name)

    This is pretty much the optimal way of doing it. Basically you create seperate levels and then save them to a different Z position in an array. Then you have a Game Frame which houses all of your events and then you load the correct Z position for whatever you need.

    With that said, 2.5+ improved its Global Events so it's realistically possible now to have individual frames as levels and the engine in Global Events.

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    87
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    @Popcorn Thank you! I'm going to try to follow your guide tomorrow after I have completed the task of turning all my backdrops to active objects.

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Aug 2010
    Location
    Sweden
    Posts
    87
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    @zip2kx Thank you! I'm going to check that out tomorrow!

  6. #6
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform 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)
    Jonathan's Avatar
    Join Date
    Sep 2013
    Location
    France
    Posts
    175
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    For my game, I created a level editor for saving all my data informations in array files for each level.
    For background and tiles, i'm using Tiled Map Editor (https://www.mapeditor.org) and I export my scene in PNG picture for each layer. It's possible to load the TMX files (wich is an XML) but there is not good XML extension with Clickteam saddly, both are buggy so it's kind of complicate.

    With Clickteam Fusion, I've one frame, wich load my level at the beggining with a loop. That's not really hard, but you have to be organized and know how is working array, Ini, XML, etc...

    Anyway, with 2.5+ DLC I guess you can use global event and have a frame for each level of your game.
    Someone to confirm?

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Nov 2017
    Posts
    92
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I hope so - that's what I'm doing. The downsides I can see so far are:

    - You need to make each object Global so that you can change it from anywhere. I don't think there is an option to automatically create all actives as "Global" which is a bit of a bummer. Feature request?

    - You need to add each active object to every frame or any code referencing that object won't work for that particular frame. In this respect, it's not truly "global."

    I personally think a level editor is the best way to go, but the prospect of spending time developing and debugging what is basically a whole new project is not very appealing to me - especially now that Global Events are viable, despite the points above.

  8. #8
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform 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)
    Jonathan's Avatar
    Join Date
    Sep 2013
    Location
    France
    Posts
    175
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    - You need to add each active object to every frame or any code referencing that object won't work for that particular frame. In this respect, it's not truly "global."
    What? If your object are global and are on a specific frame (for exemple a "template frame"), you still have to copy past each of them in all your layers? You can't just use theme from your template frame? Damn, such a shame.

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Nov 2017
    Posts
    92
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Yes, I believe Yves has explained that to get rid of this restriction is nearly impossible without major rehaul of CF 2.5.

    Perhaps in CF 3?

  10. #10
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,269
    Mentioned
    90 Post(s)
    Tagged
    0 Thread(s)
    You don't have to copy/paste them manually from one frame to another. You can create objects at runtime from any frame you like, using the left column in the Create Object dialog. However, this only works with the Create object action, not the Create object by name action.


Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Object frame to Level Editor on sale right now!
    By PandaExplosion in forum WIP & Released Games & Apps
    Replies: 2
    Last Post: 15th July 2019, 05:07 PM
  2. Level load - Change frame based on position
    By Vetmora in forum Fusion 2.5
    Replies: 6
    Last Post: 14th June 2018, 08:05 AM
  3. Level editor that uses MMF2's own frame editor
    By Shawn in forum File Archive
    Replies: 35
    Last Post: 9th November 2013, 07:34 PM
  4. Tile-based level editor
    By Gabriel in forum File Archive
    Replies: 9
    Last Post: 7th March 2007, 09:17 PM

Posting Permissions

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