Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  6. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  7. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  8. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Unity RTS Engine

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

  1. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    Wonderful news mate!
     
  2. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    One more question...I've been busy today (now that most of my modeling is complete :) )
    The Death State in the animation controller doesn't seem to actually do anything. My units simply disappear and don't play the death animation that I have selected. The rest of my states work correctly.
    This is what my controller is set like
    Iv removed the transition from Idle and instead Connected 'Any State' to 'Dead', Removed Has Exit Time. Conditions IsDead as True.



    When I view the Preview window it functions like I want it to, but When I tested in in the game itself they just Poof outta sight. I'm rather puzzled as I can't find anything wrong.

    I did find a spot in the Unit.cs where it does: SetAnimState (UnitAnimState.Dead); on Line 772 in the DestroyUnitLocal () function, so as far as I can tell it should be working. But your the brains behind this :) Not sure if I broke something or if I bumbled upon a feature that is not yet fully implemented.
     
  3. navy3000

    navy3000

    Joined:
    Nov 28, 2014
    Posts:
    106
    finley i was able to buy this! can't wait to start making the RTS!
     
  4. 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?
     
  5. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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.
     
  6. navy3000

    navy3000

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

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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.
  8. OussamaB

    OussamaB

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

    OussamaB

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

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
     
  11. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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
  12. navy3000

    navy3000

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

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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?
     
    EliteSniperx16 likes this.
  14. OussamaB

    OussamaB

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

    Paul-Swanson

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

    EliteSniperx16

    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 :/
     
  17. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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.
     
  18. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
     
  19. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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
  20. TowerGuardian

    TowerGuardian

    Joined:
    Jun 9, 2013
    Posts:
    228
    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!
     
  21. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    137
    +1
     
  22. digiross

    digiross

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

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
  24. OussamaB

    OussamaB

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

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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.
     
  26. OussamaB

    OussamaB

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

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

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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
  28. TowerGuardian

    TowerGuardian

    Joined:
    Jun 9, 2013
    Posts:
    228
    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.
  29. EliteSniperx16

    EliteSniperx16

    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 ,
     
  30. OussamaB

    OussamaB

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

    OussamaB

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

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

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
     
    EliteSniperx16 likes this.
  33. EliteSniperx16

    EliteSniperx16

    Joined:
    Apr 9, 2014
    Posts:
    68
    ok thank you :)
     
  34. TowerGuardian

    TowerGuardian

    Joined:
    Jun 9, 2013
    Posts:
    228
    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
     
  35. OussamaB

    OussamaB

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

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
  37. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    722
    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
     
  38. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
     
  39. 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 :/
     
  40. OussamaB

    OussamaB

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

    navy3000

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

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    - 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?
     
  43. Paul-Swanson

    Paul-Swanson

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

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
  45. 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?)
     
  46. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,068
    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.
     
  47. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    145
    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?
     
  48. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    35
    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.
     
  49. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    83
    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.
  50. kenmgrimm

    kenmgrimm

    Joined:
    Nov 26, 2013
    Posts:
    35
    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.