Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Fury Framework - RPG/RTS Creator

Discussion in 'Assets and Asset Store' started by andorov, Dec 23, 2011.

  1. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    This is great. I'll download right away and test it out. Thank you for doing this. I'm through tutorial 7, and really appreciating the time and care you've taken in making this engine. I'll be back with more comments when I've taken the "indie" eval version through it's paces. :)
     
  2. vdharshan

    vdharshan

    Joined:
    Jan 6, 2012
    Posts:
    34
    That's great. Thanks for the updates! but what about the avoidance system for third party path-finding ? is that included in the updated file or are you still working on that ?
     
  3. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    Its included, I updated the AStarNavAgent to have the avoidance built-in. Its not perfect, but should be acceptable for most use cases. You should be able to modify it as well.

    Please note that some third party solutions provide their own avoidance system (such as SimplePath and A* Pathfinding Project Pro), and you're perfectly okay to use those as well.
     
  4. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    I'll do a couple of videos on level-able characters and abilities this weekend (hopefully).
     
  5. vdharshan

    vdharshan

    Joined:
    Jan 6, 2012
    Posts:
    34
    Thanks, That is enough!! I just wanted something to get started.. oh.. I didn't know that we can use the Simple Path / A* Pathfinding Project's avoidance !

    btw... I'm using the Pro version, you have updated that too.. right

    have a nice day
     
  6. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    The Pro version has always had avoidance, courtesy of Unity's pathfinding system.
     
  7. vdharshan

    vdharshan

    Joined:
    Jan 6, 2012
    Posts:
    34
    Sorry. I meant the Fury's Pro version.. with Unity Basic indie version..

    also.. can you please give me a suggestion ? do you think its better to use Unity Pro version than all those struggles ?
     
  8. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    Fury doesn't have a "Pro" version; it has an evaluation kit and the full version (bought from the asset store or compiled from the source).

    1) Download "Fury Evaluation Kit for Unity Indie" (since you are using Unity Indie)
    2) Replace Fury.dll in the evaluation kit with the Fury.dll you bought from the Asset Store.
    3) Profit!!!

    Similarly, if your project is already set up, copy the new AStarNavAgent.cs from the "Fury Evaluation Kit for Unity Indie" into your project.
     
  9. vdharshan

    vdharshan

    Joined:
    Jan 6, 2012
    Posts:
    34
    Thanks.. Oops. Yes. I meant the "Full version bought from the asset store"

    Thanks for your help.
     
  10. Mudflap

    Mudflap

    Joined:
    Apr 2, 2012
    Posts:
    5
    A couple of things I've found as I go through the tutorials;

    1) In tutorial 5, when you create the discharge effect for the damage over time status, why do you create an EffectPrefab object? Can't you just use the Effect member? Am I missing something?

    2) On a mac, your trigger creator doesn't wok as expected. It creates a file like "Assets\Triggers\TriggerName.cs" instead of making TriggerName.cs in the Assets\Trigger directory. Manually concatenating a string? I think that using Path.Combine takes care of platform issues. Just a guess.

    Overall, like the framework. Definitely thinking about buying the full package as soon as I'm done with the tutorials.
     
  11. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    If you use the EffectPrefab field, and then make changes to it (ie, destroy it), it will no longer be in its initial state for the next time the unit wants to cast the ability.

    This is probably a bug; I'll take a look at it.

    Thanks :)
     
  12. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    As I've been working through the tutorials, there are a couple of things that I feel I could use and I was wondering if you have any plans on adding them:

    Sound handling - i.e. when an attack is made, spell is cast, person is hurt have a sound play. Is this something you plan on adding, or is it something you feel should remain separate?

    Random Item generation - The game I am making will have several hundred items, in fact I would like some of the items to be generated randomly (think Diablo 3 or Torchlight), I am not entirely sure how I would use your system to create a random weapon, or item. Even if I could generate a file with several items before hand and have them added in on startup that could work. Any thoughts on how that might work?

    Needless to say, what you have here is a great framework, and I am starting to get the hang of using it. Thanks!
     
  13. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    This really simple to do in the current set up, though it may not be clear. In your weapon asset, declare an AudioClip object, like..

    AudioClip MyEffectSound;

    Then, in the editor, drag in your sound. Lastly, use UnityEngine.AudioSource.PlayClipAtPoint to play your sound whenever you need it.

    This is also fairly easy. You can totally automate the asset creation process by writing an editor script that generates a bunch of Fury.Database.Weapon (or token, or ability.. etc), use appropriate randomizing functions and save them using the AssetPipeline.

    Thanks! It can be complicated at first sight, but once you get used to it a bit, it can be really rewarding :)
     
  14. Zhosay

    Zhosay

    Joined:
    Dec 12, 2011
    Posts:
    98
    Just gave you a review in the asset store. Thanks for the good support.

    Looking forward to the new tutorials.
     
  15. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    Thanks for the review!

    Unfortunately, I did not have time to finish up the tutorials over the weekend. I'm going to try completing them throughout the week.
     
  16. sticorp

    sticorp

    Joined:
    Jun 27, 2010
    Posts:
    1
    Hello!

    Nice job with the framework!
    Is this framework suitable for a tower defense game? If I use this framework, will be any easier to do a TD game?

    Thanks
     
  17. Mudflap

    Mudflap

    Joined:
    Apr 2, 2012
    Posts:
    5
    What's the best way to tell a unit to regenerate its path? In a tower defense game, for instance, I want the unit to re-calc its path if something was placed in its way.

    I was planning on adding an UpdatePath function to Unit that would check it's movement controller's target and just re-Order the unit to the current target.
     
  18. MrBlackSwarm

    MrBlackSwarm

    Joined:
    Apr 13, 2012
    Posts:
    36
    Eh. That's grate framework, but i have a error, when i'm after setting hud. When I launch my level, i select unit (Warrior) and click right mouse button, to move character, but with no effect. And I'm getting error:


    and.

    and..

    Please, help! ;/:(
     
  19. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    What pathfinding system are you using? If you are using built-in (UnityPro), you shouldn't even have this problem. If you are using something else, I would suggest you add an UpdatePath method to the AStarNavMeshAgent class, and then call it for all clients and servers.

    I take it you are using UnityProEval. For some reason, it seems like you've deleted the default nav mesh that was included in the tutorial files. No worries, just rebuild it using Window -> Navigation -> Build.
     
  20. MrBlackSwarm

    MrBlackSwarm

    Joined:
    Apr 13, 2012
    Posts:
    36
    "Navigation" is not available, it's grey.. I try to select object.. but it's stiil grey.
     
  21. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    You're using Unity Indie, but downloaded the Unity Pro evaluation. Please download the correct evaluation kit.
     
    Last edited: Apr 13, 2012
  22. Zhosay

    Zhosay

    Joined:
    Dec 12, 2011
    Posts:
    98
    Any news on the new tutorial vids?
     
  23. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    Question on Saving Units:

    So I want to make my own Class which extends Fury.Database.Unit, and add things like Dex, Int, Str, etc. I want to make abilities have a toHit chance, damage base, spell failure rate, etc. based on these factors. I also will have things like level, hp, mp. I want to be able to save all these things to a file so the user can load them later.

    How do you suggest using Serialization to save/load Units? It doesn't look as if Unit is serializable (at least it doesn't implement the ISerializable interface). Is there a better way to save using the Fury framework?
     
  24. MrBlackSwarm

    MrBlackSwarm

    Joined:
    Apr 13, 2012
    Posts:
    36
    I downloaded that pack, and nothing. The same error, Navigation is gray ;x. I downloaded indie, and 3.5
     
  25. Zhosay

    Zhosay

    Joined:
    Dec 12, 2011
    Posts:
    98
    Code (csharp):
    1. Can't send RPC function because the target is not connected to the server.
    2. UnityEngine.NetworkView:RPC(String, NetworkPlayer, Object[])
    3. Fury.Behaviors.Manager:Handshake(NetworkViewID, Byte[], NetworkMessageInfo)
    4.  
    I get this error when I join a Lobby even a non touched tutorial version from the Fury Frameworks prints this error. Googling it told me its when the Server trys to send a RPC to himself. Anybody has the same problem?
     
  26. choarrim

    choarrim

    Joined:
    Apr 16, 2012
    Posts:
    3
    I have the same issue, I try and create the tutorial map myself following the videos (the indie version of fury, what differs from the indie version and the paid version?) and when I am at video 2 and try and attach a 2nd player to an enemy I first get a fault that I must have a commander 2, if I then go into the map defenition and adds a CPU player 2 and makes it required I get the same error as ZHosay...
     
  27. choarrim

    choarrim

    Joined:
    Apr 16, 2012
    Posts:
    3
    ok Somehow I got rid of that error but now, all objects in the scene is green for me now? I try and follow the vids and set the other object as an enemy (player 2 - computer locked teams) but I still can select it...
     
  28. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    Perhaps I am missing something obvious, but I want to programatically create a Fury.Database.Status. I have extended status to create my own class called bonus. How do I set the read only properties (name, effect, etc.)?
     
  29. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    First of all, sorry for the late response guys. I've been pretty busy with other things as of recently.

    Unfortunately, I haven't been able to put a lot of ideas to paper (or, in this case, video). I have planned out a decent system; its a matter of implementing / recording it as a tutorial.

    This is a complicated question; I'd like some clarification. Are you trying to create a custom unit TYPE or trying to save the state of multiple units on a map; ie a "save game."

    You are using Unity Indie. Built in navigation is NOT available in Unity Indie, and therefor, "Navigation" is greyed out. You can still use the Fury Framework in Indie by following steps in Tutorial X and utilizing the proper evaluation package.

    Hmm. It looks like I didn't expose those properties in a publically accessible way. I wasn't thinking about progmatically generated definitions! Currently, you can utilize Reflection to access the hidden fields. They are all named with a "_" in front of it. So, Effect's backing field is _Effect. If you are uncomfortable with utilizing reflection, I've added this issue to be rectified in a future release. Furthermore, I don't know if you've already purchased, but you could simply edit the fury source (if it is available to you) to make the backing fields public.

    Additionally, to the folks that are having issues with server not being able to send RPCs. What platform are you on? Can you send me a reproduction case?
     
  30. Zhosay

    Zhosay

    Joined:
    Dec 12, 2011
    Posts:
    98
    I am on a windows machine the server is in Unity Editor the Client on the same machine Webplayer or standalone. For the test I used a fresh fury install only changed the build settings to Play in background.

    I create a new lobby on the server and as soon as I join with the client.

    Can't send RPC function because the target is not connected to the server.
    UnityEngine.NetworkView:RPC(String, NetworkPlayer, Object[])
    Fury.Behaviors.Manager:Handshake(NetworkViewID, Byte[], NetworkMessageInfo)

    I have the problem in my main project too but it don't seem to be that big of a deal as my own Rpcs work. And guess your RPCS after the handshake too else the game wouldn't run.
     
    Last edited: Apr 24, 2012
  31. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    Great to have you back! :)

    To answer the first question, I am trying to save a game. So I would like to save the various classes that I have that extend Fury.Database.Unit for example (or the ones I will have that extend definition).

    2nd - I guess I am not sure how to actually generate a new definition. I can't do a new() call on the items. So maybe I could use an example on how I might do it if you have the time.
     
    Last edited: Apr 24, 2012
  32. Luke-Houlihan

    Luke-Houlihan

    Joined:
    Jun 26, 2007
    Posts:
    303
    Hey there andorov, I love the framework!

    What do you think would be the best way to implement an attack-move, where units move to a specified position attacking anything on the way, then continuing on. I think I have some ideas how to do it, but I just wanted to know what your thoughts were.

    Thanks!
     
  33. Luke-Houlihan

    Luke-Houlihan

    Joined:
    Jun 26, 2007
    Posts:
    303
    Nvm the above, figured it out.

    Now im stuck trying to assign correct commanders, I have units that instantiate other units, and I would like them to have the same commander (one, two, ect) as the unit that created them, but im unable to figure out the right code to access that.

    I'll give you a little more information about what im trying to do. Im currently designing the building system for an RTS, all of the buildings are modified versions of the Unit class (for health and stuff) that cannot move. Im using a timer to automatically create units after a delay, and these units must have the same commander as the building that produced them.
     
  34. gdavid

    gdavid

    Joined:
    Apr 8, 2012
    Posts:
    6
    I have Unity Indie
    I purchased Fury
    I am using the free version of A* PathFinder

    I create a grid and have the block on my plane. Press Scan and the path regenerates correctly. I followed the tutorial and created my character but he will not move.
    In the console i have the error
    "Failed to create agent because there is no valid NavMesh."
    I must be missing something that is staring me in the face.

    After more tests: I can get it to work if I load the FuryIndieEval.unitypackage and attach NavMeshAgentSettings.cs to the Manager.
    But since I purchased Fury I started with a clean project and installed Fury from the Asset store and downloaded the free version of A*. Now in this project NavMeshAgentSettings.cs does not exist. I tried just copying if from the Eval version but it cannot find the namespace AStarNavAgent.
     
    Last edited: May 2, 2012
  35. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    Override the OnEndCast method on the ability, and do something like..
    Code (csharp):
    1.         Fury.Behaviors.Manager.Instance.CreateUnit(myUnitType,
    2.             caster.Owner,
    3.             myUnitPosition,
    4.             null);
     
  36. Spyk3z

    Spyk3z

    Joined:
    May 2, 2012
    Posts:
    1
    Thanks man, This is going to save me so many headaches. I was going to use UDK until I found this.
     
  37. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    In fresh projects, using Unity Indie, you should copy both the NavMeshAgentSettings and the AStarNavAgent.cs. Note that you will also have to copy over the entire AStarPathfindingProject folder as well!
     
  38. icgs

    icgs

    Joined:
    May 5, 2012
    Posts:
    1
    Hello,
    i Would like to integrate the framework with my own networking library, will that work with fury ?
    or anykind of unity3d games for that mather ...

    And also, i am kind of newbie to Unity, and would you give me some tips on Creating a new Terrain?
    I have already my terrain level and i would like to apply it to fury, how can i transform that Island on my own terrain ?
     
    Last edited: May 5, 2012
  39. gdavid

    gdavid

    Joined:
    Apr 8, 2012
    Posts:
    6
    First off must say this framework is awesome.

    3 Questions about adding sound.

    Question #1:
    This is how I implemented a sound when the dummy is destroyed. It works. I just want to make sure this is the best way to add a sound.
    In the DummyLogic.cs I add the var

    public AudioClip WoodSound;

    Then in the override of Ondead I add the line

    if(WoodSound != null)
    UnityEngine.AudioSource.PlayClipAtPoint (WoodSound,corpse.transform.position);

    Then in the Unity editor I populate Wood Sound with my audio clip.

    I added sound to the weapon in a similar way which works.

    Question #2
    How do I add sound for when a Unit is selected?

    Question #3
    How do I add sound for when a Unit Moves?

    Thanks!
     
    Last edited: May 5, 2012
  40. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    Andorov,

    Still interested in how I should stream a definition. I'd like to save/load a character that has certain abilities. Is this possible, or would you suggest just streaming a name or id and then reassigning the skill/ability to that character after a load? Basically, I think it comes down to how do I construct a definition of any type (say an ability) programatically?
     
  41. spazn

    spazn

    Joined:
    May 14, 2012
    Posts:
    3
    Is there a way to have an ability to cast on the current unit the player is auto-attacking instead of having to select the unit to target?
     
  42. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    Thanks! :)
    You will have to look into SimpleHUD for this. The SelectionController has an event called "OnUnitSelected." Hook onto that event and play the appropriate sound when a unit is selected!

    Do you mean when a unit is MOVING; ie: footsteps or do you mean an acknowledge voice, ie "on my way!." If the former, you will have to set up collision bodies on the feet of the unit and play footstep sounds every time they hit the terrain. If the latter, you can hook the OnOrderGiven event in Fury.Behaviors.Manager.Instance.
     
  43. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    You should give all the potential abilities to your character at design time; then modulate which ones are "active" using tokens. If you use a system like this, all you have to do is save the token ids to a file upon save, and then just restore them on load. Conversely, you can also use the TagController.Tag property and save the unit "state" in there. That way, you won't have to use tons of tokens. Be sure to keep the save state small (ie: use byte instead of int if possible, etc) so that syncing the state between players doesn't get a huge overload. It will be helpful to write some extension methods that convert your state to a friendly object on-the-fly.
     
  44. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    You can find out your unit's target by using Unit.Controllers.WeaponController.Target. You can modify SimpleHUD.cs so certain (or all, I suppose) abilities are auto-casted on the target instead of queued up.
     
  45. murteas

    murteas

    Joined:
    Feb 14, 2012
    Posts:
    62
    Thank you!
     
  46. spazn

    spazn

    Joined:
    May 14, 2012
    Posts:
    3
    Thanks Andorov. I figured it out.

    For those who are trying to achieve the same thing, I placed this code near the end of the LateUpdate() method in SimpleHUD.cs :

    Code (csharp):
    1. //Auto-Cast Ability on enemy currently attacking:
    2.         if(Hud.QueuedAbility != null)
    3.         {
    4.             var caster = Hud.QueueGetCaster(Hud.FocusPoint);
    5.            
    6.             if (caster != null  caster.Controllers.WeaponController.Target != null)
    7.             {
    8.                 //caster.Order(Hud.QueuedAbility, Hud.FocusTarget, Hud.FocusPoint);
    9.                 caster.Order (Hud.QueuedAbility, caster.Controllers.WeaponController.Target, caster.Controllers.WeaponController.Target.transform.position);
    10.                 Hud.QueueAbility(null, null);
    11.             }
    12.         }
    This makes all abilities auto-cast on the enemy the unit is currently attacking. If you only want to have certain abilities to work, I have not gotten that far yet. For the game I'm creating I may not have a use for it so I may never find the solution, so if someone else does please share for the rest.

    Thanks again. I'm getting a hang of this framework, but I'll be back with more questions I'm sure. :)

    PS: I have not purchased the Framework just yet..I need to make sure I can do what I need as I'm exploring my options before I spend my full time and money on this game project. I hope this framework is the answer I need to make my game idea come to life.
     
  47. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    The easiest way to do this is to derive from the Fury.Database.Ability class, and add a Boolean field, "IsAutocasted." Then, at runtime, just check if its an autocasted ability by doing something like
    Code (csharp):
    1. if (Hud.QueuedAbility is MyDerivedBaseAbilityType  (Hud.QueuedAbility as MyDerivedBaseAbilityType).IsAutocasted)
    2. // do autocast
    I wouldn't want you to waste your time or money either, thats why the trial version is there!
     
  48. beardedinlair

    beardedinlair

    Joined:
    May 3, 2012
    Posts:
    4
    i am having trouble with the first 2 tutorial videos...specifically the astar pathfinding. i installed fury and then the free version of astar, as recommended in the second tutorial, tutorial x.
    the fury tutorial scene works perfectly. the astar graph grid demo works perfectly. the 2 together only partially work.
    i did everything in tutorial x. the pathfinding works to a degree, in that the agent will avoid obstacles as determined by the red nodes, i.e. unwalkable. but if i right click a destination in an area of unwalkable, the agent will find a path there. even if it is off the map! i have the "unwalkable when no ground" tab set properly. also, if the destination target is on top of something, like a large cube, the agent will walk up the side of the cube to the target!
    is there something simple i'm missing? i've been fiddling with it for 3 days.
    EDIT update:
    in case anyone else finds this problem, the solution was to increase the width and depth to 1000 each and put the nodes at .1 and the ratio at 1.
     
    Last edited: May 19, 2012
  49. SolInvictus212

    SolInvictus212

    Joined:
    Aug 10, 2011
    Posts:
    50
    Love your pack!

    One problem I'm having is, when I have multiple melee characters selected, and tell them to move/attack, I get a lot of "transform.position assign attempt for 'player-knightunit(Clone)' is not valid. Input position is { NaN, NaN, NaN }." errors. Since Unity gives me the unhelpful "Error in file" of Transform.cpp I don't know how exactly to go about preventing this error.

    I'd really appreciate if you could point me in the right direction or let me know if there's something special I should be doing if I want groups of melee characters.

    Cheers,
    Will
     
  50. andorov

    andorov

    Joined:
    Feb 10, 2011
    Posts:
    1,061
    I believe this error was recently fixed with Unity 3.5.2. Can you update and let me know if you are still having these issues?