User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Can you write code once and not copy paste across scenes?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can you write code once and not copy paste across scenes?

    Hi Forum,

    Is there a good way to write event logic once, and have it work across all of your levels? I haven't used Fusion for years, not since around 2014, but in the past I could never get global events to work well, and ended up copy + pasting event logic from one level to another, which understandably led to issues. Is there a good way to do this that I missed, or has it been improved?

    Cheers!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to clarify, I have used global events, but I remember running in to lots of issues in the past (what specifically I can't remember, too long ago), but for core game logic, ie, moving the player character, I ended up having to use the standard event editor within each level / scene.

  3. #3
    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,740
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Global Events used to have some serious limitations, like not being able to use the Event List Editor and, if I'm not mistaken, not being able to use qualifiers. The global event editor was also a pain to actually reach. It's possible that these types of problems are the ones you remember having.

    These limitations still exist in the 'regular' version of Fusion, but have been eliminated in Fusion 2.5+ DLC (along with a truly impressive number of other major workflow improvements). I myself never used global events pre-2.5+ because of the various limitations, but I use them extensively now.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Simflare's Avatar
    Join Date
    Oct 2013
    Location
    Australia
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Volnaiskra View Post
    Global Events used to have some serious limitations, like not being able to use the Event List Editor and, if I'm not mistaken, not being able to use qualifiers. The global event editor was also a pain to actually reach. It's possible that these types of problems are the ones you remember having.

    These limitations still exist in the 'regular' version of Fusion, but have been eliminated in Fusion 2.5+ DLC (along with a truly impressive number of other major workflow improvements). I myself never used global events pre-2.5+ because of the various limitations, but I use them extensively now.
    Thanks so much for the response! Bottom line, that was basically why I stopped using Fusion for years and switched to something else. Copy + pasting the same code between scenes / levels is just not practical and leads to a huge amount of errors. I like that with code, you can write it once, and re-use it everywhere.

    I have Fusion 2.5. Is there any DLC I should be looking at to make Global events work better?

    Also, do you know if Fusion has ever added something akin to classes in programming, ie, I have a hero character object, and he has all of his own events internally in a separate place, and when I want to change hero events, I just go to that object / place where those events are stored. And then the specific events for the hero, certain types of enemies, items, levels, are each in their own places, rather than jumbled together in one huge event list. Did fusion ever add anything like that? Coz it needed it.

  5. #5
    Clicker Install Creator Pro
    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)Firefly 3D Module (Steam)
    defisym's Avatar
    Join Date
    Jun 2017
    Location
    Asia
    Posts
    288
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Simflare View Post
    Also, do you know if Fusion has ever added something akin to classes in programming, ie, I have a hero character object, and he has all of his own events internally in a separate place, and when I want to change hero events, I just go to that object / place where those events are stored. And then the specific events for the hero, certain types of enemies, items, levels, are each in their own places, rather than jumbled together in one huge event list. Did fusion ever add anything like that? Coz it needed it.
    6CB574B1-C9C6-4A46-88D1-2DC6E90CB019.jpg

    Simon said this was planned (at least he had made the proposal) on discord two years ago, but unfortunately the current answer is "no", but AFAIK you can put these events to a global object's behavior in order to save events separately.

  6. #6
    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
    880
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Simflare View Post
    Thanks so much for the response! Bottom line, that was basically why I stopped using Fusion for years and switched to something else. Copy + pasting the same code between scenes / levels is just not practical and leads to a huge amount of errors. I like that with code, you can write it once, and re-use it everywhere.

    I have Fusion 2.5. Is there any DLC I should be looking at to make Global events work better?

    Also, do you know if Fusion has ever added something akin to classes in programming, ie, I have a hero character object, and he has all of his own events internally in a separate place, and when I want to change hero events, I just go to that object / place where those events are stored. And then the specific events for the hero, certain types of enemies, items, levels, are each in their own places, rather than jumbled together in one huge event list. Did fusion ever add anything like that? Coz it needed it.
    The DLC is called "Fusion 2.5+" (the plus sign haha). Super worth it. Also look into how to make one frame games, e.g. having all your code in one frame and then loading your levels from an array.

  7. #7
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Jan 2021
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could maybe do something like this using the Global Function Object. I've used it to centralize data storage in one app I'm working on.

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

    Join Date
    Nov 2017
    Posts
    127
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    I'm using Fusion 2.5+ and my entire "main engine" is coded in global events - with a frame set as the base frame. The only remaining complaint is that each frame has to include an instance of every single object that will be used... (of course, you can set them to not create at frame start, but this is still an annoyance).

    Overall, this is a great alternative to creating level editors. I'm going to be super controversial here and say that I don't understand anybody that bothers to make a level editor now - in a complex game with lots of things going on, cutscenes etc, it must be a pain to create.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Jun 2014
    Posts
    96
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    One reason for still making level editors is that you could also sell the the editor once the game is done

  10. #10
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform Export Module
    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)
    Jonathan's Avatar
    Join Date
    Sep 2013
    Location
    France
    Posts
    257
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Overall, this is a great alternative to creating level editors. I'm going to be super controversial here and say that I don't understand anybody that bothers to make a level editor now - in a complex game with lots of things going on, cutscenes etc, it must be a pain to create.
    Could be a pain, but so much usefull, Fusion didn't have a lot of function to help during the creation like all software like Godot or Construct, so having your own editor to make all your cutscenes, levels, etc... could really help you and made the process ease.
    But yes, it's not easy to made those own tools, maybe you can try Tiled, it allowed to create map and set objetcs with parameters, you can export this in XML and use them in Fusion, i Used this from the past but I'm not remember if the XML object was perfect, I remember some issues about it.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Copy + Paste from another MFA
    By Keith in forum Fusion 2.5
    Replies: 3
    Last Post: 18th November 2020, 06:35 PM
  2. See the code behind the scenes?
    By soopytwist in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th May 2015, 05:25 AM
  3. copy & paste
    By dascribe in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th August 2011, 11:42 AM
  4. copy/paste between different editors
    By DAH in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 8th January 2009, 10:34 PM
  5. Copy and Paste Object?
    By DJ_Wild in forum Extension Development
    Replies: 2
    Last Post: 14th November 2007, 08:28 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
  •