Search Unity

Unity RTS Engine

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

  1. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Thanks for your suggestion but my layers are all the same as the demo buildings. I might add that the CPU players can build buildings without issue. I duplicated one of the demo buildings and then changed it to how my original building was and it works, so I guess I can just do that. Curious as to what the problem is though.
     
  2. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Make sure that "Placed By Defaulted" is disabled in the "Building" component inspector.
    If that didn't work, please show us a screenshot of the "Building" inspector, there's probably some mistake in the configuration.
     
  3. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
  4. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
  5. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    @OussamaB I am using the building center with the border. The issue only happens when I create a building from scratch. When I duplicate one of the demo buildings and then enter the exact same settings it works just fine.
     
  6. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Seems like you missed something while configuring the building. You can e-mail me the building prefab that is not working and I will take a better look at it. In the meantime, please continue using the demo buildings as a base for your buildings in order to not waste time.
     
  7. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    What's your email? I can't find it anywhere...maybe I'm just being special haha.
     
  8. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Please check your personal mesaages.
     
  9. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Hi everyone, so I have a few questions/suggestion. First off, I have created a converter unit. I want it to spawn out of a building other than my capitol building. I see in the demo map, the converter is spawned from a script called "NPC Unit Spawner", which I'm not really sure what it does since there is no documentation on it. I thought I could use it for my converter but there is no place to input what building I want the unit to spawn from. I opened the script and see there is a public SourceBuilding, but it's hidden in the inspector. I commented out the part that hid it and was able to put the building I wanted in, but then received errors. So just wondering if anybody has a solution to this. Secondly, in the animator controller there is a bool "isConverting", but no converter slot for playing the actual animation. So not sure about that. Obviously I know I can go into the scripts and code it myself, I would just like to not mess up the original scripts as much as possible. As for the suggestion, instead of just having units do the same amount of damage to all units, I would like if you could do different amounts of damage to different category units. That way units could have strengths and weaknesses and be countered by other units. You can already make it so units can only attack certain other categories so I thought that might be a fairly easy thing to implement. Also, I would love to have more control over what buildings the NPCs place. Because I have some buildings that they just never build. Something like with the units where you can choose how many per 100 get built. Thanks! :)
     
    Last edited: Dec 9, 2017
  10. gnattt

    gnattt

    Joined:
    Jun 2, 2015
    Posts:
    2
    Just purchased the RTS Engine, Very happy at first glance, can't wait to dig a bit further into the system and find out how everything works, Thanks heaps for the effort that you have put in to this asset ! :D
    Regards,
    Gnat
     
  11. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    So I spent a lot of time searching for the issue and finally found it. In "BuildingPlacement.cs" in line 118 you'll find this line:
    Code (csharp):
    1. if(Input.GetMouseButtonUp(0))
    change it to this:
    Code (csharp):
    1. if(Input.GetMouseButton(0))
    The next update will include this fix. Thanks a lot for your patience.
     
    jobo22 likes this.
  12. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    You simply make a new task in the building where you want your unit to be spawned at and configure the task to make it spawn a unit. Check the documentations on how to create building tasks.

    That component is responsible for spawning special units (like Healers, Converters, APC vehicles, etc..) based on a couple of settings that you enter in the inspector and that's only for NPC Factions (all components starting with "NPC" have nothing to do with the faction that the player controls).
    My apologies for not having anything regarding that component in the documentation. It needs an urgent update.

    The animators need an update too. I didn't have an animation for the unit when healing/converting so I simply didn't use any and therefore forget to update the animators. They will be all good for the next update.

    It's a great suggestion indeed. Expect that soon!

    What buildings exactly do not get placed by the NPC Faction? What are their types?
     
    jobo22 likes this.
  13. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks a lot for the nice words! Please let me know if you have any inquires about the RTS Engine!
    Also would be awesome to leave a rating/review on the asset store. It really helps.
     
    gnattt likes this.
  14. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    @OussamaB Thanks so much for your help! Also glad you liked my suggestion about the units damage. As for my suggestion about NPC buildings, don't worry about it. I just had some settings not set right. But I have everything figured out now! :)
     
    Last edited: Dec 10, 2017
    OussamaB likes this.
  15. uniLogix

    uniLogix

    Joined:
    May 24, 2015
    Posts:
    12
    Hi I bought this asset and want to test with my friend from another country. Right now what I can see is I create local server through one instance and connect to it through standalone build or editor and play. Till this multiplayer seems okay. But this is not what I want, I want to play from 2 different computers connected to same internet, and then play with my friends from different places(cities, countries).
    I have studied UNET documentation too. Now I need your guidance how to achieve what I suggested. Will I need dedicated server? Is there any asset that can make it happen?
    Or is there any youtube tutorial?
    Please help me.
     
  16. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The latest version of the asset allows you to play with other clients from different computers but on the same network smoothly. As for the online multiplayer, that is a work in progress as I'm also studying other options such as Photon and haven't decided yet.

    You don't need an asset or a dedicated server, everything is in this asset.

    P.S: Sometimes the game doesn't get synced in the same network because the firewall blocks it, please make sure that's not the case.
     
  17. uniLogix

    uniLogix

    Joined:
    May 24, 2015
    Posts:
    12
    Do I need to connect to Unity service and enable Multiplayer to test between different networks?
    Like playing from different locations.
    I cannot find any tutorial on your website for multiplayer setup.
    Please help me.
     
  18. CPTEliteWarfare

    CPTEliteWarfare

    Joined:
    Apr 9, 2014
    Posts:
    68
    Yes you need to enable Unity Multiplayer Service , You also need to direct the multiplayer match maker to one server if you leave it default it will make your friend connect to his region server. For Example if you live in the US and your Friend lives in the UK or somewhere else not in the US he will connect to a EU Server and you will connect to a US Server which you will then not be able to see each other
     
    OussamaB likes this.
  19. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    I would love if we could use a combination of Unet and Steam matchmaking. That way we wouldn't have to pay Unity for their matchmaking and relay services. At least that's what I think.
     
  20. CPTEliteWarfare

    CPTEliteWarfare

    Joined:
    Apr 9, 2014
    Posts:
    68
    Look up this asset called PhotonThunder its photon services but allows for UNet code. Ill probably use it for my game since i really dont have alot of cash to throw at unity for their expensive multiplayer services.
     
  21. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Can't wait to see it! Please keep us updated on it! And I will definitely check out PhotonThunder! :)
     
  22. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    I think this is the first game (that I know of) that uses RTS Engine and that reached this stage. So congratulations! I'm really excited to play it.
    I'd also want to thank you for helping with suggestions, adding more features and reporting these nasty bugs throughout the development of the asset! It is really appreciated.
     
    TimTan-DRM and jobo22 like this.
  23. ikojp

    ikojp

    Joined:
    Jul 16, 2015
    Posts:
    14
    Hello,

    first of all, thanks for this nice rts project. I bought it quite a while ago and just had a look at it again. One thing i am wondering about is the current state of the multiplayer. After having a first glance at it, it seems like it is server authoritative, right? I noticed that when I move a unit, it takes 0.5 to 1 second before the unit starts moving, which is pretty annoying. I guess this is because there is no client side prediction implemented yet? If so, do you have any plans to add that to the project?

    Again, very nice starting point for a rts game. Thank you very much for updating it regularly.
     
  24. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The current multiplayer system is not final. It's a work in progress and it's getting regularly updated.
    I'm also considering moving to Photon but still studying that option.

    That's one of main things that are on the multiplayer to-do list.

    I ask for your patience and understanding that this may take some time. Your support is the thing that keeps pushing me to add more and I thank you for that.
     
    gnattt and ikojp like this.
  25. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    @OussamaB Something I would love to have in this engine is random/generated maps. Not sure how hard that would be, and it's obviously not important right now. Just an idea.
     
  26. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    That is definitely something I have considered but there are things right now that have a higher priority so that will have to wait. Thanks for understanding!
     
    jobo22 likes this.
  27. cidiego

    cidiego

    Joined:
    Oct 27, 2017
    Posts:
    17
    Hi OussamaB.
    Thanks again for your proyect and time. Heres a couple of things

    Im trying to create a mill that will itself create a cultivated field. That field will serve as a food source. However, the Engine requires the resources to be declared as map objects before the match startes. How can we add resources from buildings created within a game, like crops fields or livestock.

    Another thing regarding the animations. I cant get the walking animation to work. I think it is because of the movement system of the units. They dont have root motion, i think. On top of that, the Nav mesh Agent disables itself automatically.
    The thing is, when I command a unit to move towards an empty space, it wont show the walking animation. But if I command a civillian to go towards a metal source, for him to mine it, the walking animation shows up.

    Please help me out here.
    Thanks a lot
     
  28. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    This is a weird one. Can you make sure that there's nothing messed up in the configurations? Check the following things:
    - The animator in the Unit component is correctly set.
    - Move the unit to an empty space and have a look at his animator and see if the "IsMoving" parameter is set to true or not while the unit is moving.
    - Make sure you haven't changed anything in the animator state connections.

    Does this mean that you want to create resources dynamically when the game is running?
     
  29. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    Did this ever get implemented?
    construction states
    build Walls
    Place multi-buildings at once
     
  30. cidiego

    cidiego

    Joined:
    Oct 27, 2017
    Posts:
    17
    Exactly. I think that is a good idea. In the same way Age of Empire's farms are created as a source of food to be collected.

    Thanks a lot for your time, once again.
     
  31. jobo22

    jobo22

    Joined:
    Dec 1, 2016
    Posts:
    83
    Hi, construction states and placing multiple buildings at once have both been implemented. I haven't seen any way to build walls though, so I don't think that has.
     
    OussamaB likes this.
  32. cidiego

    cidiego

    Joined:
    Oct 27, 2017
    Posts:
    17
    Unity gives me these two errors: "Failed to create agent because there is no valid NavMesh" and "Object reference not set to an instance of an object Scripts/Unit.cs 137

    I dont get whats wrong with the NavMesh ( im very noob yet) and there is something wrong with line 137 of Unit script : SelectionMgr = GameMgr.SelectionMgr;
     
  33. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    A) You need to bake a new navmesh for your terrain
    B) You need to assign an object in your game manager to be the visual Q's that the units are selected (its likey either your Units planes are not on the correct layer, or you accidently remved the one thats optional) At least thats my expereince with those errors
     
  34. cidiego

    cidiego

    Joined:
    Oct 27, 2017
    Posts:
    17
    Thank you for your time.
    I have baked the new navmesh. That solved problem A.
    However, I dont know how to solve problem B. My units are on the correct layer: Buildings, units... so I guess thats not it. The thing is, I dont know how to assign an object in my game manager to be de visual Q. Can you please explain it? I would appreciate it a lot.
     
  35. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Added to the to-do list. Thanks for the suggestion!
     
  36. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Are you sure you have not changed the script execution order?
     
  37. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    So I'm looking for someone who has good experience with the RTS Engine and who has made a couple of changes (code-wise) to improve the asset for an ambitious project. PM me if you're interested.
     
  38. Sphelps

    Sphelps

    Joined:
    Jun 9, 2013
    Posts:
    243
    When can we expect next update and what is to come?
     
  39. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The next update has been submitted one day and this is the update list:

    - Fixed a bug in building placement.
    - Added namespaces for all RTS Engine components.
    - Updated animators to include states for both healers and converters
    - Updated the Unit Attack component so that units can have different damage points depending on the target unit/building.
    - Added group selections: Assign group selections by pressing one of the num keys while selecting a group of units and use the same num keys to directly select that unit group each time.
    - Fixed a bug in playing resource collection audio clips.
    - Improved how sounds are played in general by limiting the components that can play audio clips.
     
  40. DonJorris

    DonJorris

    Joined:
    Mar 29, 2016
    Posts:
    8
    Hello OussamaB,
    I am really interested in your engine and are going to buy it in the next couple of days.
    Still, I've got some questions about some features and would be happy to know if they are already implemented or planned...

    I was playing a lot of RTS games and loved "Battle for Middle Earth" and "Supreme Commander: Forged Alliances". Two Features of these games were important in my opinion:
    - You were building battalions instead of single units, which did not feel clumsy and speeded up the production time of bigger armies.
    - The AI of SupCom was able to build their bases on important or tactical places on the map, which had been chosen by the map creator (Blueprint like system, that the AI just filled out). This made it feel intelligent and much harder to defeat than a normal AI just building the same base over and over.

    My question is: Can this be achieved with the RTS Engine?

    Thank you for your time!
     
  41. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Thanks for your interest in the RTS Engine.
    Both of the above are not in the asset right now but I just added them to my to-do list. The AI-related one seems really good and would indeed help make the AI smarter.
     
    DonJorris likes this.
  42. kmayfield

    kmayfield

    Joined:
    Jan 1, 2017
    Posts:
    9
    Any thoughts on how to make flying units take-off and land?
     
  43. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    I've had some thoughts on this actually. But nothing tested yet. Possibly in your animation controller do some initialisation 1 shot animation that nothing transfers back to. Make that your default state that leads to your looping idle. If you test before me please let me know how it does. I would make it so initially the collider is disabled but active once the thing has taken off as part of the animation. That might help avoid navmesh plane issues.

    *thinking further on that. Turning off the collider would make the unit invincible taking off and landing...so perhaps not a good idea after all
     
    Last edited: Jan 6, 2018
  44. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    That is currently not supported because the flying units have their own navigation mesh.
     
  45. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    The RTS Engine v1.2.1 is now available on the asset store! Let me know what you think.
     
    jobo22 likes this.
  46. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hi i want buy this asset, I have a question do you know went is going be on sale the asset? Also is any max capacity for the army? For example I have a stable and barracks and my max capacity is 200 and my current capacity is 100 if I reach this capacity, is any build that make increase the capacity for example build houses that give you 5 of capacity this way I can build many houses to have the max capacity of 200. Also I have a very nice idea for make this more interesting community in this very nice asset.im go send you a PM and explain to you.
     
    Last edited: Jan 9, 2018
  47. OussamaB

    OussamaB

    Joined:
    Feb 8, 2013
    Posts:
    1,470
    Can't really mention sales prior to the sale itself.

    You can easily choose this in the engine.

    You can make any building you want add X amount of population slots for the faction.
     
  48. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    jobo22 likes this.
  49. mediaticsvc64

    mediaticsvc64

    Joined:
    Nov 7, 2015
    Posts:
    28
    Hi and thanks for this great asset. I don't know if you told something about that before but i wonder if there is any way to add a save system ?
    I would also know if it is possible to put buildings in a specific area like a house near water for fishing....
     
  50. Paul-Swanson

    Paul-Swanson

    Joined:
    Jan 22, 2014
    Posts:
    319
    He hasn't put in a save system yet.

    I'm going to see how allSave works on this though. I'll let you all know how it works when I get to it. It broke my Ufps project already...but that system is ...hard... so shady so far
     
    OussamaB and jobo22 like this.