Search Unity

Template Space Combat Kit (VSXGames) [RELEASED]

Discussion in 'Tools In Progress' started by Billy4184, Jul 14, 2015.

  1. Miclebrick

    Miclebrick

    Joined:
    Dec 31, 2014
    Posts:
    38
    Nevermind, I just had to use rigidbody velocity instead of manually transforming.
     
    Billy4184 likes this.
  2. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Yep, the radar package (and the space combat kit) is completely physics-based.
     
  3. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    41
    It's avaible !!
    Thanks a lot! Couldn't wait any longer;-)

    Is there a chance to upgrade the radar package? Or maybe I don't get .

    Thanks again and keep up your great work,
    Jürgen
     
    Last edited: Feb 6, 2018
    Billy4184 likes this.
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Lift-off! :D

    I added an upgrade from the radar package, but I can only see it when I go to the old store. Does anything show up for you?

    Please post any bugs to contact@vsxgames.com - I'm going to be watching closely so that I can quickly fix stuff, so don't hesitate to post anything you find.

    Looking forward to any and all feedback!
     
    Last edited: Feb 6, 2018
  5. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    41
    In the new shop its on sale.
    I have to sleep now...
     
  6. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    I mean do you see any option on the new store for upgrading from the radar package? I just added the upgrade, but it only shows up on the old store for me.
     
  7. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Insta-buy! Looking forward to checking it out.
     
    Billy4184 likes this.
  8. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hope it's up to your project! Let me know if you have any feedback or suggestions.
     
  9. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Just checked it out briefly. Very cool!!! I love that you can watch the AI from the first-person to see it do its thing. The formation flying and obstacle avoidance is top notch. Really, really nicely done. I love that the gameplay demo has the AI avoiding asteroids and a space station; it's a great stress test of the capabilities of the asset. Pretty mind-blowing really.

    So just a couple of technical things.

    1) I'm on Unity 2017.2.0f3 and I got the "obsolete API" message to auto-convert obsolete stuff when I first imported the asset. Will that be addressed at some point? Wasn't the nicest way to kick things off. :)

    2) When I tried to hit Space to trigger enemies, I was initially getting a "NullReferenceException: Object reference not set to an instance of an object" error after about a second. Line 361 of Radar.cs.

    I ended up changing that line from this:

    Code (csharp):
    1. if (previousTarget != null && !selectedTarget.Equals(previousTarget))
    to this:

    Code (csharp):
    1. if (previousTarget != null && hasSelectedTarget && !selectedTarget.Equals(previousTarget))
    It seems that after a certain number of frames, selectedTarget can be null.
     
  10. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    41
    In the old aaset store I see an upgrade button. Great!
     
    Billy4184 likes this.
  11. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Thanks for the feedback, yeah I've fixed that bug up, strange it didn't show up during testing.

    I'm going to upload multiple versions to fix up the obsolete API problem.
     
    Last edited: Feb 7, 2018
  12. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    112
    been waiting a while for this myself! purchased and looking forward to testing over the weekend! :p
     
    Billy4184 likes this.
  13. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Look forward to hearing about it! :)

    I'm fixing a few bugs, and based on a few emails I've gotten, I'm going in the process of improving the documentation and sample scenes to better show the process of creating ships/modules and creating a working scene from scratch. I'll also be making some video tutorials that explain the structure of the kit in a more hands-on way.

    Don't forget everyone to send any comments and feedback, either here or to the contact email in the documentation that came with the kit.
     
  14. Miclebrick

    Miclebrick

    Joined:
    Dec 31, 2014
    Posts:
    38
    in case you didn't know the project requires auto updating to unity 2017 and it might break something i'm not sure
     
  15. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    I'll be uploading different versions to 5.4, 5.5, 5.6 and 2017. I don't think there's anything that would break, but it's definitely not ideal to get that auto update message.
     
  16. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    112
    Had a quick play on demo scene and looks impressive!

    I do seem to get this error come up alot on the gameplay demo scene when starting a attack

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. VSX.UniversalVehicleCombat.Radar.GetNewTarget (RadarSelectionID selectionID, RadarSelectionMode mode, Boolean playSwitchTargetAudio) (at Assets/SpaceCombatKit/Scripts/UniversalVehicleCombat/Radar/Radar.cs:361)
    3. VSX.UniversalVehicleCombat.Radar.Update () (at Assets/SpaceCombatKit/Scripts/UniversalVehicleCombat/Radar/Radar.cs:398)
     
  17. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi Mcg, glad you like it! As Steve-Tack kindly pointed out, please go to line 361 of the Radar script and change it from:

    Code (csharp):
    1. if (previousTarget != null && !selectedTarget.Equals(previousTarget))
    to this:

    Code (csharp):
    1. if (previousTarget != null && hasSelectedTarget && !selectedTarget.Equals(previousTarget))
    I have fixed that and a few other bugs and will update the package this weekend.
     
  18. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    Billy,
    Nice work.
    We are almost finished with a Battlestar Galactica game that plays like Battlefield 2 with a persistent universe. We are implementing the radar systems now for the fighters. We are making a decision between this and 3D Radar Builder. 3D Radar Builder will require some re-coding for target tracking for seeking weapons if we understand their docs. Your work solves this but we need a radar system that will work on scene placed GO's, so when you enter the vehicle (which is not instantiated) the radar is relevant to that vehicle. For example, can your radar be attached as a prefab or an Game Object and childed to the fighter? We are using Photon and i see where you were going to make this compatible. Have you done that in this update or is it scheduled for release, and is this what you mean by making it multiplayer compatible?
     
  19. Roachie

    Roachie

    Joined:
    Aug 2, 2009
    Posts:
    67
    This asset looks amazing , but I have a few quick questions

    1) how good is the ai obstacle avoidance , would it work well avoiding lots of buildings etc ?

    2) do you have a roadmap of features you hope to add in the coming months ?

    Brilliant asset though , the power management etc goes above and beyond .
     
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi!
    First a bit of background on how the scene is set up with this kit (this is part of the documentation that comes with it).

    Game Agents
    The way the asset works is that each agent in the scene (either player or AI) is represented as a 'game agent' component which sits apart in the scene and is not inherently linked to any vehicle, but can enter or exit different vehicles.

    And there is one game agent which is 'focused' by the scene, and this game agent is the one which is referenced by the scene's GameAgentManager component. By doing this, everything in the scene (camera, menus, etc) can continue to be 'focused' on a game agent, even as it enters or exits different vehicles.

    Radar Vs HUD
    OK so in this kit, a radar and a HUD are different things. A radar does the work of finding targets, and the HUD represents the radar's information visually. Each vehicle has an individual radar component (which searches for targets etc) attached to it as a subsystem, but not an individual HUD. This is to make the scene more efficient, so that if you have a lot of ships in the scene you are not holding a lot of HUDs (which are made up by a lot of gameobjects etc) in memory.

    So instead, there is a component (HUDSceneManager) which loads a new HUD whenever the 'focused' game agent enters a new vehicle. Since each vehicle stores a reference to its HUD prefab on the Vehicle component, this component simply looks it up and instantiates (or activates) the appropriate HUD.

    So the point is that if you have a ship that's already in the scene at the start, all you have to do is:

    1. Have the player game agent enter the ship.
    2. Set the player game agent as the 'focused' game agent on the scene's GameAgentManager script.

    By doing this, the correct HUD should be loaded automatically by the HUDSceneManager.


    I hope I understood your question correctly. If you have more questions it would be best to contact me at 'contact at vsxgames dot com', so that we can have a lot of back and forth to get this sorted.
     
  21. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi, glad you like the asset! The obstacle avoidance is still a work in progress, and may not yet be well suited to high-density obstacles. It's more than enough I think for most space combat scenarios, but for a game with the type of environments that e.g. Strike Vector has, it wouldn't be sufficient. I want to fix this, and I hope to get a solution soon that, for your type of game, would be at least dependable and solid.

    At the moment, I plan to make a weekly update cycle, at least until the kit is more filled out. I'll probably post here tomorrow the updates that I will send off next weekend.
     
  22. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    Thanks for you quick reply Billy,
    So, just to clarify. I have a multiplayer game and any of the players can enter any of the vehicles and the radar/hud will work?
     
  23. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    and by any vehicles i mean those in our game that have the 'game agent'.
     
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi, just to clarify, I am referring to the space combat kit, not the vehicle combat radar. They have diverged a little, which I'll be fixing up quite soon.

    Please see my response to your PM. Basically, I'll be integrating multiplayer into the kit this week so I will be able to guarantee multiplayer functionality within a few days.
     
    Neviah likes this.
  25. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    very sweet. thank you for your fast reply. if the radar works like we hope, we will surely buy the space combat kit.
     
  26. simonifans

    simonifans

    Joined:
    Feb 23, 2017
    Posts:
    2
    Love the look of this, thinking of creating this in VR, are the controls easy to change

    thanks
     
  27. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi, apart from some of the menus (which I'll be changing shortly), all of the kit is compatible with VR - the HUD has a world-space option. And yes, the controls are quite easy to change.
     
  28. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    57
    Oh, well... Existence of such Space Kit makes me want to jump into Unity world. But I am Blueprints-only UE4 beginner. Any voices on this, could I "survive" in Unity environment? :) Mostly meaning that I have no actual coding experience, almost. P.S.: some may know me as "Cockpit Games" fanatic, and/or Sci-Fi Aerial Combat addict :)
     
  29. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi Juris, please see my email reply to you.

    I have tried to make the kit as intuitive and well-organized as possible, but using and modifying it for a particular game will likely require some coding knowledge. Most of the features are designed to be 'plug and play', but it's usually necessary when using starter kits to modify and add things, which requires the ability to understand and write code.
     
    juris3d_unity likes this.
  30. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    27
    Hi,
    Just want to say that I purchased this on the day of release after noticing it quite by chance. Excellent work ! It is really well designed and very straight-forwards to extend e.g. Multiplayer. Tons of features above and beyond what would normally be expected - really good value. I will be posting a very positive review on the asset store. Thanks for all your hard work and many hours it must have taken to get this together.
     
    JFI66 likes this.
  31. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Glad you're finding it useful! I'm in the process of adding multiplayer, so it should be ready within a few days. Let me know if there's anything else you'd like to see added.
     
    danreid70, JFI66 and Neviah like this.
  32. Neviah

    Neviah

    Joined:
    Dec 1, 2016
    Posts:
    235
    Which are you using? Photon vs Unet?
    I already have a project utilizing photon and I'm not quite sure how easy it'd be to convert to unet if you release yours using that.
     
  33. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    I'm adding Photon, since it seems to be the most popular and easy-to-use of the two. I'll probably add UNet at some point later on.
     
  34. Roachie

    Roachie

    Joined:
    Aug 2, 2009
    Posts:
    67
    In a previous post you mentioned capital ships e.t.c, is this something in atm? would like a game where i can potentially control a whole fleet, including capital ships .

    Does it support ai turrets, ie ships with automated guns ?
     
    Neviah likes this.
  35. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Yes I will be adding a demo soon. However there's no reason why you cannot already do it with the kit.
    • Instead of directly controlling the ship, you can click somewhere on the horizon, and use the AI maneuvring code as an 'autopilot' to make your ship turn there.
    • Gimbals (turrets) are already in the kit (GimbalController is the script you're looking for, and is used on the vehicle camera if you're looking for an example). GimbalController has a method for simply setting the target position in space that you want the gimbal to rotate to, and the gimbal will rotate there with the speed you've set.
    The only thing not already in the kit is a capital ship camera (i.e. one that is linked to the turret rather than the ship itself).
     
    danreid70 likes this.
  36. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    Just bought Space Combat Kit for Brainstem Games Studio. great asset and the Dev was very fast in answering all of our questions. It's a great package and we at Brainstem Games highly recommend it and Billy4184.
    Great work William!
     
    danreid70, rubble1 and Billy4184 like this.
  37. Roachie

    Roachie

    Joined:
    Aug 2, 2009
    Posts:
    67
    Just bought it myself, just a quick look, fantastic package though, need to delve into the meat of it all.
     
  38. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    225
    I just purchased this kit recently, too, and quite excited to get some time to dig in to it! Billy: AWESOME JOB!!! Keep up the great work! I must admit I wasted quite a bit of time just playing with the demo scene and should have been working on integrating it with my perpetually evolving project...

    So the only bad thing I can say about it so far is: it's too darn fun to play with and consumes precious development time! Lol!

    Looking forward most to:
    • Capital ships! ;)
    • UNet networking (I know it's Photon first, which I only avoid because I'm not familiar enough with Photon yet and try to keep all extra required assets to a minimum)

    Maybe a tutorial or short description on best method to use the modularity of the agents to control surface vehicles/characters - it looks like out-of-the-box it should actually be easy enough. But to ensure I don't code something that clashes with future possible updates if that makes sense? I like to keep it clean, so future updates don't break something unintended. Who among us hasn't experienced that, despite trying so hard not to?

    I know this kit is intended for space sims, but wow it's so modular, it's practically a universal controller for just about anything! Too cool! Already envisioning scrapping my current separate control systems and adapting this as the common controller for all vehicles! Space ships, landers, vehicles and even troops! It's just so clean! :)

    Again, thanks Billy!!! Will keep watching this thread!!!
     
    rubble1 likes this.
  39. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Thanks for the kind words! Yes although it's a space kit, the core of it is designed to be a sort of universal controller for anything that might be described as a 'vehicle' - i.e. anything that moves around in the world, detects targets, can be damaged, can damage other objects etc etc, so you can see that in abstract, it's quite possible to say that a character is just another type of 'vehicle'. This should make it easy to create a game with Battlefront style gameplay.

    To create a different kind of vehicle, just extend the Vehicle class (in the same way that the Ship class in this kit does). By extending the Vehicle class, your new class is basically another container of subsystems such as Weapons and Shields etc.

    Importantly, I separated the space vehicle engines (SpaceVehicleEngines class) from the main Engines class. The Engines class is meant to be a very 'abstract' class that simply sends input parameters from -1 to 1 for the position and rotation on the x, y, z axes to the actual implementing control class (i.e. SpaceVehicleEngines) via an interface (IVehicleController). This way, the implementing class can do whatever it wants with the input values, you can control either a spaceship or a land buggy, or anything else.

    About the capital ships and multiplayer, it's on its way. I'm working through creating a network-controlled ship at the moment for Photon. A capital ship demo is on its way but as I mentioned in an earlier comment, just about everything is already in there (maneuvring code, gimballed weapons etc).

    Also video tutorials are on the way, and better documentation.
     
    rubble1 and danreid70 like this.
  40. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    27
    Having a small issue with the AddMessage() function in HUDMessages - the messages appear ok and fade and scroll down but the list never resets so the messages are eventually appearing off screen?? Anyone noticed this - it happens with the Missile warning message as well. If you have added a few messages the missile warning is also eventually appearing off(below) the viewport.
     
  41. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi, thanks for reporting the bug. Change the line (probably 102) of the HUDMessageController that reads:

    Code (CSharp):
    1. float amount = Mathf.Clamp((Time.time - (animationStartTime + sustainPeriod)) / fadePeriod, 0f, 1f);
    to:

    Code (CSharp):
    1. float amount = (Time.time - (animationStartTime + sustainPeriod)) / fadePeriod;
    The amount value was being clamped to < 1, but needed to exceed 1 in order for the message to be deactivated and returned to the pool.

    Also, if you'd like new messages to appear above old ones, change the line (probably 117) in HUDMessages script that reads:

    Code (CSharp):
    1. messageController.CachedTransform.SetAsLastSibling();
    to:

    Code (CSharp):
    1. messageController.CachedTransform.SetAsFirstSibling();
     
  42. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    This sounds like a fantastic kit so you would now be able to use Joysticks with this? And will you be able to drive wheeled /tracked or hover vehicles using this package? IF so that would be great I definitely would be buying and I guess we can use our own models ? And hopefully Plater and A.I will be fighting on actual round cyberplanets?
     
    Last edited: Feb 19, 2018
  43. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    27
    Many Thanks - will give it a try later.
    Have noticed a few other bugs that I have managed to fix : ( can post fixes if they have not already been corrected)
    Projectile weapons not consuming ammo when not set to infinite.
    Beam weapons continuously consuming power when not firing - but consume no power when actually firing.
    I think I have fixed a bug in the radar where friendlies always see neutrals as hostile and attack. Needs further testing.
    The more I use and play with this kit the more I am impressed !
     
  44. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    27
    Fix for BeamWeapon.cs
    // Draw power from the Weapons
    if (moduleMount != null && moduleMount.Vehicle.HasPower)
    {

    if (!moduleMount.Vehicle.Power.HasStoredPower(PoweredSubsystemType.Weapons, minimumPowerToFire))
    {
    StopTriggering();
    }
    else if (firing)
    {
    moduleMount.Vehicle.Power.DrawStoredPower(PoweredSubsystemType.Weapons, powerDrawPerSecond * Time.deltaTime);
    }

    }

    * Added new float field to class - minimumPowerTofire - the previous check using Time.Delta does not work well given that it always returns true and StopTriggering() would never fire because the result is a very small value and the Power is continuously recharging.
    Changed if to else if (firing) to prevent weapon from continuously draining power when not firing
     
    Last edited: Feb 19, 2018
    rubble1 likes this.
  45. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hi, you can definitely use joysticks with this kit, although I haven't set any up as I only have 1 joystick on me right now. Also Rewired is pretty much a must for this.

    Driving land vehicles is not part of the kit right now. That said, the architecture of the kit is perfectly suited to adding many different vehicles including wheeled or hover vehicles, so you'd be pretty much just adding an specialised vehicle controller for whatever type of vehicle you wanted. However, it future I want to expand this kit (probably under a different name) with many different kinds of vehicles.

    Yes you can use your own models. I'll be making a tutorial vid on importing a model and setting it up, and you can just take a look at the prefabs.

    Fighting on planets is not part of the kit. At the moment it's designed for open space. I'm not sure if/when I would work on creating round planets.
     
  46. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    Hey, thanks for the bug reporting, much appreciated! I'd prefer however that bugs were reported to the support email (contact at vsxgames dot com), and this thread was kept more as a general information point. Otherwise people browsing around here have to scroll through code snippets to find out about the kit and implemented/upcoming features.
     
  47. Vampyr_Engel

    Vampyr_Engel

    Joined:
    Dec 17, 2014
    Posts:
    449
    OK thanks though I would say it it would be cool because then you would have Elite Dangerous with driving vehicles on an uncharted planet That would be cool
     
    Billy4184 likes this.
  48. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    hey Billy,
    Any update on Photon?
     
    Neviah likes this.
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,023
    It's going well. I haven't been able to work on it as much as I wanted to, but ship movement is working well and I'm going through the weapons right now. The biggest obstacle is creating the multiplayer code in such a way that it fits over the existing code without intruding too much, but I think I have it sorted.
     
  50. MMccathron

    MMccathron

    Joined:
    Feb 27, 2015
    Posts:
    13
    Hi, I recently bought your kit. It's great! I do have some questions about the integration with Behavior Designer. I followed the BD integration workflow provided in the User Guide, and have come across some game-halting errors. These errors pop up before I hit the play button when I use the provided BehaviorDesignerFighterAI prefab:

    Assets/BehaviorDesignerIntegration/BehaviourDesignerIntegration/Scripts/BDImplementResults.cs(25,70): error CS0117: `VSX.UniversalVehicleCombat.GameManager' does not contain a definition for `Instance'

    and

    Assets/BehaviorDesignerIntegration/BehaviourDesignerIntegration/Scripts/BDImplementResults.cs(48,72): error CS0117: `VSX.UniversalVehicleCombat.GameManager' does not contain a definition for `Instance'

    Any idea what this means, or if I screwed something up? I loaded Behavior Designer into the project first, then the Space Combat Kit as was suggested. I'm currently using Unity 2017.3.0f3. Thanks!