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,470
    This is one of the issues that's getting fixed. You haven't missed anything there was indeed an issue with latency and that caused positions to be snapped a lot. I'm positive that with the new multiplayer system in the next update, things will improve dramatically.

    I'm not sure that a detailed update log would help a lot because the modifications I've made regarding the code is re-write a lot of stuff, break the code into smaller pieces so that all components can be easily inherited and methods can be easily overriden. I will attempt to do a detailed update log but it might not be very helpful and might even cause more confusion for you. What components did you mainly modify?
     
  2. okito122

    okito122

    Joined:
    Dec 25, 2015
    Posts:
    3
    I've modified the Unit and Attack code a bunch(mainly), but don't worry then as long as you just include names of scripts you've changed/modified it will be enough for me to figure it out I believe :) Can't wait for the update :p
     
    OussamaB likes this.
  3. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Alright.

    -----

    Here's a sneak peak of the new units in the new demo scene in the next map (also a sneak peak of the new map):



    As always, credits to Kenney for the amazing assets.
     
    purnamasari, Warspawn and jobo22 like this.
  4. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    I really appreciate seeing the performance tests man. It really helps me out a ton with deciding to use your asset or not. I'm using a Third Person controller asset right now from the asset store and its not very efficient. I'm gonna have to over haul it. Make a scene that lets you set different number of units to add or something like that.
    Then the community with different computer stats can compare results.
    Mention the performance test insert in your patch notes in Unity so I'll know when you do it. I'll import your asset for the first time and try it out.

    Keep in mind I don't have a number in my head of how many Units should be able to run. Seems a RTS needs minimum 200 units total between all players. Be super nice if you can hit that number.
     
  5. purnamasari

    purnamasari

    Joined:
    Mar 8, 2018
    Posts:
    17
    upload_2018-4-6_16-54-52.png

    I had some problem with water and terrain. It's simply water surface that is little higher than bottom of sea. I planning to put and make the object moving over the water surface. What I tried so far is baked it and create new mask area called Water. I set the boat object property mask to Water, but it still can't be moved. So I tried to add Walkable, and it works.

    But, here is a problem:

    1. The bottom of sea isn't flat, so whenever I trying to move the object, it will depends on sea bottom surface.
    What I'm supposed to do so the object moving based on the Water surface, not the sea bottom surface?

    2. I'm not using right click for moving object, but modify some basic command by socket to spawn, moving, and attack object. I'm using this for moving.
    Units [i].CheckUnitPathLocal (v,null,0.0f,0);

    How can I moving them when the Y Vector3 isn't flat, or even a hill? I mean, when I trying to move unit to Y = 0, but the terrain with those vector only available for Y = 20.

    Thank you.
     
  6. purnamasari

    purnamasari

    Joined:
    Mar 8, 2018
    Posts:
    17
    Amazing! Can't wait for the next update XD
     
    OussamaB likes this.
  7. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Can this be done on a sphere? As I want to make a 1st Person FPS/RTS on planets
     
  8. Smojj

    Smojj

    Joined:
    Apr 9, 2018
    Posts:
    4
    Hi!

    I haven't bought this yet, as I just want to make sure that it will suit my project, so I'd like to ask you guys if you think it would be suitable for what I want to do...

    My project is not really an RTS as such, although it will share similar characteristics.

    I am designing a strategy game for the air war in WW2 Europe. So I'm looking at it as a top down, with the air base operations and mission planning etc. happening on a representation of the base.

    Once the target is assigned, the player will then have to draw up a flight plan on a map of Europe showing the cities, factories, train yards and everything else. The player will try to avoid areas with a high density of anti aircraft fire or fighter aircraft and radar installations.

    These flight plans will be a number of waypoints on the map, then the IP (initial point; where the aircraft start their bomb runs), and then return to base. There will be some divergence away from the planned path due to wind drift, bad navigating by the aircraft crews, cloud cover, aircraft damage issues etc.

    So the main mechanic I'm curious about, is Unity RTS Engine's ability to streamline the whole process of player initiated waypointing.

    Does RTS Engine have this ability?

    Another mechanic I'm curious about is the package's ability to handle different scenes possibly simultaneously.

    For example, the base will be a top down view of an air base. Then there may be an FPS style element of being able to walk around the base, and enter the various buildings. Then the flight planning screen I mentioned, which will pretty much be just a map with a bunch of lines and aircraft all over it. It will be necessary to flip between these screens, and probably a view others (possibly with the ability to cascade screens).

    How does that sound? Achievable?

    Thanks in advance for any advice.
     
  9. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    When baking the navmesh does it not consider the surface of the water and considers instead only the bottom?

    Also check this comment to handle the water area in the navigation mesh.
    https://forum.unity.com/threads/unity-rts-engine.455283/page-2#post-3040495

    P.S: The next update will introduce a new Terrain Manager component which will manage different areas of walkable surfaces much better.

    You can use SampleHeight to get the height of the terrain where you're spawning the unit and use the result value as the unit's position on the y axis.
    Here's the documentation page for SampleHeight: https://docs.unity3d.com/ScriptReference/Terrain.SampleHeight.html
     
  10. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    This is currently not supported, sorry.
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Although the feature sounds awesome, it's unfortunately too specific to be included in the RTS Engine so you'd have to dig in the code and implement it yourself if you decide to get the RTS Engine (I will provide help to explain which parts fo code that need to be modified in that case).

    This does not sound achievable with the RTS Engine, again it's way too specific to be included as a feature.

    --------------------

    Also really sorry for the late replies, I was travelling in the last two days and it took all the time I have.
     
  12. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK Thank you pity what a shame
     
  13. Smojj

    Smojj

    Joined:
    Apr 9, 2018
    Posts:
    4
    Cheers for the reply. Waypointing would really help me out.

    I'll end up grabbing this anyway, I'm sure RTS Engine will do many of the things I need it to do. I'll just have to dig for the rest. And thanks for the offer of help.
     
  14. mikemuk01

    mikemuk01

    Joined:
    Dec 1, 2016
    Posts:
    53
    This looks like a great asset. Before I buy it can you let me know if I would be able to use my own buildings, objects and so on, to change the look of the game?
     
  15. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Yes you can change the units, buildings, UI, and make your own maps. It's all very easy to do from the inspector. Here is a link to the documentation. http://soumidelrio.com/docs/unity-rts-engine/
     
    OussamaB and Warspawn like this.
  16. mikemuk01

    mikemuk01

    Joined:
    Dec 1, 2016
    Posts:
    53
    Thank you very much for your answer to my question I’ll be buying the asset soon.
     
    Warspawn and jobo22 like this.
  17. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Hey guys, so the next update is basically ready but I need a couple of you to test it before it's available on the asset store while I'm working on the documentation.
    So if you're interested, let me know!
     
  18. okito122

    okito122

    Joined:
    Dec 25, 2015
    Posts:
    3
    Hmm, any more info about the testing? Might be interested :)
     
  19. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK What type of Units can I have? Can I have Hovertanks and can I have it so that A.I pilots/Drivers once they eject from their destroyed vehicles they go back to their factory and it is added to the factory count/array unless there is an empty vehicle nearby? Can I have mobile factories ? And I guess I can add a 1st/3rd Person camera and controller?
     
  20. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Will PM me in case you're selected for the testing. Thanks!
     
  21. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Could you please elaborate more your suggestions?
    Some of them are way too game-specific to be included in the asset but I'll see how it goes. None of this unfortunately will be added in the next update because it's already done and I'm currently working on a better demo, updating the docs and probably a promotional video.
     
  22. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    Well I gather you will have drivable vehicles at some point in your project hopefully ? As I think that would be great if you could include that as an option in your R.T.S Engine
     
  23. purnamasari

    purnamasari

    Joined:
    Mar 8, 2018
    Posts:
    17
    I build the project to webGL, the build was success, but it shows error on browser like:
    Code (JavaScript):
    1. An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
    2. uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace (Result.asm.framework.unityweb:2:27619)
    What I supposed to do to fix this? My project require to build to webgl, if there's any tutorial to export this engine to webgl, it would be appreciated
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Well you can use vehicles as units but what do you mean exactly by drivable?
     
  25. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Sorry about the issue you're having with webGL, I'm looking into it now.
     
  26. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Some news regarding the new update, it's going to take a couple of days before the release: I'm now re-writing the whole pathfinding-related code and it will be better than ever. Will share a couple of screenshots or gifs soon.
     
    jobo22, Warspawn and okito122 like this.
  27. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    That the player can virtually drive them in the 1st/3rd person if the Game maker chooses to make the R.T.S that way
     
    Last edited: Apr 20, 2018
  28. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Is there any way that you can construct buildings without having to have a worker build them? I want to select the building directly from my capital building and place them without having to have a unit build it. If I can't do that now, would you mind implementing that feature if it's not to hard?
     
  29. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Well there isn't really support for 1st/3rd person features so that might not be possible in the foreseeable future
     
  30. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    What you can do now is use the custom delegate event that is called whenever a building is placed and add max health to it. However I will add that feature in the next update, it's not that complicated.
     
  31. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Here's a sneak peak of the new pathfinding behavior in RTS Engine v1.3.0. What do you guys think?

     
  32. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Ok I could do the custom delegate, but I can't choose a building to place unless I have a worker with the builder component. I tried adding the builder component to my capital building but I couldn't choose a building when I selected it. I don't want to have workers in my game. Thanks! :)
     
  33. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I attempted making a WebGL build for the most recent available version of the RTS Engine and it's working well.
    There's also an official WebGL demo for the RTS Engine in this link: http://soumidelrio.com/asset/rts-engine/index.html
     
  34. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    That requires a separated component that has access to the buildings list in the Building Placement component and then allows the player to pick a building and use the methods in the Building Placement component to place it. Does that seem something that you can do? Don't hesitate to ask for more help regarding code modifications!
     
    jobo22 likes this.
  35. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK thank you
     
  36. WithinAmnesia

    WithinAmnesia

    Joined:
    Oct 31, 2016
    Posts:
    20
    Is there going to be differing elevation levels in the new map? Also what is possible for a singe player campaign mode where before each mission there is a cut scene and or a splash screen with dialog telling the player their objectives and you do say ten missions that unlock one after the other for a campaign for a certain faction. Basically what are you going to do to offer what every big R.T.S. game offers for single player content?
     
    jobo22 likes this.
  37. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Yes I could do that. So what components do I need to add/change for it to allow me to build a building from my capital?
     
  38. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Sorry for all the questions, but I keep getting a error when I try to attack. The units won't attack each other. When I right click on an enemy unit, it gives me this error -

    NullReferenceException: Object reference not set to an instance of an object
    RTSEngine.SelectionManager.LaunchAttack (System.Collections.Generic.List`1 SelectedUnits, UnityEngine.GameObject TargetObj, Boolean ChangeTarget) (at Assets/RTS Engine/Selection/Scripts/SelectionManager.cs:1196)
    RTSEngine.SelectionManager.ActionOnUnit (RTSEngine.Unit HitUnit, TaskTypes TaskType) (at Assets/RTS Engine/Selection/Scripts/SelectionManager.cs:670)
    RTSEngine.SelectionManager.Update () (at Assets/RTS Engine/Selection/Scripts/SelectionManager.cs:131)

    When I move my unit into range of the enemy, it gives me this error -

    NullReferenceException: Object reference not set to an instance of an object
    RTSEngine.Attack.Update () (at Assets/RTS Engine/Units/Scripts/Attack.cs:408)

    When I play the demo scene, it works just fine, so I tried using some of the demo units in my scene and it gave the same errors. I have looked over my units several times and they look like they are set up properly when I compare them to the demo units and the documentation. Sorry for the trouble! Thanks! :)

    P.S. I have had the units attack successfully in other projects I have tried. Those were all older versions of the RTS Engine, this is my first project using version 1.2.3.
     
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Yes, there will be hills in the new demo scene.

    That's something on the roadmap and will most likely be available pretty soon (3rd party integration with other mission building assets might be also available). I just need to finish this update (I'm in the stage of code refactoring and updating the docs right now), I will have a clear roadmap for the upcoming updates which will be small and regular ones.
     
  40. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    You need to access the Building Placement component and then access the "AllBuildings" list from there, then use that list to create a UI panel where you display all the buildings in that list. When a player clicks on one of the buildings in that UI menu, use the "StartPlacingBuilding(int BuildingID)" method to trigger the building placement by providing the index of the building in the list.
     
    jobo22 likes this.
  41. pyrodevir

    pyrodevir

    Joined:
    Apr 12, 2018
    Posts:
    1
    Thanks for your work on this engine. I had some issues:
    Your import come with a lot of obsolet things, like those lightningData that I fixed, crossPlatformInput too,... I reach a error once start importing and creating a map:
    ASSERTION FAILED ON EXPRESSION: 'M_PRELOADTEXTUREATLASDATA.SIZE() == M_DETAILPROTOTYPES.SIZE()
    Also, I can navigate on the scripts, but the first thing is that don't exist a Terrain.manager.
     
  42. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Ok I think I will just wait for you to implement it haha (if you want to). It's definitely not a rush, I can just use workers for now, and a custom delegate if I want the buildings immediately finished. Thanks very much! I love this asset! :)
     
  43. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    So I tried my units in the demo scene and they work just fine, so the problem is not my units. Something must not be set up right in the scene. One thing I notice is that whenever I create a new map, there is a component that says it can't load because the script is missing. I'm not sure what it is, when I compare my game manager to the demo scene's one, they both look the same. Hopefully I can get this figured out.
     
  44. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    This is basically harmless, it's tied to the terrain prefab in the demo scene which once upgrading Unity from a version to another got corrupted however it doesn't really cause any problem once you use the RTS Engine in the demo scene or in any other scene that you create.

    If you're referring to the documentation, the Terrain Manager is actually one of the new features coming to RTS Engine v1.3.0 which is coming soon and I was testing the new docs yesterday but forgot to reset this one, the old documentation related to how terrain in previously work are now back on the website.
    The documentation's page has been restored.
     
    pyrodevir likes this.
  45. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Alright, thanks a lot for understanding, it's a priority for me right now to get this new update out and then I will have enough time to take care of this.

    I went back to 1.2.3 and was checking this errors so I will need you to confirm whether you have the Attack Manager in the scene you've created or not. Because that is required to manage attack between units.

     
    jobo22 likes this.
  46. jamiemeeuwsen31

    jamiemeeuwsen31

    Joined:
    Apr 24, 2018
    Posts:
    3
    i don't really understand how to use this
    I have multiple factions that I want to create, I have all the models, my factions I want are US army Soviet Army Japenese Army British army and German Army how do I create these factions can some help I tried following the tutorials but there quite brief for my logic and I'm not having much like
     

    Attached Files:

  47. jamiemeeuwsen31

    jamiemeeuwsen31

    Joined:
    Apr 24, 2018
    Posts:
    3
    confused
     

    Attached Files:

  48. jamiemeeuwsen31

    jamiemeeuwsen31

    Joined:
    Apr 24, 2018
    Posts:
    3
    in faction name do I just ttype in whatever I want, and then where it says units of this faction I type each model name specific to that faction? but I still don't get it cuz its got up there faction 1 and so on
     
  49. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Thank you, I did not have the Attack Manager script in my scene. I added it and now it works! One thing I noticed is that if you continuously right click on an enemy unit very quickly, your units will keep shooting without having to wait for their reload time. This only happens if "Attack On Assign" is set to true. Not sure if there is an easy fix for that, or if you were already aware of it. As always, thanks tons for your help and support and I can't wait for your new update! :)
     
  50. Seling

    Seling

    Joined:
    Apr 26, 2018
    Posts:
    97
    Hello, you seem to have a great asset but I would like to know if some others things can be done with this base.

    How can we edit the AI part? What is the level of scripting? Can we replace everything?
    I'm a specialist in AI and this is my main objective to develop some complex scripts.

    Another thing : can we define superweapon behaviors ?

    And the last one : have you a code which allows to create some intereception of bullets and missiles for example?