User Tag List

Results 1 to 7 of 7

Thread: Instances / teams / performance combination

  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
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Instances / teams / performance combination

    Hi.

    If this post gets answered, I hope it will also help anyone else trying to hit that combination of “instance/teams/performance”, so I hope I'm forgiven for writing a novel like this one. Also, if by some miracle this does work in the end, I might repay it by some tutorial or at least a post reply about what tips it gave me.

    I have asked and received great advice for a small scale strategy game, but thou it has helped with many details, I think I just can't finish it without this topic:

    Is there either a smart object universally compatible or some magical combination of distinct player units/instances without copies/performance, which would allow me to reach 3000 or 4000 active objects without frame rate dropping under something acceptable like 30 fps? I know Fusion can have even 10000 units in there as long as they do nothing but move around, but I was hoping to get to at least 3000 with a reserve for resources, bullets and such.

    First the good news: I have received help and have some code to allow instances to attack each other without copies (like “soldier01”, “soldier02”), and I have animated simple soldier units, which have frames for two units, three and so on, to blow up the unit count even more. Also, I use automated rotation with top-down view, so I presume animation stress should be as low as possible? However, I for the life of me can't figure out how to make both instances with team colors and at the same time be able to animate them bolster the unit numbers, since:

    - using loops to attach a colored circle or anything visible to make teams stand out starts to lag the Fusion around 1000 – 1500 units (and means 500 soldiers would also mean 500 markers), without loops the attaching with build-in spawning and such don't seem to work without bugs and trying to use attached counters with color circle animation doesn't seem to be less lagging than active objects

    - without any attached markers, animating instances to both have frames for unit count and color or other difference for teams would mean… countless animation frames within any instance to work? I know I could make animation “brown” with frames “0 = one soldier” “1 = two soldiers”, but if I want them to have even two or three different stances (arrow, line or a circle) it starts to be hundreds of frames per animation, and I don't know if the Fusion can handle that all, or me...

    - I was hoping the main teams to be brown and grey, with possibly red and blue to be “support” teams if needed and possibly green or something for neutral. I tried to avoid markers and animating altogether by making alterable value for team to event a rgb change, but I just can't get all the necessary colors to come out like that. Changing color affects all the instances, so that won't help, but maybe rgb effect could, if I was able to make it work…

    - I have tried to use fixed values to link the soldiers/soldier group to an object called “group”, which I can just set to a color by “value = set frame”, but making units/groups to follow and look at the “group”- objects without bugs means loops, and it seems to cause same kind of resources cap as attaching a colored marker would too…

    So, if anyone bothered to read this much jargon, I think I ask the following:

    1. Is there a way to attach markers to units, that won't lag as soon as you hit 500 units + 500 markers?
    2. Is there a way to get brown, grey, red, blue and green colors out of rgb effect? Does it need smart objects or some calculation beyond “GetRGB (red, green, blue)” to work?
    3. Is there a tutorial or some clever way to create a group of soldiers, make them follow a “group”- object and still be able to attack individually? (Making the group objects to fight each other looks silly, if soldier units get left behind and die miles away from the main group)
    4. Is there any alternative to make a few teams of swarm like armies, while one instance can be both a game unit for different teams and still visibly apart from the other teams?
    5. Is my only option to make copies of every units for every team? I'll do it, if it's the only way, but not until it is the only way to do it. Handling something like sounds taunting.

    Or am I just embarrassing myself and I need to buy an editor able to make an rts game? I have tried to avoid it, since I have done at least something viable with Fusion before and I don't have coding diploma to back me up, but...

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,159
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    1. Markers - set a flag to distinguish a group, then call the group by the flag. You can also use alterable values to store their stats / powers etc. or to distinguish them.
    2. I don't know. But I would create one soldier in each colour. They can all belong to the same qualifier that determines their movement etc. and also receive their own qualifiers that are colour specific that determines their attack ratio. Be careful here - you're using colours that are the main colours that people who are colour blind struggle with - which is again why I'd recommend creating a soldier in each colour so that they can have a different type of uniform to distinguish them, not just a colour.
    3. Yes, use global values. So there's a global value for speed - and you set the soldier's speed = to the global value and if you want variety, then the one group's speed = speed, the next group = speed + 5 etc.
    4. Having a different soldier, one of each colour will allow for this.
    5. You're only making 1 of each. Then you create instances of them in the game.

    How big / small are your graphics? Are you needing lots because everything is really small or it's just a really big field? If it's a really big field why not break it up into levels - so that each level has fewer objects on it?

    In general if you have only what's on screen being animated / moving - and everything that's off screen deactivated - then Fusion should cope. Just put your programming blocks in groups and activate / deactivate the groups as needed. Make sure your soldiers don't move from the start but only start moving when their group is activated - make sure they are destroyed / made invisible / stopped when their group is deactivated - depending on if they're needed again.

  3. #3
    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
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the reply!

    - Darn, I really hoped I'd make with one instance type per game unit type, but I guess you're right. The main reason I tried to make unit, such as “foot soldier” instead of stock of “foot soldier_01, -02,...”, to work with value/animations/markers was to avoid all the hustle a civil war map or three different teams in a “free for all” situation would cause, but that color blind aspect you talked about will make identical units a bad idea anyway. I guess I might have to bite the bullet with this one.

    - Yes, I was aiming for smaller and simpler graphics. Not just because of the scale of units used, but since I'm aiming for more realistic unit/building size ratio, and too “close to camera” units would mean gigantic buildings/battlefields to work, I think.

    - You are probably right about smaller levels. I know my limitations as a coder, so I might end up being forced to make individual maps short and unsaveable, meaning a world map with mission markers saved as “won/lost”. With swarm type armies I naturally want to have as large looking battles as possible, but I might need to compromise. I just want to have some base building within the mission, so I have to consider how much I'd leave into a world map and what could fit into a battle.

    - I think making units invisible off-screen sounds like a plan. Since it's a strategy game, destroying units outside frame might make the battles not play out right outside frame, but if there are any resources for making that work, I'm interested.

    Thank you so much for bothering to read my ramble of a post. I think your reply does help me to choose (and accept) what to do for some of my problems. I'll start testing them now.

    Any additional ideas are, of course, welcomed. Whatever tips might help to swarm the armies without performance issues is needed with this project.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,159
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    You may want to consider scaling your army to represent ratios i.e. 1 soldier = 10 soldiers so that you have 10 soldiers on screen representing an army of 100 soldiers etc.

    By invisible - I just meant that Fusion doesn't need to use resources to draw them. Fusion software doesn't require anything to be visible to interact with it - we humans do.
    You don't want battles playing off-screen - that should be a calculation anyway - there'd be no point in having action take place where nobody can see it.

    You can save the stats of the units once the player can no longer see them in global values or ini files and destroy them thereby freeing up the resources. When the player returns to that area you could load them again based on
    the saved stats.

  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
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    True, I've tried some scaling by using "value = unit count" to force frame with one, two, n... soldiers, until I hit ten and after that it will indicate a unit count, if the cursor is above the unit. But you're likely right; I may have to accept I have to keep something like a "division" and "group" sized troops in battles and take "army" sized items into a world map to scale it even more.

    However, can the storing and loading of objects cause trouble, if the local battle map (frame) is, lets say HD sized 1920 x 2 and 1082 x 2, and you need scrolling to manage your base and attack the enemy? I would presume destroyed objects waiting to be put back would not be able to gather resources and carry out other tasks, since they're basically "idle" until called back into action? (I mean like a situation, where you play something like C&C, you don't want the NOD base to just stop everything they're doing while you scroll over to your base to build a structure.) If I'm mistaken, and you can destroy and load units in a frame without losing the overall flow within a frame, then I'm interested to use that method too.

    I did already make an event to turn any outside frame units invisible while outside screen, so that one is helping me out. That shouldn't cause any worries.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    1,159
    Mentioned
    199 Post(s)
    Tagged
    0 Thread(s)
    I mean if you say resources collected Army A as a global value - and you would add 5 to that every 10 seconds, then you could still do that and when army A is back on screen that global value shows their resources as accumulated.
    It becomes a calculation rather than picturing the army going to harvest the resources - it's just thinking about it differently - you're adding and subtracting from a global value to indicate the army using and acquiring resources - rather than actually making Fusion have this group of objects wonder around and colliding with other objects.

    (I'm pretty sure nothing is actually drawn if it's not in the active viewport, so making it invisible will probably do nothing - I was just listing all the possible options to make things stop running and may have misled you on that one.)

  7. #7
    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
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, currently my idea for the base building aspect was kinda old school workers gathering resources, so it'd make it hard to calculate some "x amount in y seconds" accumulation rate... but the again, I was hoping to advance the base from randomly moving foragers to mining and gathering anyway. I could just flat out go all the way to building mines and factories, and workers would be just scenery randomly popping to go from base to mine or back. That way even outside frame I could tell how many mines/factories I have and that way there could be a steady flow of resources coming in, which can be calculated as an amount per second. That way I could also just destroy any outside view workers, since they wouldn't actually be the ones managing the resources but just scenery. It's worth testing out.

    It's okay. I think it has more to do with my English skills than you miss-leading me. I can see how what you said would render the event meaningless, when you put it like that.

Similar Threads

  1. Combination Lens + Tint + Outline???
    By roxflame in forum Hardware Accelerated Runtime
    Replies: 4
    Last Post: 12th July 2013, 08:29 PM
  2. Combination of registry fetching and aditional dir
    By CosmicD in forum Install Creator and Patch Maker
    Replies: 3
    Last Post: 25th October 2011, 06:13 AM
  3. keyboard combination action
    By Kracker in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd October 2011, 12:44 AM

Posting Permissions

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