Search Unity

SRTS Pack

Discussion in 'Assets and Asset Store' started by ReiBM, Oct 29, 2014.

  1. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hello all!

    BoomSnapshot1.PNG

    Links : Assets Store | Webplayer | Tutorial | Video

    The SRTS pack's goal is to help you streamline the process of making your own RTS game! The pack has everything you need in order to make your own game, from A* pathfinding to Fog of War, this pack will provide you with a well optimized and extremely customizable experience!

    The pack also has an extensive custom editor to help speed up production and reduce the learning curve.

    Here is a quick video to show some of the packs features!



    Features :
    • UGrid (Grid Generator System)
    • Simple Map Seeding
    • MultiThreaded A* Pathfinding
    • Camera Movement
    • Unit/Building Selection
    • Unit Controller
    • Factions
    • Unit Types
    • Building Controller
    • Building Placement*
    • Tech Trees and Effects
    • Fog of War system
    • Mini Map System
    • Basic Cursor Manager*
    • GUI Manager
    • Resource System
    Current WIP systems :
    • More Building Placement Features
    • More Unit Production Features
    • Updated Demo Scene
    *Works in Progress, have more features to implement in later versions

    Links : Assets Store | Webplayer | Tutorial | Video
     
    Last edited: Jan 2, 2015
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I'm checking this out now. But I can't even figure out how to work the web demo. I see that I can select a unit and click a "Jildii" (?!?) button to make it build a building. But how do you make a unit just walk somewhere? And how do you select a building to upgrade or make units or whatever it does?
     
  3. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    I see, I will add instructions to the webplayer page shortly. I am not sure why the button is called "Jildii" for you, it is "Building" whenever I pull it up. Also I strongly recommend waiting a bit if you plan on purchasing the pack as I have requested the price be dropped to $60 after checking out other packs of similar quality.
     
    Last edited: Nov 6, 2014
  4. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hey guys, just wanted to let you know the price has been reduced to $60!
     
  5. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    OK. I see you added some instructions too, but does right-clicking actually work for you? For me, it brings up the Unity web player contextual menu. As far as I know, you can't use the right mouse button in the web player... can you set it to use shift-click or command-click or something instead?

    Also, I figured out what's going on with the "Building" button... it's simply too narrow; it's getting cut off on the left and right. Here's a screen shot of what I see:

    You should probably do something with that "I'm a paragraph" paragraph, too. :)
     
  6. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    I recommend going to fullscreen mode to properly use the webplayer. I corrected the issue with the page, sorry about that!
     
  7. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hey guys, just wanted to post an update image of the pack, working on a video to show some of the new features I added to the pack! Working on a new demo scene as well!
    UpcomingUpdate1.PNG
     
  8. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Here a video on the first update to the pack since release!

     
  9. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hey guys, just showing some more of the updates for the pack. In this image, Gizmos are displayed as you can see where the building is being constructed near the resources GUI. Also, there is now a progress GUI over the buildings as they are being constructed.

    BoomSnapshot1.PNG
     
  10. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hey guys, just here with another update image to the Demo Scene, I have added in ranged units and have been working on a few other updates to pack! The main update here is just the ranged unit system now works, sorry about any issues from before!

    ArcherShot.PNG
     
  11. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hey guys, just wanted to let you know that update 1.4 is out now! Updates include :

    Drop Off Points
    Building Progression Indicator
    Ranged Combat
    Production Descriptions
    New Demo Scene

    Improved A*
    Improved Health GUI
    Improved Building Placement
    Various Optimization
     
  12. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    There is a new demo to show off the current version of the pack, check it out here!
    Webplayer
    It is still under development, so expect many more features to be added!
     
  13. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hey all! Just wanted to let you know I have been working on a tutorial series for the script pack, there are currently 6 videos posted and I will have more soon!

    Tutorial Series

    And here is the first video :

     
  14. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    This looks really cool!

    Will buy soon ;)

    Will you be updating to the new ui system?
     
  15. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Thanks for the interest!

    I would like to, I haven't had the chance to look into the UI system in depth yet, but it is in the plans for the future.

    For now, some of my more prioritized updates are Unit Avoidance and improved Unit Combat. Also working on any bug fixes for the Editor.
     
  16. Gatto_matto

    Gatto_matto

    Joined:
    Feb 15, 2011
    Posts:
    60
    Awesome asset! I bought it. I'm really excited! :D

    Units, factions, buildings, everything you need for a RTS.

    Anyway I will post criticism and questions ;) Maybe I've got silly problems because I'm really a bad programmer. By the way, sorry for bad english...

    • How much is it difficult to make an enemy AI?

    • Units slide along steep terrain. You can also see them in your demo. I know it's a Unity problem and not strictly belonging to SRTS. I solved it using the "slope" limit...

    • My terrain has high mountains. I put the camera at the correct distance from the planes, but when I move it horizzontally, the terrain it's higher then the camera position... Can you make an option to move automatically the camera at the same distance from for the point you are looking at?

    • I'd really like to have formation movement!

    Thank you very much!
     
    Last edited: Jan 2, 2015
  17. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Hi MadBlade2, thanks for the kind remarks! I am really happy you are enjoying using the pack so far!

    Hmm, that really depends on what all you want the AI to do. Many games just have the AI spawn units at various times and progressively get stronger, but if you want a full player style simulation it can get much more complicated. I didn't include AI in the pack simply because it really depend what the user wants to do with their AI. It is possible that a future I will include some code for this, but I would look into RTS AI in the meantime if I were you.

    Yeah, my fun little sliding units. That is due to the Rigidbody script attached to them, in the next iteration I may remove that entirely and have as little physics computations as possible, I haven't quite decided. I worked around it using the slope limit as well actually!

    I can, it is actually very simple code so I can help you out right now! Here are snippets of the code you can add to the CamMovement.cs script to give you that functionality :

    Code (CSharp):
    1. //Place these variables at the bottom of the existing variable list
    2. public float dispAmount = 10;
    3. public LayerMask dispLayer;
    4.  
    5. ----------------------------------------------------------------------------------------
    6.  
    7. RaycastHit hit;
    8. Physics.Raycast(transform.position, Vector3.down, out hit, 10000, dispLayer);
    9. if(hit.collider){
    10.       transform.position = new Vector3(transform.position.x, hit.point.y+dispAmount, hit.point.z);
    11. }
    12. // The below code is already under the Update function, simply paste the above code there and it will be complete        
    13. transform.Translate(moveSpeedCur.x*Time.deltaTime, 0, moveSpeedCur.y*Time.deltaTime);
    I would too actually, I would like to add that in the next version as well, but I am not 100% on implementing that while having it optimized yet. If I figure it out though, I will post a video with the update! Again, thanks for the kind comments!
     
  18. Gatto_matto

    Gatto_matto

    Joined:
    Feb 15, 2011
    Posts:
    60
    Hi Rei

    Thank you for your reply

    My question about enemy AI sounds a bit silly! :D I was thinking about what you wrote about combat, ranged combat, building production, etc. I mean there are some things units and buildings do automatically (for example gatherers go automatically to the silos), so it may be easier to make a simple AI also for non-programmer like me.

    Thank you for the code snippet: it works pretty fine. The problem is that it's better to calculate a distance from the point you ar looking AT, not the point below the camera, that can be higher or lower then the portion of the terrain you see... Anyway, I don't want you to write code for me. I still didn't explore all your assets, so I could ask more terrible things! ;)

    For instance there's another funny problem when buildings produce units: if they are created at the same point of another unit, they jump up in the sky, they go outside the screen and after a while they fall down... ;)

    Now a serious question. Can you explain the benefits of Ugrid movement? What I mean is that it works fine with straight directions or 45 degrees movement. In any case units avoid obstacles correctly. But when you click at a point which is 20-30 degrees, unit doesn't go exactly in that direction. He follow the grid straight and then turn 45 degrees. As shown in the picture below, he follow the red line. I know, I'm a pain in the... But I like realism and simulations. I guess for some technical reasons he can't go there directly. Remember I'm ignorant in coding. So I make weird hypotesis... Is it possible to follow the blue line instead?

    Thank you again

    path01.jpg
     
  19. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    Could the camera not raycast the ground and always stay at a variable distance above it? So if you move over a mountain, the camera will cast it and move up to that distance variable?

    if(groundCast == cameraHieght)
    stay
    if(groudCast < cameraHieght)
    move
    if(groundCast > cameraHieght)
    move

    I've never played with raycasting and the camera together... so I have no idea if it could work.
     
  20. AlanGreyjoy

    AlanGreyjoy

    Joined:
    Jul 25, 2014
    Posts:
    192
    lol... Clearly I did not read above me xD
     
  21. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Sorry for the late reply!

    I can work on it, although I don't think that would be coming out in the next version release to be honest. Probably the one after that though. I can't really give you an exact time frame on that though.

    I will include an option on the Camera Movement with the feature that you mention in the next release! I hadn't thought of it before but you are completely correct, so thank you for the suggestion!


    Oh, the flying units, since I instantiate the object at the same location as another unit their rigidbody collides and causes one to jump. I have a solution for this in the works, but it won't be out until the next release.

    It is possible, although if I remember correctly it would cut down on some optimization that was made there. Since RTS can have hundreds of units, and since pathing is a pretty major issue in RTS games performance wise, I chose to cut some corners so to speak for the sake of performance.
     
  22. Gatto_matto

    Gatto_matto

    Joined:
    Feb 15, 2011
    Posts:
    60
    Well, I got used to 45 degrees movement, now ;)

    But i have another problem... I was learning the fog of war system. Generally speaking it works well. But sometimes an error appears:

    Array index is out of range.
    VisionReceiver.SetRenederer (Int32 state)
    Fog.cs (at line): 62, 138, 101

    I don't know if i use to many objects. Sounds weird. Cause i have around 50

    Some objects are rendered anyway. But some objects are not.

    Thank you for your support.
     
  23. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    I see, I am having trouble recreating the error, but it shouldn't be too many objects. I added some code below that may resolve it, could you try replacing what is at the bottom of the UpdateFog function with these lines, in the same place as the comment.

    Code (CSharp):
    1. // And we set the hidden objects
    2. for(int x = 0; x < hideAmount; x++){
    3.     if(hiddenAgent[x] != null){
    4.         hiddenRend[x].SetRenderer(hideSetting[x]);
    5.     }
    6. }
     
  24. Gatto_matto

    Gatto_matto

    Joined:
    Feb 15, 2011
    Posts:
    60
    Thank you for your reply.

    The error still appear in the console (only at line 62) but the rendering does work.
     
  25. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Cool any already fighting unit ready
     
  26. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    There are some fighting units ready, however I am working on a major performance update for them at the moment to improve some of the flaws in their current targeting system. That should be available in the next update, although I don't have a date for that yet.
     
  27. SLThompson

    SLThompson

    Joined:
    Feb 7, 2014
    Posts:
    49
    I was looking for a complete rts project and I found this one but I've noticed it's actually not finished, still a work in progress, when are you going to be finished adding everything; ai, attack units, 2nd player and so on?
     
  28. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Good timing, I was just getting on to make an update after a brief hiatus!

    I don't have an exact time frame for that since there are so many things that go into RTS games. At the moment, each update has been adding major features to improve the pack. This pack as a whole is meant to help streamline some of the more difficult parts of making an RTS game, such as A* Movement, the Fog of War system, and so on while providing each of these as optimized as I could make them. The next update is going to be corrections to the targeting system, formation movement, and general bug fixes.

    Anyway, as for the update, the below image is the system that will allow me to update the targeting system and bring in formation movement. Basically, it just indexes objects on the map into areas and tells them if other units or objects are within a certain distance to care about. The unit with a green sphere is the main unit while the ones with the red spheres are units he should care about. The one with no sphere is ignored as it is outside his check range.

    Update.PNG
     
  29. Gatto_matto

    Gatto_matto

    Joined:
    Feb 15, 2011
    Posts:
    60
    I love formations :)
     
  30. JessieK

    JessieK

    Joined:
    Feb 4, 2014
    Posts:
    148
    Hey do you plan on supporting online play with this kit? (with something like a basic lobby where players can select there faction and then just start) I think that would make this kit perfect
     
  31. wiseman_2

    wiseman_2

    Joined:
    Dec 11, 2013
    Posts:
    66
    I picked up this asset the other day and started trying to put it into my current project.

    Most of it seems to be ok, however I have a very large terrain... about 400 sq km. Your ugrid system can't handle anything near that size.... don't feel bad though cause unity's build in navmesh system can't either.
    What I wan to know is if you can give a quick list of scripts in your project that rely on it and where they might need to be modified to integrate with what I'm working on. Is path finding all done in one script that is referred to from each script, or is it a little bit everywhere?
     
  32. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Sorry for the late responses all, been a bit hectic here.

    I would like to, probably at some point in the future!

    That is rather large, an idea could just be dividing the map into sections and using many graphs. I don't have built in support for this, but the concept shouldn't be too difficult to implement. The pathfinding is done in the APath class found in the ClassList script, the calls for that come through the AStarManager which sets them to different threads.

    Technically the minimap would support this completely, but I can't say I advise it if you are putting more than a few thousand objects with a minimap indicator on screen.

    The fog of war would also need to be fragmented or just left at a large node size. With how the fog system works I am not quite sure how that would work though.
     
  33. wiseman_2

    wiseman_2

    Joined:
    Dec 11, 2013
    Posts:
    66
    thanks for the reply... I've noticed another issue. Some times I work away from home on my laptop...it only has a 15in screen. When I go into the faction editor, and I have it full screen, I can't add any object to the buildings or units, because I can't resize the layout at all... both of those first 2 columns are set and don't allow me to change them so that I can so anything with that screen...
    I'm looking through your code now to see if I can find where this is laid out.
    thought you might want to know since this may impact more of your users.
     
  34. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    Hi there,
    thank you for putting up this asset and working on it.
    Do you know how many units your asset can support?
     
  35. Xtan911

    Xtan911

    Joined:
    Mar 6, 2015
    Posts:
    1
    Is it compatiable with unity 5 or are you going to make it compatible?
     
  36. MAeStROx

    MAeStROx

    Joined:
    Mar 20, 2015
    Posts:
    15
    When do you plan on adding the multiplayer API support?
     
  37. Shinugami

    Shinugami

    Joined:
    Oct 17, 2012
    Posts:
    54
    Seems to work in Unity 5 however there are a few fixes that need to be made:
    For example:
    • "SetTriangleStrip" needs to be replaced with "SetTriangles" in 4 instances of the "MeshCombineUtility.cs" file.

    Except for that there are no errors and it works fine.
     
    Last edited: Apr 5, 2015
    IvanAF likes this.
  38. Alienmadness

    Alienmadness

    Joined:
    Sep 6, 2012
    Posts:
    109
    no response from the developer for 2 months? no comments on unity 5?

    I've even emailed the developer without response. seems responsiveness and support is limited?

    Which is too bad, this package looks good, but am looking to buy something that is supportable and has ongoing development.
     
  39. scottfreemedia

    scottfreemedia

    Joined:
    Jan 12, 2014
    Posts:
    10
    Hey ReiBM, this is really good work. I'm working on an RTS shell/pack myself and now that I've seen this I'm kind of wondering if some of this functionality could be combined with other systems. Do you have anything you could say as to whether or not there would be certain requirements for this to link with other built out systems?

    I'm not sure about the level of dependency its different parts have on each other. I'm particularly interested in the pathfinding/fog of war portions.
     
  40. kittik

    kittik

    Joined:
    Mar 6, 2015
    Posts:
    565
    I fully intend on buying this asset, I am making a RTS presently and would love to read the code to understand what I need to do for myself.

    Do you have anything set up for random map generation? I have seen most of the tutorials on Youtube and did see the random prefab (tree) placement, but a way to totally generate a map seed randomly would be awesome.
     
  41. MadMapp

    MadMapp

    Joined:
    Nov 15, 2012
    Posts:
    49
    is this being updated?? dev given up on it??
     
  42. vixus

    vixus

    Joined:
    Apr 8, 2013
    Posts:
    6
    @ReiBM
    Iw tryed your webplayer test and units just got stuck if you get them too close to the ledge/slope or if you click on the cliff somwhere where unit cant reach. it just gets stuck and later it wont move at all... :(
     
  43. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    I just wanted to make an update here (the first update in quite a while)
    Since it has been around a year since I first uploaded the pack I have decided to drop the price to be a bit more reasonable. So the new price of the pack is now : Free
    I will be commenting out the pack a bit more just for use on my portfolio, so the only thing I ask is that if anyone has better ways of writing certain pieces of the code that you share those with me through private message/in this thread.
    Hope you all enjoy using the pack! Thanks for all the support guys!
     
  44. BritishGuy

    BritishGuy

    Joined:
    Oct 2, 2013
    Posts:
    5
    Brilliant news, Thanks!

    I seem to be having a problem with the demo scene, After trying out your web-player the units or "workers" seem to move up and down slopes just fine, But when i try it in the editor using the demo scene the units try to walk up a slope, get halfway up it then slide back down, Any ideas why that's happening? Could it maybe be something to do with the terrain having a missing script? Thanks.
     
  45. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    It shouldn't be anything to do with the missing script on the terrain, I believe it has to do with the actual physics of the units that I wrote. Now this pack isn't really supported anymore, but since I am going through one more time to comment it out I can take a look at that and see if I can find a hotfix for it.
     
  46. BritishGuy

    BritishGuy

    Joined:
    Oct 2, 2013
    Posts:
    5
    Cheers for the reply, The temp solution i used was to just set the Rigid body's drag to 5 on each unit, They can get up hills now, though they will slowly slide down if you position them to hold position on a slope.

    Also The workers collect the resources then drop off at a silo, But the total resources do not increase, i think i found the problem inside ClassList.cs on line 251...
    behavior[sourceIndex].carrying = 0;

    It was setting the workers "carrying" to 0 before first adding them to the resourceTypes.
    Since my workers were only carrying 15 at a time i just set it to..
    behavior[sourceIndex].carrying = 15;
    for a temp fix
     
  47. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Since @ReiBM isn't interested in supporting this asset any longer, I've been toying with the idea of producing something along these lines. How much interest would there be in a new RTS pack? And what would you see as the key features it would need to have to be worth paying for?
     
  48. BritishGuy

    BritishGuy

    Joined:
    Oct 2, 2013
    Posts:
    5
    To be honest JoeStrout, Now that this asset is free i don't honestly think anyone would buy another, SRTS has everything needed to get started, The only thing it doesn't have is AI construction, I think if you were to make a RTS smart AI standalone that could be implemented into any RTS project, You would get quite a few sales.
     
  49. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    @BritishGuy, thanks for your input, that's very helpful.
     
  50. ReiBM

    ReiBM

    Joined:
    Jul 15, 2013
    Posts:
    93
    Ah much appreciated! I actually remember that issue (regarding resource carrying) now, I believe I had it sorted out in a later version that never saw release so I will fix the issue and reupload when the comments are done! Thanks for that!

    There are quite a few areas of the pack I think I could have done better in retrospect. The pack itself was written in my Sophomore year of college so there are a few things I have learned since then to improve portions of the pack. I would be happy to see another RTS pack available on the store :D
     
    BritishGuy and JoeStrout like this.