User Tag List

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

Thread: Active object amount limit?

  1. #1
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Active object amount limit?

    I was hoping to make a really simplistic strategy game, from directly above- point of view to avoid any real 3D needs. It would use really simple minion units and have buildings, nothing too fancy. I was hoping to make it in a way that there are bases, from where a constant stream of minions are attacking the other team, meaning that there would be a need for a mass of minion objects. I tried to find information about active object limits and found a figure of 20 000. However, I tested a game with 2000 active objects and it began to be slower, frame rate dropping.

    Is there any known limit to how many active objects a game can have before it becomes so slow it's more or less unplayable to any player with average PC:es? The "20 000 active object limit" I keep finding is useless if the game actually can't handle even 2000+ without getting so slow it looks bad.

    Does "attaching" things like health bar or collision detection circles to individual instances of the minion object add to the loss of game speed? Would the 20 000 or even 2000+ mass of objects be reasonable, if I find a way to keep minions as simple, on their own- objects without anything "hanging on to them"? It would mean a lot more work, but it'd be better than nothing.

    (And I do not mean I made 2000 individual, different active objects. Most of them are identical minion objects, "instances of the same object", if I understand that term correctly.)

    Sorry for the long post or if this matter is already answered elsewhere and I just didn't see it. Let me know if I accidentally made something wrong by posting this question.

    EDIT: I also want to mention, that my version of Fusion 2.5 is Steam version, Developer addition activated.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Definitely an interesting and worthy question - but one that is difficult to fulfill with a proper answer.
    It doesn't directly depends on the number of objects - it depends on what you do with that objects.
    Optimizations could give you a very good bost in a similar scenario with thousands of object - but only if you're doing something "wrong", which is hard to say...
    Do you move all units at the same time (foreach loop on all objects?)
    Do you handle units outside the window (if there are?)
    Do you handle collisions / do so with "box" collision or advanced collision?
    Builtin or custom movements?
    Do you auto-pair health or add this on foreach loop?
    What else do you do on each unit, every frame?
    Could you consider splitting your units - like moving smaller "flocks" of them at time,
    and/or skipping some frames to allow for system relief?
    (like updating their infos -if applicable- every 10 frames would give you 6 times more headroom on 60FPS)
    etc. etc. etc.

    However, maybe a silly consideration here,
    but that's an heck of strategy game with 2000 units and more in the playfield ,
    maybe you can still create "mass" effects with lesser units - in the order of the hundreds?
    Semms more like a swarm than a strategy battle

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,690
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Go to the Click Store and get Beetle Invasion. That will bring tears to your eyes and will help you. 2,000 units is a lot IMHO.

    Marv
    ​455 MMF2 & CTF 2.5 Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #4
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for a fast and a large reply. Lets see...

    For the movement, yes and no. I was planning, that you could choose a mass from the horde of minions, select an attack point and then the mass will attack the target until they die/run out of ammo. So there would be a need to control many of them at once, but that need will not be anything recurring every 0,1 seconds but like 2, 3 times a minute. Since I know that a strategy game is a hard challenge as it is, I was planning to put the most weight of the strategy part on good attack direction choices rather than on very specific micro play.

    There is no real need to handle units outside window. Also, units don't have to survive outside window to avoid units surviving outside play area.

    I was hoping for them to have some collision understanding, but it doesn't have to be solid or anything highly advanced. (Like 1 out of 4 chances for a collision between two minions. With more than 200 objects, nobody can monitor their overlapping anyway so it shouldn't spoil anything). I was planning to use obstacle backdrops to help them maintain some sort of a path when attacking and kill any units outside window, since I planned minions to spawn constantly unless they reach a limit.

    Basic bouncing ball would be enough movement for them. Since they'd spawn constantly, I found a story way to make sure you can kill any minions that would otherwise get stuck or act erratic.

    Well, attacking and perhaps collecting would be enough for my plan. Like you may guess, I did realize already when I began planning a strategy game with Fusion 2.5 that there needs to be some limits to meet all the limitations. Maybe some orders would cause more advanced attacks, but those attacks would still rely upon easy bullet or animation means to happen. (Like a flamethrower or such made by animation/overlapping an object in stead of those small particles creating a flame effect.

    I am willing to consider anything, like flocks and such to help this matter.

    And it is true, it's a lot. I kinda was planning to maintain like 200-400 minion cap for teams 1 and 2, and possibly for a NPC 3 if needed story wise. The 2000+ hope comes more from the idea that you also need buildings and some active objects like bullets to make it work. I may have to do like you say and for an example create unit that has an animation of four minions to boost the numbers with less actual objects? Maybe shooting could also be an animation and when the shooting minion has a collision with something, I just kill the animation and start a "HIT" animation with the targeted unit to avoid the need of a bullet object?

    Again, thank you for taking the time to answer at all. My posts usually turns into a rambling since I try to post all the useful information in them.

  5. #5
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And also thank you nivram. I will visit the store and see it. It may help open my eyes as to how many units I actually need to make it look like a war.

  6. #6
    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,329
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Do you say you want the 2000+ objects visible on the screen at the same time? If so, I think that's pretty unrealistic. But if this is a scrolling game and you mean 2000+ in total, as most of them will not be visible at the same time, you could make a system that destroys objects that are not visible, and recreates them when they are near visible zone. In short: any object that is not on screen or within player's reach should simply not exist. In order to accomplish this you must most likely organize the level in arrays that are divided into zones.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Bonehead View Post
    For the movement, yes and no. I was planning, that you could choose a mass from the horde of minions, select an attack point and then the mass will attack the target until they die/run out of ammo. So there would be a need to control many of them at once, but that need will not be anything recurring every 0,1 seconds but like 2, 3 times a minute. Since I know that a strategy game is a hard challenge as it is, I was planning to put the most weight of the strategy part on good attack direction choices rather than on very specific micro play.
    Surely an interesting challenge.
    Your "control" would be every 2-3 times a minute, to make them move,
    this is not bad, as movement can be very expensive, depending on how you need to perform it
    (if bouncing ball and no collision checks - you're pretty on the soft side anyway!)

    But I guess Fusion would have to anyway handle their angle / shooting direction on every frame, even if static,
    so you'll likely have to "foreach" them on a very frequent basis to update their direction
    -calculate nearest enemy to each unit?-
    Macro-units would make this last paragraph quicker, like calculating only one target for a "mass" of units, without taking into account each of them singularly.

    There is no real need to handle units outside window. Also, units don't have to survive outside window to avoid units surviving outside play area.
    so this is going to be a very crowded window!
    But this is obviouly "good" for preformance, as you won't have to worry about hordes outside view area

    I was hoping for them to have some collision understanding, but it doesn't have to be solid or anything highly advanced. (Like 1 out of 4 chances for a collision between two minions. With more than 200 objects, nobody can monitor their overlapping anyway so it shouldn't spoil anything). I was planning to use obstacle backdrops to help them maintain some sort of a path when attacking and kill any units outside window, since I planned minions to spawn constantly unless they reach a limit.
    No collision would surely give you a good performance boost, and as you say, moving a horde could make collision checking pointless (if not against buildings)

    Basic bouncing ball would be enough movement for them. Since they'd spawn constantly, I found a story way to make sure you can kill any minions that would otherwise get stuck or act erratic.
    Good to know, bouncing ball is pretty lightweight and solid, one of the best among builtin movements.

    Well, attacking and perhaps collecting would be enough for my plan. Like you may guess, I did realize already when I began planning a strategy game with Fusion 2.5 that there needs to be some limits to meet all the limitations. Maybe some orders would cause more advanced attacks, but those attacks would still rely upon easy bullet or animation means to happen. (Like a flamethrower or such made by animation/overlapping an object in stead of those small particles creating a flame effect.
    Luckily limitations are not that many, Fusion can really keep on with your ideas if you learn how to deal with him,
    it can happen that you may run into a very expensive way of doing something and seems it lets you down - but usually inspecting your code you can find bottlenecks and see i.e. that you don't really need al that "control" over that many things all the time.
    You animation attacks, instead of particles, are going to be good idea imo!
    Btw, many good "Particle animator" software exist and results can look very good (I recall someone suggested TimelineFX - and it indeed looks good!)


    And it is true, it's a lot. I kinda was planning to maintain like 200-400 minion cap for teams 1 and 2, and possibly for a NPC 3 if needed story wise. The 2000+ hope comes more from the idea that you also need buildings and some active objects like bullets to make it work. I may have to do like you say and for an example create unit that has an animation of four minions to boost the numbers with less actual objects? Maybe shooting could also be an animation and when the shooting minion has a collision with something, I just kill the animation and start a "HIT" animation with the targeted unit to avoid the need of a bullet object?
    Creating an animation of multiple units would surely help, i.e. reducing to 1/4 number of objects to move on screen
    Shooting animation is also a very good idea to avoid countless bullets (and it's probably like many games do, to my knowledge, at least with very small projectiles that would be anyway hard to see)
    Two very good ideas imo.
    But you may even not need to run into all these optimizations from start, Windows runtime is quite powerful with active objects,
    maybe do some quick test with the way you find more comfortable with and then start to think at it if/when things start to get bad!



    Btw, I've checked Beetle Invasion, and it's very nicely done - and damn hard!
    Died ten-fifteen times before even finding a very basic tactic

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im abit lazy at this moment in time, so i havent read throug all the posts here.

    However, to maximize the number of Objects, i do have a smart idea ( forgive me if this is allready mentioned or not relevant ).

    The idea is to only use 1 Object per Agent/ Enemy.
    You do probably ( not nessesarily ) Detecors for your Agents, and theese can be embeded within the Age itself ( As a UserAnimation ).
    However, switching to the 'Detector Animation' and back to the, for example, 'Running animation' will reset the 'Running animation' making it appear like the animation aint playing at all.
    ^ This isnt nessesarily a problem, as one could use an AltValues and manually create an 'Animation Speed/ Possition' variable acting as a stored anim speed that can be reverted to after Detector Animation changes back to whatever Animation was playing before. I havent done this before, but i am goin to try.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    This is perfectly sensed,
    I've seen this applied before as one of the "three" main solutions to the "different collision masks" problem/need,
    I read this suggested by SolarB first time - crediting original idea to Muddymole - so I'd say this is solidly tested in Fusion

    As you say, you can restore the animation frame by storing in values current frame prior to switching and reverting back after.

    Though personally I've never used this solution much,
    I think it could be very useful to halve object count, if you are going to need detectors.

  10. #10
    Clicker 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)

    Join Date
    Jan 2016
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for all the replies! They really have good information to be used. I already began to test some of them.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 23rd January 2016, 11:52 PM
  2. Replies: 2
    Last Post: 26th February 2015, 08:41 AM
  3. Active Object - # of animations limit?
    By Del_Duio in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd March 2014, 12:15 PM
  4. Limit One Active Object
    By Top_of_the_Temple in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th September 2013, 07:17 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
  •