Search Unity

Unity RTS Engine

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

  1. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    Is this happening in the demo multiplayer menu scene? Have you modified anything in there and do you have the latest Mirror integration package? I've just uploaded one about two days ago, same link: http://soumidelrio.com/docs/unity-rts-engine/multiplayer-mirror/
     
  2. bootss

    bootss

    Joined:
    May 12, 2019
    Posts:
    1
    I saw the online manual and created a new scene. And I'm trying to create a terrain, but I put the objects in the asset onto the terrain and it's all black. Finally, I am completely a Unity beginner. How do I create a new map and then create a terrain?
     
  3. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    What do you mean by completely black? Have you modified the camera? Are you getting any errors?
     
  4. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    A new version has been just submitted and is expected to be available tomorrow.
    This one is all about updating the RTS Engine to fix some reported issues and add support for the newest version of the Fog Of War asset that the RTS Engine supports. Here's the full update list:
    • Fixed an issue with initializing tasks in a task launcher when the task holder belongs to a faction that doesn’t have a faction type assigned to it.
    • Fixed an issue in displaying multiple selected entities that do not belong to the player’s faction.
    • Fixed an issue that made the last faction slot in a map unusable when the map is loaded from a multiplayer menu.
    • Fixed generating resources from a Resource Generator component in a multiplayer game.
    • Added new ResourceAdded custom event that is triggered each time a resource instance is initiated.
    • Double clicking on a building (owned by the player) will now trigger selecting buildings of the same type inside a range that can be defined from the Selection Manager inspector.
    • Updated the Fog Of War asset integration package to support the latest version and added a demo map scene that makes use of the fog of war asset in the integration package, please check the following page on how to configure the new integration package: http://soumidelrio.com/docs/unity-rts-engine/third-party-support/fog-of-war/
    Full changelog can be found here: http://soumidelrio.com/assets/rts-engine/changelog/
     
  5. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    v1.4.3. is now available on the asset store!
     
  6. ripjawwolffang

    ripjawwolffang

    Joined:
    May 6, 2019
    Posts:
    6
    Hey you have any video tutorials?
    I want to know what I’m getting into before I buy it as far as how difficult it is to add my own assets and stuff ^^
     
  7. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    There are currently no video tutorials but I suggest that you have a look at the documentation (link: http://soumidelrio.com/docs/unity-rts-engine/) and see how things are actually setup, you can also ask the community in the discord server (link: https://discordapp.com/invite/BsdQNKY) regarding how easy it is to use your own art assets in the RTS Engine.
     
  8. unity_KbyTpRlJOWZuWg

    unity_KbyTpRlJOWZuWg

    Joined:
    Mar 28, 2019
    Posts:
    7
    Trying to add a new "Building", actually a railway. How can I make sure that only Category3 (the new red icon in the top left HUD) items is visible for my villager (new_unit @ screenshot).

    PS: Don't worry about me messing up your nice GUI, it's okey for now...
     

    Attached Files:

  9. unity_KbyTpRlJOWZuWg

    unity_KbyTpRlJOWZuWg

    Joined:
    Mar 28, 2019
    Posts:
    7
    Got multiplayer to work finally, you forgot to write how important the name of the new scene is :) But it's laggy - a lot!

    Can you please answer my latest issue, I'm trying to show 1 specific icon in the HUD in the bottom left.
     
  10. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    200
    Are there any good screenshot examples of WIP games people would like to share? I think the inspiration would be welcome to the community. ;)
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    You mean restrict the buildings that a builder is able to place? If yes, then that has been suggested not so long ago and I'll be adding it soon along with restricting the resource types that a resource collector can collect.

    If that wasn't what you meant, please let me know!
     
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    I'm not sure I understood what you mean by "how important the name of the new scene is". What scene are we talking about here? The multiplayer menu scene or the map scene where the multiplayer scene takes place?

    And regarding the lag issues, do you mean that units get their positions snapped when you order them to do something? If yes, then that has to do with the "Snap Distance" field of the Input Manager component which has been set to a really low value causing this issue. If that wasn't it please let me know how is it lagging so I can have this fixed ASAP.
     
  13. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    I know some users who are privately working on their projects and do not want to share any info regarding what they're working on. Otherwise, we have some active users on the Discord server (invite link: https://discordapp.com/invite/BsdQNKY) who usually post screenshots/videos of what they're working on
     
  14. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    200
    ok great, i'll have to check it out
     
  15. unity_KbyTpRlJOWZuWg

    unity_KbyTpRlJOWZuWg

    Joined:
    Mar 28, 2019
    Posts:
    7
    Can you tell where the "building" icons is being added to the box (e.g. which array or which file to search in)?
     
  16. unity_KbyTpRlJOWZuWg

    unity_KbyTpRlJOWZuWg

    Joined:
    Mar 28, 2019
    Posts:
    7
    I haven't change any network preferences but I can check if the "Snap Distance" helps. It's also buggy because when we tested networking on 5 machines (pc and mac), the connection failed randomly, so it's for sure not stable
     
  17. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    You can find that in the TaskPanelUI script
     
  18. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    I'm not sure why the connection is failing randomly, there could be a lot of reasons for that. But if you're getting any errors/warnings regarding Mirror, you should report them to the Mirror developers. Else, if you catch any weird behavior or desync while playing a multiplayer game, please let me know!
     
  19. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    Just submitted v1.4.4 and with that a new a mission and scenario system will be introduced. This will allow you to create and customize single player campaigns just from the inspector! Here's the full update list for info:
    • Fixed subscribing/unsubscribing to custom events in the CustomEventsExample component.
    • Fixed placing buildings even if border objects aren’t spawned.
    • Updated building goto position objects to appear only if the player selects a building that belongs to their faction.
    • Fixed building placement rotation in multiplayer games.
    • Fixed ejecting single units from APC components in multiplayer games
    • Updated the multiplayer “Snap Distance” feature to be toggable and to only take effect if the source unit wasn’t alredy moving when the input command is received by a client in the game.
    • Fixed switching a faction entity’s attack type in a multiplayer game.
    • Updated the Unit Attack component to prohibit units from updating their positions locally for each client in a multiplayer game when their attack is out of their range which has been causing some desync issues in multiplayer games.
    • Fixed launching unit/building upgrades for NPC factions in a singleplayer game and factions other than the host player faction in a multiplayer game.
    • Added public FactionEntity type “KilledBy” property in the health component of faction entities (units and buildings) which holds a reference to the source that caused the death of the faction entity.
    • Updated the Builder component to include a new “Restrictions” field where building codes/categories can be inserted to represent the building types that can’t be placed or constructed by the builder.
    • Updated the Resource Collector component to allow to restrict the resoruce types that a unit can collect: Only resource types that are assigned in the Resource Collector’s “Collection Settings” field can be collected.
    • Updated the selection component to display the given error and flash the selection texture in the assigned negative color when the player attempts to do an action regarding the source of the selection component and it fails.
    • Added a new dynamic and customizable mission system which allows to create a single player campaign:
      • Create scenario asset files and create a series of missions for each scenario which need to be completed by the player in a sequential order to complete the scenario
      • Use the same scenario on multiple different map scenes
      • 4 different types of missions: resouce collection, faction entities elimination, faction entities production and custom mission (no specific objective but allows you to control the completeion/failure conditions of a mission using your own components).
      • Enable survival time for a mission allowing the player to complete a mission if their faction doesn’t get defeated in a certain time.
      • Set forfeit conditions for each mission: time limit or losing certain faction entities (units and/or buildings).
      • Completed scenarios are saved.
      • An example campaign menu is provided which allows to define a series of scenarios which the player can load, play and complete in order to unlock the next scenario.

    Single player campaign menu


    Screenshot from a game where a mission is in progress
     
    kev000 likes this.
  20. kev000

    kev000

    Joined:
    Jun 14, 2018
    Posts:
    4
    Hello. When I receive lag spikes from an unrelated problem there's lag that comes from the NPCTaskManager. The profiler says it uses Physics.OverlapShere but I don't see it in the OnClockUpdate. Could you help me out?
     
    Last edited: Jun 17, 2019
  21. unity_KbyTpRlJOWZuWg

    unity_KbyTpRlJOWZuWg

    Joined:
    Mar 28, 2019
    Posts:
    7
    GJ and nice bunch of new features,

    - "Updated the Builder component to include a new “Restrictions” field where building codes/categories can be inserted to represent the building types that can’t be placed or constructed by the builder."

    Problem: I can't find any Restrictions field and nothing in documentation about it. Do I need to upgrade my existing prefab buildings to get this feature?
     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    Unsure where this might be coming from. Can you describe how I can reproduce this or what is happening in the NPC faction when this happens? Also can you please not post code from the asset here on the forums? Thanks.
     
  23. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    The update has been submitted but it hasn't been accepted from the asset store team yet. It's the weekend after all, I expect it to be available tomorrow.
    I've also updated the documentation for the new update, here's where you can find info regarding the restrictions field in the builder component: http://soumidelrio.com/docs/unity-rts-engine/units/builder-component/
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
  25. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    10
    After importing asset i am getting below error(image)
    upload_2019-6-21_23-30-28.png
     
  26. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    10
    Please help
     
  27. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    Please remove the "RTSENGINE_FOW" from the scripting define symbols in the Player Settings and it will re-compile and fix those errors.

    Seems like I submitted the last update without removing that, just re-submitted another patch to fix that but it'll be only accepted on Monday.
     
  28. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    10
    Thanks OussamaB but what about other last two line thanks in advance
     
  29. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    10
    not only that please make mirror option off by default
     
    TIMTAN_DRM likes this.
  30. TIMTAN_DRM

    TIMTAN_DRM

    Joined:
    Nov 29, 2017
    Posts:
    2
    Hi,

    Thanks for making such an awesome framework. But when will you upgrade one version that support mobile phones? Actually, all Chinese guys are playing games via phones not pc in nowadays...^_^ May I know if you have any plan? Thanks.

    Br,
    Tim Tan.
     
  31. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    Yes, I removed all the extra scripting define symbols which caused these issues. Really sorry about this inconvenience.
     
  32. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    I can't really promise mobile controls any time soon but it's definitely in my to do list and as soon as more urgent features are added, I will consider mobile controls.
    But in the meantime, what you would suggest to have as mobile controls? How do you imagine the controls to be? (selecting multiple units, moving units, etc..)
     
  33. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    Just submitted v1.4.5 to the asset store, it should be available by Monday. This update brings improvements to the upgrade system making more customizable! Here's the full update list:
    • Fixed unit conversion to correctly update the new faction color for the converted unit.
    • Fixed an issue in the MovementManager component that caused a desync issue in multiplayer.
    • Fixed the selection box to not include units that are not active when selecting units.
    • Fixed the APC component by disallowing units to be added to it when it reaches maximum capacity.
    • Deprecated the UnitUpgrade and BuildingUpgrade components and replaced them by one Upgrade component which works for both units and buildings
    • Add one instance upgrade: If the upgrade launcher and the upgrade source are the same, then the option of upgrading that instance only is available.
    • Refactored the upgrade related components and re-wrote most of the logic behind the upgrade process to make it more performant and easier to customize.
    • Add the option to lock attack types by default making the player not able to switch to them.
    • Add new task type “Lock Attack”: Allows for a task to lock or unlock attack types that belong to the task launcher entity.
    • Deprecated the NPCUnitUpgradeManager and NPCBuildingUpgradeManager components and replaced them with one NPCUpgradeManager which will handle both unit and building upgrades.
    • Make sure to go through this guide before updating: http://soumidelrio.com/docs/unity-rts-engine/update-helper/v1-4-5/
    As always, you can find the full changelog here: http://soumidelrio.com/assets/rts-engine/changelog/
     
  34. Arkolis

    Arkolis

    Joined:
    Feb 6, 2015
    Posts:
    29
    Quick question when a unit dies (UnitDead event) How much information do we have access to before the unit is deleted? Was thinking of spawning a debris object so some of the resources can be recovered.
     
    Last edited: Jun 25, 2019
  35. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    You should have access to all the unit's information through that event.
    Regarding what you wanna do, I think you only need to get the unit's position and then spawn resources there.
     
  36. Arkolis

    Arkolis

    Joined:
    Feb 6, 2015
    Posts:
    29
    Another question, is there a way to allow units to fire from an APC? Or would this have to be a custom action?
    Also did A* pathfinding ever get addon support or did you wind up writing your own. My brother and I have been tossing the idea of destructible terrain back and forth (only for larger weapons) but havent started digging into the nav-mesh stuff.

    Thanks again!
     
    Last edited: Jun 26, 2019
  37. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    When units enter an APC, they currently get hidden and can not engage in any action.
    This would have to be a custom action where you modify the behavior of the actual APC component.

    There's currently no support for A* (although I have entertained the idea of adding it multiple times but that won't be any time soon)
    As for destructible terrain pieces, I think you will find this official Unity Navmesh component add-ons useful: https://github.com/Unity-Technologies/NavMeshComponents
     
  38. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
  39. MaxKMadiath

    MaxKMadiath

    Joined:
    Dec 10, 2016
    Posts:
    10
    Thanks :)
     
  40. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    I just submitted v1.4.6, main changes in this update is the point-and-click attack option (or as it is called in the RTS Engine, the terrain attack) where attack units do not require a target assigned to launch an attack. This can help build more complex units that can deliver better AoE with more freedom to where to direct the attack. Here are the main update changes:
    • Updated the UnitMovement component to disable syncing the unit’s position with the nav agent’s position to avoid snapping the unit’s position each time the navigation agent component is enabled.
    • Fixed an issue that allowed to start a building placement task when one is already in progress.
    • Fixed the “ready mark” sync issue the multiplayer lobby menu (Mirror integration package).
    • Fixed an error triggered when all NPC factions are defeated in a single player game.
    • Fixed a bug that disabled movement animation when the “take damage” animation is disabled an attempt to trigger it is done when the unit is moving.
    • Added option to reward the player’s faction with resources when a mission is completed or when a task (of a task launcher) is completed.
    • Added new terrain attack option:
      • Added option to no longer require attack units require to have an assigned target in order to launch an attack, instead they can now direct their attack at an area of the map’s terrain that the player assigns using the mouse while holding down a key which can be chosen from the Attack Manager’s inspector.
      • Added movement stopping distance field the attack range type which defines the stopping distance when an attack unit launches a terrain attack.
      • Update the attack related custom events to have a Vector3 targetPosition parameter in case the attack that triggered it is a terrain attack and does not require a target to be assigned.
    Here's a gif of the catapult applying a terrain attack:

     
    Last edited: Jul 15, 2019
    Arkolis and digiross like this.
  41. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    53
    Hi, quick question is this only for the creation of 3d RTS's or can 2d ones be created with it? I figure it might just be 3d, since pathfinding and such would vary a bit between the two types.
     
  42. michurebmann

    michurebmann

    Joined:
    Mar 8, 2018
    Posts:
    1
    Hi Oussama
    im new here, buy your great rts-engine a few day a go. i read the online docs and test some things, its amazing what u done so far!!!!

    i would like to archive a Wargame red ragon like unit/weapon behavior.

    but i have some questions.
    is just this forum avaiable? i mean im sure i will have problems other people allready had, but the solutions/tipps ar not foundable in a forum? for example i would like to imlement rockets (AA,AG,GA,GG) but im sure other people done this allrerady, would be nice if i cold find the allready existing solution somewhere....

    is the pathfinding/movement solution the native Unity thing? So i can watch/read tutorials abouth it just unity related?

    is there a more indepth discription abouth map creation or can i use all unity offers and just have to care abouth the unity pathfinding/movement thing (3th party map creators?)

    i use unity a lot some years a go and have to relearn some things so vorgive me if i ask stupid questions

    kind regards Michael Rebmann
     
  43. TheTaj

    TheTaj

    Joined:
    Jun 26, 2014
    Posts:
    10
    Hi,

    Quick question as I am trying to develop a game using this asset:
    Under RTS Engine>Map Resources>Resource Types, there are several Resource assets (e.g. Food, Knowledge, Metal). I'm trying to remove some of these resources, as they are non-essential to my design, however whenever I set the 'Starting Amount' value to 0 -- this number gets reset to 400 every time I re-open my project.
    Same goes for Factions>Faction Types> assets -- these values get reset when the project is closed and re-opened.

    I'm saving the scene and the project settings. How can I modify the values of these .asset files?
     
  44. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    You're right. The RTS Engine uses unity's built-in navigation mesh solution for unit movement and that's not functional in 2D, as far as I know.

    But yeah, the RTS Engine supports 3D only currently, although 2D is planned to be added in the future.

    I also invite you to join the discord server (link: https://discord.gg/BsdQNKY), ask your question for the rest of the members there and see if someone had attempting using the asset for 2D, you'll most probably find better advice regarding this topic there
     
  45. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    You can ask if someone had done this in the discord server + search the forums. I can't recall if someone actually worked on this or not.

    Yup, it's the built-in solution.

    The terrain/map related pages in the documentation are enough. And yes, you can use unity's terrain and other unity solutions for your maps.
     
  46. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,272
    It seems like some of the custom editor components are not compatible with how Unity detects changes in a custom editor and saves it. Thanks for reporting this, I've been already working on refactoring those and fixing this, I will be pushing the update next week.
     
  47. TheTaj

    TheTaj

    Joined:
    Jun 26, 2014
    Posts:
    10
    Thank you! (I thought I was going crazy)
     
  48. Darrkbeast

    Darrkbeast

    Joined:
    Mar 26, 2013
    Posts:
    53
    Thanks for responding, I like your asset either way and once I move on to my next game I will be grabbing it. I will join the discord too, thanks for the link.
     
  49. Huntah666

    Huntah666

    Joined:
    Aug 23, 2018
    Posts:
    10
    Hey OussamaB I sent this through a 'Contact us' message last week from your website, ill post here too since I haven't got a reply yet.

    I'm wondering if you can point me in the right direction to fix an issue I'm having, my archery units shoot each other once they enter one anothers range but they do not do any damage until they are moved closer.
    Their range is set to 15, here is a video of the issue.

     
  50. mcchief

    mcchief

    Joined:
    Feb 10, 2013
    Posts:
    7
    Hi All,

    I found this free "Mouselook" script on the web. It can be attached to the RTS Engine's camera to give you a freelook function. I would give credit to the author, but I don't remember where I found it, it's just been in my files for a while...

    Anyhow, the problem is it doesn't work correctly as it moves the camera instead of just looking around. I'm hoping someone (OussammaB perhaps?) can make it work so that freelook is an option to add to the RTS Engine's camera. Personally, I love being able to pan, zoom and rotate in a full 3D environment. I think it would be a great addition as an option people could use if they want it. THANKS!

    Here's the code:

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class Mouselook : MonoBehaviour
    6. {
    7.  
    8.     public float minX = -360.0f;
    9.     public float maxX = 360.0f;
    10.  
    11.     public float minY = -90.0f;
    12.     public float maxY = 90.0f;
    13.  
    14.     public float sensX = 100.0f;
    15.     public float sensY = 100.0f;
    16.  
    17.     float rotationY = 0.0f;
    18.     float rotationX = 0.0f;
    19.  
    20.     void Update()
    21.     {
    22.  
    23.         if (Input.GetMouseButton(2))
    24.         {
    25.             rotationX += Input.GetAxis("Mouse X") * sensX * Time.deltaTime;
    26.             rotationY += Input.GetAxis("Mouse Y") * sensY * Time.deltaTime;
    27.             rotationY = Mathf.Clamp(rotationY, minY, maxY);
    28.             transform.localEulerAngles = new Vector3(-rotationY, rotationX, 0);
    29.         }
    30.     }
    31. }
    32.