Is there a 'Frame Complexity' limit?

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.
  • So when a vital frame in a game I'm making started going haywire out of nowhere in weird ways, it took me more than a day of relentless testing and switching around to figure out what was causing it. So far as I can tell, this is the culprit:

    The frame just got too complicated.

    I was able to conclude this once and for all by making an active and just giving it dozens of self-contained Value events that don't influence anything, yet STILL its presence causes the frame to mess up.

    So yeah, I guess there's just too much going on in this frame. Anything I can do to get around it?

  • It is really hard to say, we need more information.
    What kind of events you have set up and how is the frame messed up etc.
    I have noticed this as well when I created my player animations, there are quite a lot of conditions and it was pain in the ass to make them all work without interfacing other events.

    But I think there should be no limitations, you just need to organize your code very well and if there is a bug, there is a bug also in code.

    - Jesse

    Currently working on Please login to see this link.
    Released games: Please login to see this link. and Please login to see this link.

  • The short answer is no. The longer answer depends on what exactly you're doing and how you're defining things like "complexity" and "complicated." How many objects are in your frame? How many events? Are the objects doing anything out of the ordinary? Are you doing some unusual event editor practices?

    You haven't told us outside of vague innuendos what the problem is, so how can we tell you if there's a way around it? I know that some users of Fusion 2 have had frames with upwards of 10,000 events in them with I don't know how many objects and they never encountered "frame complexity" that was more than user-error.

  • I've seen some instances where your game just won't do what it's supposed to and there's really no good answer why that is. Try making sure your actives have "destroy if too far from frame" unchecked. Sometimes that helps. Also I've seen that if an active that now suddenly doesn't work that's outside the frame area is overlapping even a tiny bit of the frame it suddenly works again.

    MMF is awesome, but it can act strangely on occasion. I still remember the weird errors I had where it was confusing values for 2 arrays I had going at once. Sheesh-KaBob!

    Weebish Mines, my retro Metroidvania!
    Please login to see this link.

  • What kind of events you have set up and how is the frame messed up etc.

    It's really complicated, but basically:

    It's an RPG battle screen, with the character, the enemies, and the dozens of objects and assets backing it all.

    Normally, you just begin the battle by selecting your attacks when the frame begins.

    However the glitch, is that your character just immediately jumps into his victory position, and the game acts like you won as soon as the battle begins! Even though the enemies are still there. What's more, the 9 and 0 buttons are normally used to change the volume, but now it doesn't work!

    But I think there should be no limitations, you just need to organize your code very well and if there is a bug, there is a bug also in code.

    Yeah, I am almost positive that it's simply a result of too many events.


    The short answer is no. The longer answer depends on what exactly you're doing and how you're defining things like "complexity" and "complicated." How many objects are in your frame? How many events? Are the objects doing anything out of the ordinary?

    Good question. I'll add them up ASAP.

    Are you doing some unusual event editor practices?


    Well, I do 98% of my events within the Active objects themselves, instead of in the main frame. Could that be considered 'unusual'?

  • The frame has 126 objects. Other frames in my game have more.

    The main frame has 76 events.

    All of the events within Objects themselves adds up to: 12635.

    So together, it's about 12711.

    I made an extra object and filled it with events that don't don't affect anything outside of itself. In fact, I then even filled it mostly with events that won't even happen. YET, if I add too many, it causes the frame to automatically declare me victorious the moment I load.

    In fact, the exact number of events I am allowed to put in this object is 69. If I put a 70th in there, the frame glitches up. Remove it, and it works fine.

    And 12711 plus 69 is 12800.

    So weird, because last time I had a big problem with the number 5779. Oh well.

    Edited once, last by UltraHammer: I screwed up, but found out better (October 15, 2013 at 1:23 PM).

  • Are you using behaviors, by any chance? "Putting events in objects" sounds like behaviors to me, though I'm not sure if that is what you meant. Also, do you have any global events or qualifiers?

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • Yeah, Behaviors; that's what I'm using. Like I said, my game is 97% behaviors.

    And yes, I have 97 Global Values, and 24 Global Strings (30% of them aren't used for anything.) I have 89 Global Events.

    I use about 3 or 4 global qualifiers in the battle plane, and 6 or 7 in the whole game in total.

  • Okay, then stop using behaviors, they can be buggy at times, which might explain all of your problems. Behaviors are only useful if you plan on re-using the code in another frame. Also, qualifiers should NOT be used in behaviors or global events, EVER. It will not let you use qualifiers in global events or behaviors in newer updates in MMF2, since they are horrendously buggy when used together.

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • Yeah Behaviors actually don't even ALLOW for Qualifiers. Click Team would really be awesome if the next MMF allowed for that; it would make programming in this software so much easier.

    And actually, if I have 12801 events, even if that last event is in the regular frame, it still causes all these problems to occur, just the same, so I don't think it's my fetish for Behaviors that's causing it. Nontheless, I'll experiment around some more with that in mind. Thank you~

  • /edit
    on a closer inspection, it does appear that there are serious glitches when you exceed ~12800 events in a frame- this number was *supposed* to be 20000, but the maximum number of events is definitely not working where CT intended it to. I'll see if I can isolate this glitch in a reproducible .mfa

    I'll post my results later, but oddly I experienced some heavy glitch outs around ~12800 LOC, but it went back to normal when at ~14000 LOC
    Try making a group with 2000 dummy lines of code and sticking them in the beginning of your event editor, and see what happens

    My suspicion based on what I'm seeing in my own project is that 20000 is still the 'cap', but around ~12800 LoC, events occur out of order. I have a big group at the bottom of my code that sets the animations for all objects, and when I buffer too many lines of code in there, newly created objects aren't given their animations on the same frame, but have it assigned in the next frame, so theres a 1 frame 'blip' of the wrong animation. That would make sense if the group had somehow been misplaced to the top of the event editor

    check out my brief unscientific test:

    Please login to see this picture.

    Notice how the sparkly particles appear for 1 frame as (the default stopped direction = 0) blue smoke? Well the framerate was lower on the .gif than ingame so you only see a quarter of them, but its enough to get the idea (it was happening for all of them). Rearranging the order of my events had the same effect as adding 2000 events at the top, and I imagine yours will be the same symptoms.

    I'll put some effort into isolating this and making an example file, hopefully CT will be able to address it

    Edited once, last by Pixelthief (October 16, 2013 at 2:33 AM).

  • Heres an .mfa that reproduces this error, I'll post it to the bug tracker pretty soon, but I'd like to get a better grasp of exactly where the wrap-around occurs in the events that get out of order:

    Please login to see this attachment.

    I have confirmed with certainty that this occurs at event #8193, after you have subtracted all comments, group numbers, empty lines of events without actions, "never" events, etc- things that the compiler removes at runtime. The fact you and I both experienced it around 12000-13000 lines of code wasn't anything to do with the actual event editor number, but rather we both probably had about 3000-4000 group names, disabled code, comments, etc. Does that sound right, given your project?

  • Another thing I personally would like to note about the issue: Start copying and pasting those groups. At around 30,000 events, MMF2 flat-out crashes. EDIT: Another note: Start right before you hit 30,000, delete some of the groups, then start pasting them back in. You'll find it crashes before 30,000 events so long as you delete enough groups before then, meaning they might not be properly deleted. Maybe it has something to do with the issue?

    EDIT 2: I personally have yet to reach even 1,000 events in my projects that are in my opinion basically my biggest (they're still quite advanced, though). Maybe this is a matter of the Please login to see this link.? After all, why do you need 12800 events for an RPG battle screen? There are almost certainly more efficient ways to do it, such as making it so that the attacks are as modifiable as possible outside of events (as opposed to hard-coding every last attack (E.G. storing damage output in an array or something like that)).

    My Please login to see this link. (which I actually use), my Please login to see this link. (which I mostly don't use), and my Please login to see this link. (which I don't use anymore pretty much at all really). If there are awards for "'highest number of long forum posts", then I'd have probably won at least 1 by now. XD

  • From what I can tell:

    Events above #8912 will overwrite event #1+
    For example, if you have 8912 events, all will work. If you have 8913 events, event #8193 will become event #1, and your *real* event #1 will no longer exist
    The more events you go over 8912, the more events you erase.

    Undoubtably, MMF2 is not using enough bits for the index of events in some way. Since 2^13 means theres a possible 3 bits reserved for flags about the events, which would add up to 2 bytes per index. And if thats the case, it might also cause a buffer overflow and change some flags for those events. I doubt that next bit is signed. So the obvious solution would be, MMF2 should use more bytes per index, 4 bytes would be logical (2^13 could become 2^29, giving us 536 million lines of code maximum). I don't know what other implications this could have in MMF2's structure, how difficult such a change could really be

  • Okay well, while I hope to become smart and/or awake enough to wrap my head around all this eventually, for right now, it seems best to just design my way around putting all the information on one frame.

    See for anyone who's curious, most of the LOC come from the enemies, who all have unique behaviors and code-based effects animations. So I'll just have one Battle Frame with a bunch of enemies, and another frame with a bunch of other ones.

    Thanks everyone!

  • It's actually quite likely the index is signed. There is an action limit of 128 per event, which only happens when you cap out a signed byte. The condition limit is also 128 per event. This could easily be doubled by unsigning it, unless the leading bit is used for something else.

    For a list of my achievements, hit up Please login to see this link..com/
    Unless you want to party, then go to Please login to see this link.

Participate now!

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