Search Unity

Unity RTS Engine

Discussion in 'Assets and Asset Store' started by OussamaB, Feb 7, 2017.

  1. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    finley i was able to buy this! can't wait to start making the RTS!
     
  2. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    Faction manager tab

    from the looks of it i might have to put in the factions over and over on every map i make?

    could a update bring a "Factions tab" which holds all the factions and there HQ?
     
  3. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    No no. Once you update the Manager prefabs those things are automatically added if you use the special map menu to do it. I made that mistake too.
     
  4. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    special map menu?
     
  5. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    This thingy:

    Once you update those Prefabs in the bottom image with your faction / map settings. That Create New Map button will automatically add those managers to your scene so you only need to really make them once.

    Its kind mentioned in the site documentation he put up.
    http://soumidelrio.com/docs/unity-rts-engine/
    I admit, it wasn't fairly obvious. But now that you know... :)
     
    OussamaB likes this.
  6. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I fixed that in the upcoming update! Sorry for the inconvenience.
     
  7. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Awesome news! Please don't hesitate to share your feedback.
     
    navy3000 likes this.
  8. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Update submitted, here's the changes list:

    - Bug fixes.
    - Added the ability to destroy the unit's object on death after a certain amount of time and not directly.
    - Added the option for free movement of the unit's attack weapon (rotates and looks at the target).
    - Added "Take Damage" animation state, called whenever a unit gets damage.
    - Added the option to select target types for attack units and attack buildings (attack only walking units, flying units or both).
    - Added a building component that generates resources.
    - Two types of building resource generation: either directly add resources to the faction or collect resources till reaching a specific maximum amount and collecting it manually using a task from the building.
    - Added a new building for the demo scene: University. It's a resource generation building that produces "Knowledge" required for research related tasks.

    P.S: The ADC unit has been postponed to the next update.
     
  9. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    Oh no inconvience at all! It didn't really affect anything! Cept I lost maybe 30 minutes poking it. Just glad I wasn't losing my mind! :D

    Also Great update list! :) Really looking forward to the next few! This asset just keeps getting better and better.

    No rush on this one (or by all means feel free to say "No!" if you'd rather), but would it also be possible to have a toggle for able to attack vehicles vs Infantry. Like how you separated Flyers

    I plan on having attack dogs (that 1 shot infantry [can just set Direct Unit damage to 100 or something]) but it wouldn't make sense for them to be able to take down a tank or a building (I can just set Building Damage to 0 ) ya know what I mean?

    If this isn't something your interested in, I can try to find a solution on my own. :cool:
     
    Last edited: Jun 2, 2017
  10. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    how do i update it?
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    This is possible and it gave me an idea to make even more dynamic. Let's say you can have different units categories and then from the inspector you can assign which categories the unit can attack. What do you think?
     
    CPTEliteWarfare likes this.
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The update has been submitted but it takes a while for the asset store team to accept it.
     
  13. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    That sounds perfect. And I think it would benefit a lot of projects :D
     
    CPTEliteWarfare likes this.
  14. CPTEliteWarfare

    CPTEliteWarfare

    Joined:
    Apr 9, 2014
    Posts:
    68
    Anyone using 5.6? thought of upgrading to 5.6 but kinda want stay with 5.5.3. If your on 5.6 let me know the issues that come up with the Asset. Im kinda forced to go to 5.6 for Vulkan :/
     
  15. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    I'm on 5.6.1 I havnt noticed any issues. I do get some random console message when I start a Map.

    I havnt ascertained if that was my fault yet or not. It's an object.not.set.to.instance alert. Im inclined to think that was my fault as initially I was doing a touch of experimention and may have poked a unit in a way that caused it. I was playing with direct attack I think...

    I'll certainly appraise you if I see an issues asap.
     
  16. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The asset is designed to work with Unity 5.5.0f3 and all above versions.
    In order to avoid any issues, you can duplicate the project you're working on and then upgrade to 5.6 and see if any issues come up. In case you face a problem, just let me know. This way you can always have a backup for your project.
     
  17. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    I'm getting a bunch of alerts like this after the update to 1.07 it seems no units can attack buildings. But in the inspector Attacks Buildings is Checked. Based on the message it looks like something hasn't been assigned in the script. Any idea's?


    NullReferenceException: Object reference not set to an instance of an object
    Attack.CanAttackTarget (UnityEngine.GameObject Target) (at Assets/RTS Engine/Units/Scripts/Attack.cs:333)
    SelectionManager.LaunchAttack (System.Collections.Generic.List`1 SelectedUnits, UnityEngine.GameObject TargetObj, Boolean ChangeTarget) (at Assets/RTS Engine/Selection/Scripts/SelectionManager.cs:1092)
    SelectionManager.Update () (at Assets/RTS Engine/Selection/Scripts/SelectionManager.cs:250)

    More Info:
    It seems that if they auto attack the Buildings it works. But I can't tell them to attack it. So they can take indirect attack.

    Even More Info:
    Tested in a squeaky clean import of the project in a brand new project. Same issue -- So I know its not my settings. Although I did test in 5.6.1f -- Previously it was working on the last version
     
    Last edited: Jun 6, 2017
  18. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    You should add construction states. As in when your builders start building it looks like state 1 then as hp rises it looks like state 2 and so on a so forth!
     
  19. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    +1
     
  20. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    I've been keeping an eye on this asset, Does anyone have any data on how the performance is?
     
  21. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Sorry for the inconvenience, I fixed the issue and uploaded the fix to the asset store.
    So that you don't have to wait for it to be available on the asset store, I sent you the fix via e-mail.
    For anyone needing the fix, please PM me your e-mail address and invoice number.
     
    Paul-Swanson likes this.
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Awesome suggestion, added to the to-do list!
     
    Paul-Swanson likes this.
  23. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    Just some quick showoffs of what Iv been up to so far. Here's some of my Units and Some of my Buildings. I took pretty heavy inspiration from Command and Conquer 95 and Red Alert. I'm probably going to toss that refinery and PowerPlant though, I took some heavy liberties with it but there is still a huge resemblance:



    What do you all think. The red is my COLOR object that will change via team color. I tried to make it pretty clear when sectioning those polygons off.
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I have to admit that you and your team are doing a great job. Love the 3d models.

    Expect the next update this weekend.
     
  25. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    Thx! I'm working on animating the Cannon Shot in Unity's Animator Window. Iv got some really nice Muzzle Flashes I'm activating on attack. [I was so happy when my testing worked out :) ]

    Only one thing i can really ask for to enhance the Weapon Rotations you added (I'm really liking it, once I figured out how to make it work on my models. I had some odd rotational issues, my fault entirely)
    Can you add a LERP to it perhaps? Or rather a smooth rotate, Im not sure if LERP was the correct term of not. I'm going to try and add it myself in the mean time but I think a Smooth Rotate option and a exposed speed variable to control that rate would finish that feature off nicely. This way the turret would turn at a carefully selected rate of speed rather than poof-point-fire. That would pave the way for a variety of unit balancing. And make it more visually pleasing.

    High Rate of fire, low rate of turret rotation speed. :) Could get units behind it and beat a more powerful unit by simply out maneuvering it.

    Also, for those of you folks that are having trouble calibrating your ranges.
    Here's a tip:
    Create a Unity Cube and set it 1x1 that's (what Iv observed at least) the RTS Engine range of 1.
    You can use it as a make shift ruler to figure out where you want your stuff to stop.
    If you want carefully adjust the range. Put a Unit and its Target out about where you want him to attack from.
    Just put that 1x1 cube in the center between them and size it until if fits the space between your units. That's what you want to set your range to.
    You can always build an apparatus like this!
    I'm happy to email to anyone that wants it. There are no scripts its only a Sprite and some Planes. Exported as a Unity Package


    :) Happy Ranging!
     
    Last edited: Jun 10, 2017
  26. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Suggestions:
    A way to build walls would be cool
    Place multi-buildings at once!

    more suggestions coming :) hope you don't mind
     
    Paul-Swanson likes this.
  27. CPTEliteWarfare

    CPTEliteWarfare

    Joined:
    Apr 9, 2014
    Posts:
    68
    Was there support for Sea Units? , My team has been going hard at remodeling and texturing our old models , and we kinda thought about sea units ,
     
  28. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Okay, I will try to make the movement smoother.
     
  29. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    On the to-do list, thanks for the suggestion!

    Hmm, I don't quite understand how will that be possible. Could you explain more?
     
  30. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Here's the plan for the main changes in the next few updates. The next update will introduce APC units and better support for vehicles (will be submitted in a few hours), the one after it will introduce buildings upgrades and after that we will introduce sea units.
    Some users were able to have units that move on water, it is actually possible with the current state of the asset. The update will just make things clearer and easier. Thanks for your understanding.
     
    CPTEliteWarfare likes this.
  31. CPTEliteWarfare

    CPTEliteWarfare

    Joined:
    Apr 9, 2014
    Posts:
    68
    ok thank you :)
     
  32. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    I mean like if you have played "age of empires 2" you can shift click and it will keep your same building selection and then you can place it again and again if you need to
     
  33. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I see. Great suggestion, added to the to-do list!
     
  34. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The update has been submitted, the next one is already in the making (Building upgrades!).
    Here's the update list:

    - Fixed canceling pending building tasks.
    - Added unit and building categories.
    - Units and attack buildings can now either attack all types of enemies or only specific categories.
    - Added the ability to have multiple attack sources: Units can either attack from multiple sources in order (with the ability to add delay time in between) or randomly pick a source in each attack.
    - Added a custom inspector editor for the "Attack" component.
    - Helicopter unit in the demo now has two attack sources.
    - Added the "Tank" unit in the demo: slow vehicle but effective against buildings.
    - Updated NPC factions manager components.
    - Added the APC component: Component added to units that allow them to contain other units, transport and release them.
    - Releasing units from the APC can be done using tasks in the Task Panel. Releasing all units once or unit by unit are both possible.
     
    Paul-Swanson likes this.
  35. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Two questions before I buy.

    Have you added ability upgrades?
    How many AI units can this support on the map at a given time.
    Have you done a load test for it?

    Thanks. Been watching this asset for awhile
     
  36. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks for your interest for the RTS Engine.

    - Upgrades/Research can be summed up to:
    * Unit upgrades: Making the building that produces a certain unit launch an upgrade task and starting to produce an upgraded unit instead of the old.
    * Unit abilities upgrades: upgrading the speed, damage and other settings of units using research tasks.
    * Building upgrades: launching a task to replace the building with an upgraded one (coming in the next update, already WIP).
    - The performance of the game depends immensely on the models you have as units and buildings, the simple these models are (and they should be because it's a RTS game), the better performance you will have. The models in the demo scene are not the best RTS friendly type of models but I have got some pretty good results when spawning hundreds of units and having large amount of units attack each while keeping the FPS as high as 50. If you're going for a RTS like Age of Empires, Rise of Nations and similar games then the asset will perform well. Everything is also subject to improve, right after the next update (which will bring building upgrades), I will be taking care of the NPC management scripts and will try to maximize their performance.
     
  37. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    im having an problem that keeps crashing unity

    this error pops up then crashes unity

    "Assertion failed on expression: 'results ->dynamicBounds.empty()'

    then it crashes :/
     
  38. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    That is uncommon. Which Unity version are you using?
     
  39. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    the current verson i think
     
  40. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    - Does Unity crash as soon as you import the asset? Or does it happen at a certain point when the scene is playing?
    - Have you made any changes to the scripts or anything at all?
    - Is this happening in the demo scene or in in a scene that you have created?

    Can others please report if they are having the similar problem or is it working fine for you?
     
  41. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    I'm not having any such problem with mine. I'm on 5.6.1f though.
     
    OussamaB likes this.
  42. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The v1.0.8 is available on the asset store by the way. The next update will be submitted in 2 days. Then I will take care of the documentation and update it and attempt to make a video trailer or a series of video tutorials for the asset.
     
    Paul-Swanson likes this.
  43. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106

    - Does Unity crash as soon as you import the asset? Or does it happen at a certain point when the scene is playing?

    it happens at a random point when play testing the new faction im adding in

    - Have you made any changes to the scripts or anything at all? no i just followed what the other buildings have and applyed that to the new buildings

    - Is this happening in the demo scene or in in a scene that you have created? well..what i did was i took the demo scene and removed everything but the scripts and made a new level and stuff in it and renamed it (also..how do i have it appear on the map section screen? only the demo map comes up..or do i need to put it in the build to show up?)
     
  44. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Can you to test the demo scene for some time and see if the problem persists. I am trying to figure out whether it's related to the asset or the new scene that you are building.

    Adding the maps to the menu can be done by adding them in the "Maps" array of the "MapManager.cs" inspector.
    It's all explained in details here in the documentation: http://soumidelrio.com/docs/unity-rts-engine/single-player-menu/map-manager/
    Same thing applies for multiplayer.

    Please make sure that you've gone through the documentation at least once. It's really important.
     
  45. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    148
    A few questions:

    1) Is it possible to turn off that boarder thing? A lot of RTS games don't bother with that.
    2) I noticed a lot that units were bumping in to each other or getting stuck is this something you will be working on soon? Maybe a way to make units that are gathering resources pass through each other (like starcraft 2)
    3) I also noticed there is still no "attack move" function. Any plans for that?
     
  46. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    34
    Does this support terrains with varying height? I'm trying to get a Unity terrain in there and I'm noticing that not everything seems to function when it is not a completely flat surface. Certain oddities occur like buildings do not get placed on the terrain but all at the same level at the bottom Y of the terrain.
     
  47. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    It does ya.
    You need to set the navmesh to bake the custom terrain as walkable and the flat terrain as not walkable. You need make sure your angles meet your navmesh requirements. On your buildings you also need to set the max height appropriately as well.

    If you have a hill of 30 but max height is 20 you'll never be able to place it there.

    I think your issue that you described is not baking the navmesh properly.
     
    OussamaB likes this.
  48. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    34
    Thanks,
    I'll check that out. I know that I didn't bake onto the flat terrain but I'll try baking it as not walkable. I also checked out the max height params and it didn't appear to be the problem but I'll look into it more closely.
     
  49. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    34
    Thanks to the devs for making such a full-featured asset. I have a few coding suggestions, primarily it would help tremendously if you would use Unity Assertions during initialization(Start or Awake) to help people out when configuring the tool. I have put together a few maps and I'm always missing something that causes side-effects or failures like this without any feedback as to what might be wrong.

    For example, you can enforce that all references get set using:
    Unity.Assertions.Assert.IsNotNull(NPCMgrObj.GetComponent<NPCBuildingPlacement>());

    Or assert that there are Faction Definitions defined:
    Unity.Assertions.Assert.IsTrue(FactionDef.Length > 0);

    This can help catch config issues at the earliest point in the code execution.
     
  50. CPTEliteWarfare

    CPTEliteWarfare

    Joined:
    Apr 9, 2014
    Posts:
    68
    Is it possible to use Photon Network as a Network besides UNET?