Search Unity

[Multiplayer RTS] Agile Heroes

Discussion in 'Works In Progress - Archive' started by smilefr, Feb 18, 2012.

  1. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Hi fellow unity developers!

    Today i would like to show you my latest project witch also is my first serious project made with unity3d (i used to be a flash developer but then i took a unity in the face :D):

    Agile Heroes, is a Multiplayer RTS project, with a warcraft/dota like gameplay.

    Here is a small screenshot of the project:



    For this early alpha version, you can create games, chat (in game and in the lobby), control units, select a group of units.

    I will try to keep the thread updated and post a link when the game is playable.

    If you have any questions, suggestions etc... please do no hesitate!
     
    Last edited: Feb 18, 2012
  2. beck

    beck

    Joined:
    Nov 23, 2010
    Posts:
    294
    Looks very nice! Your interface looks well executed. Looking forward to seeing your progress. It would be very cool to have a toolset similar to the WC3 World Editor inside Unity!
     
  3. StormGamer

    StormGamer

    Joined:
    Oct 26, 2011
    Posts:
    283
    looking really good!, exited to see the playable version
     
  4. markusb

    markusb

    Joined:
    Mar 20, 2010
    Posts:
    157
    how did you do the healthbar? I did something similar, but the thing with my healthbar is that the length of the bar is the same, whether it si close to the camera or far away. I could handle this by calculating the distance to the camera and adjust the length but maybe you got a better solution?
    http://dl.dropbox.com/u/20284799/working/WebPlayer.html
     
  5. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    First of all i would like to thank you all for your support!

    @MarkusB: The health bars do not change their length when the camera zooms in or out, the lenght is just different for the base and the minions.
    Actually its not really a problem, but if you really wanted to do it, i suppose could do it the way you said, by making the bar's lengh relative to the distance between the GameObject and the Camera.

    An other way to do this would be to add a GameObject for the bar itself, and make it look at the camera, but i doubt this is the best solution.
     
    Last edited: Feb 19, 2012
  6. markusb

    markusb

    Joined:
    Mar 20, 2010
    Posts:
    157
    thank you for your advice :)
    My healthbar is a gameobject with a guitexture and yours?
     
  7. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Its a C# script that uses Camera.WorldToScreenPoint to get the position of the GameObject in the 2D screen. Then i simply draw the bar using the GUI.DrawTexture method.
     
  8. Obatztrara

    Obatztrara

    Joined:
    Feb 3, 2012
    Posts:
    82
    That looks really good!

    I'm mostly interested in how you are doing the multiplayer part: Do you use Unity's networking or some other? How do you synchronize unit positons/health etc among players?

    I'll follow this closely. I'm working on a RTS myself, with multiplayer as well. Haven't started a thread about it yet, though.. :D
     
  9. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    I am really happy to see that you find the project interesting!

    For the multiplayer part, i develop the server side in java, with the help of SmartfoxServer's API.

    For the synchronization of units position, these are sent as paths (arrays of points), calculated by the client's pathfinder for the units controlled by the player, and calculated by the server for the units controlled by the server. Of course the paths are checked to avoid any abuse. Also i use a homemade pathfinder.

    If you have any other questions, do not hesitate.
     
  10. Obatztrara

    Obatztrara

    Joined:
    Feb 3, 2012
    Posts:
    82
    So you are using a more or less authorative server that sends unit positions etc to all players?
     
  11. markusb

    markusb

    Joined:
    Mar 20, 2010
    Posts:
    157
    Ah my healthbar is nearly the same as yours, except that I use guitexture. I will test guidraw and try to fix my "problem".
    As you can see at my webplayer I am trying to create a RTS myself, but it is more like a training, to get to know unity, nothing really serious.
    @Obatztara
    I had some multyplayer attempts as well but the unity buit-in seams not that good. At least for me the NAT-punchtrough didn't worked. Right now I think for me is the best way to manage the single player part in a way that I later on just have to add the newtworkview and change very little things.
     
  12. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    @MarkusB - Did you create that little web player or was it tutorial based? I'm trying to set the same thing up and was just wondering if I could find some help.
     
  13. markusb

    markusb

    Joined:
    Mar 20, 2010
    Posts:
    157
    The most of it was my own work, the healthbar for example is from a tutorial. If you need something just ask :)
    I can give you some code or tell you which tutorial I used for some parts.
     
  14. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    @Obatztrara: Yes the server is sending everything to the clients, i know it is an expensive way of doing things, but i plan to setup a system that will allow players to host their own games.

    Here is a small preview of the new features:


    As you can see, minions can now attack enemies (ranged and melee attacks working fine.).
    The system now handles the death of units.
     
  15. MEV

    MEV

    Joined:
    Feb 4, 2012
    Posts:
    63
    Very nice, reminds me of Warcraft 3
    :)
     
  16. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Hi everyone!

    Here are the latest news:

    The minimap is now avaliable.
    I finished the animations for a new Character that will be our first hero!

    Since i have now access to my desktop computer here is a more detailed screenshot (with detailed textures, feelsgoodman.jpg)



    And an other screenshot with 100 minions!



    I hope you will enjoy these screen as much as i enjoyed making the game!
     
    Last edited: Feb 20, 2012
  17. Obatztrara

    Obatztrara

    Joined:
    Feb 3, 2012
    Posts:
    82
    Wow, you're quite fast! :D

    Minimap looks great! What kind of functionality does it have? Can you jump to places on the map? Hover around when holding mouse on the map?
     
  18. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Thank you :)

    You can move the camera by clicking on the minimap, and view units details by moving the mouse over the small icon (the way they do it in league of legends if you are a player).
     
    Last edited: Feb 20, 2012
  19. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    The project is starting to look like an RTS now =)

    the new features:

    - When selecting a unit, you can now see its detailed stats (dmg, armor etc...).
    - Heroes can now gain experience when they kill enemies, and level up.

    Here is a small screenshot to illustrate the new features:

     
  20. Obatztrara

    Obatztrara

    Joined:
    Feb 3, 2012
    Posts:
    82
    I demand a video or the webplayer! :D

    Kidding, just craving some moving images... ;)
     
  21. prophet

    prophet

    Joined:
    Sep 8, 2009
    Posts:
    211
    Very nice work and progression. I considered a RTS for my first project, but after some research I realized I should start smaller lol.

    Do you recommend any tutorials for learning RTS style games?
     
  22. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Hey!

    I will upload a video soon.

    I cannot recommend a good tutorial since i learned most of the things i know from google.

    I did use the examples provided by smartfox for the multiplayer part.
     
  23. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Time for some news!

    Units may now have spells, that are displayed in the interface. I will upload a video when the first spell is completed.

     
  24. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Here is a new video of the project, sorry for the lag, it was taken with my laptop, the game was running smoothly though. I will upload a better video soon.

     
  25. Obatztrara

    Obatztrara

    Joined:
    Feb 3, 2012
    Posts:
    82
    Very cool!

    I couldn't quite tell from the video: Are you using your own pathfinding system? Also, does the multiplayer work?

    The ingame UI looks really good, does it adapt to different screen resolutions?
     
  26. markusb

    markusb

    Joined:
    Mar 20, 2010
    Posts:
    157
    this is really good work. And you did this all alone?
     
  27. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    @Obatztrara: I made the pathfinding myself, actually, this is not my first RTS project, i used to develop multiplayer flash games, and most of the server-side programming and the UI graphics come from my previous projects.
    The video you saw is using the multiplayer server. Its not public yet, you will be informed for the first alpha test.
    The UI does adapt to any screen resolution bigger than 800x600.

    @MarkusB: I did all of this alone indeed, i am very lucky to be able to do the graphics myself, finding a skilled graphist is really hard.
     
    Last edited: Feb 23, 2012
  28. AdamWaters

    AdamWaters

    Joined:
    Aug 30, 2011
    Posts:
    94
    When did you start working on this?

    I'm incredibly jealous of all the progress you've made. In 4 months I'm in about the same place with my rts minus all the multiplayer. Kudos!
     
  29. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    I started the project in the end of december, so it took me 2 months and a few days.
    This is going fast for the moment, its the funniest part of the project, building the core system etc... Soon i will have to add models and artworks in mass, also there will certainly be a huge load of bugs to fix until it is stable =) this could take 4 more months, unless i find a good graphist to join me.
     
    Last edited: Feb 24, 2012
  30. smilefr

    smilefr

    Joined:
    Dec 4, 2010
    Posts:
    108
    Hey! The game has changed a bit, i decided to stick with the Dota like concept.

    A new video is avaliable!

     
  31. tasadar

    tasadar

    Joined:
    Nov 23, 2010
    Posts:
    290
    seems nice, keep it up.