Search Unity

Template Space Combat Kit (VSXGames) [RELEASED]

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

  1. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Is this using the prefabs provided in the kit for the player, the character and the ship?
    Does the SCK_CharacterVehicleDemo work?
    Are you getting the text prompt to enter the ship? Is the 'EnterExitBubble' on the ship activated?
     
  2. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    No, I use the ‘UltimateCharacterController’ plugin to control characters. It cannot start the spaceship in "SCK_CharacterVehicleDemo" and there is no prompt in "EnterExitBubble".

    I noticed that in ‘SCK_CharacterVehicleDemo’, the characters and the spaceship share a camera. Since the "UltimateCharacterController" plugin uses its own camera, I think this is also a problem that needs to be solved.

    What I want to know is if I don’t use the character that comes with the kit, does "SpaceCombatKit" have a universal way to let player launch spacecraft?
     
    EvilGremlin likes this.
  3. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Hey Billy, Just coming back to this app now. Got my initial errors sorted, and now I am trying to put my own ships into the game. I see you have a few tutorials on Vimeo.
    Are they up to date? They seem to use the old ship.
    Is there an order to follow them in?
    Now that ships are asset files, how do I add new types, like Shuttle, Battleship, Frigate, Carrier, etc?
     
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    I'm going to write up some documentation on this very shortly.
     
    AngelBeatsZzz and JFI66 like this.
  5. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    I'll review them soon. Even if they are not be precisely up to date, they should still be a good guide. Not too much has changed.

    Not necessarily, it depends on what you want to achieve. It's probably best to start off with creating the Player and Vehicle, as it's a good introduction into how things are structured.

    You mean Vehicle Classes? Right click in the project tab and select Create -> Vehicle Class. It will create a new file that you can name whatever you like.
     
  6. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    484
    Oh, yes it has. I worked on V1 way back in the day. This is a major departure from version 1. I had to put it away due to other commitments. Big changes.

    OK, I created one for "Shuttle". When I assign it to the Vehicle Script, the Enter/Exit no longer works.

    Perhaps it's my approach. I am trying to replace the mesh elements with my own. I am duplicating the SpaceFighter, and disabling the visible meshes. Then I drop my mesh in, and zero the transform so that it is positioned precisely where the original mesh was. That way the cockpit (not replacing that for now) lines up for testing. So far so good.

    Now, I would like to change the type of craft, and following that, give it some uniqueness. I have given the shuttle a single gun only, no missiles. The battleship has 5 guns, 2 missile mounts. That's all working, except the enter/exit if I change the ship class. (using the Character_Vehicle_Demo scene)

    Can I use the vehicle classes to hold the settings for that class of ship, or are things like max speed, accelleration rate, turning speed, stopping distance, etc handled in other scripts?

    Mark
     
  7. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Ah, didn't know you were talking about that far back. Yes, last year there was a complete re-write of the code, to make it much easier to customize your ships in the inspector, add/remove features and hook up event functions when important stuff happened.

    All the tutorials are for the updated kit.
    I will write up some documentation for enter/exit today. Basically, you have to designate which vehicles can be entered and exited by which other vehicles. Otherwise you would have a ship entering a character or something like that, which doesn't make sense.

    A Vehicle Class is simply like a tag, or an enum value. It holds no special information on itself. Instead, the scripts that are responsible for features of the kit (such as the ShipEnterExitManager on the ship) allow you to select or exclude vehicle classes from doing specific things.
     
    Last edited: Jun 6, 2020
  8. partizanishe

    partizanishe

    Joined:
    Mar 11, 2019
    Posts:
    1
    Hi, Billy! Can you explain somthing more about AI and behavior selector?
     
  9. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Just added a new tutorial video on setting up entering/exiting of vehicles!

     
    EvilGremlin, AngelBeatsZzz and JFI66 like this.
  10. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    What exactly would you like to know?

    The Selector basically tries to run each behaviour in its list until it finds one that successfully runs, each frame.
     
  11. westryder907

    westryder907

    Joined:
    Dec 28, 2016
    Posts:
    61
    Just wanted to say Thanks Billy! Active asset devs are like pure gold! :)

    AND

    Can anything be a vehicle? Like a GCK player controller?
     
  12. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    You're welcome!

    Yes, the vehicle is simply a representation of the player's physical form that interacts with the world. That's why my recently released Mech Combat Kit is also using the same foundation.
     
    Last edited: Jun 8, 2020
    westryder907 likes this.
  13. mechamitch

    mechamitch

    Joined:
    Jul 16, 2018
    Posts:
    5
    Are there instructions for use with URP? Importing the package into a new URP project sets the scriptible pipeline settings line to none, I was able to upgrade all of the materials just fine for use with UniversalRP-HighQuality but the Camera_UI_ManagedFOV and Camera_UI_NoFOV cameras are blocking out the default main camera with solid blue. I'm trying to work my way through the way the camera layers work but the user guide is a bit sparse on that front, are there some built in settings I'm missing?
     
  14. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Hi! None of the new render pipelines are currently supported, I'm not sure if they are yet stable enough to be worth it. I'll likely look into it soon to see if I can support all versions of Unity that use URP with a single package.

    That said, it should be pretty straightforward to convert the project, except for the hologram shaders and, as you mentioned, the camera layering.

    In the meantime, this video might be of help in setting up camera layering for the new pipeline.

     
  15. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Thank you, the tutorial is very detailed, but it still does not work for ‘UltimateCharacterController’. I think this is because these two plugins are a bit complicated, and their integration may require some specific operations.
     
  16. mechamitch

    mechamitch

    Joined:
    Jul 16, 2018
    Posts:
    5
    Thanks for the quick response, with the new LTS build I'd definitely consider it stable enough to support. Enough effects tutorials these days are built around shader graph that I've moved away from 3D pipeline entirely. Could I get a quick breakdown of the script and object hierarchy for the current layered camera? I'm having a little trouble seeing how it all fits together.
     
  17. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    What happens when you try?
     
  18. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    There is the main camera and then there are two other cameras for the HUD, one which renders UI that should not be affected by Field of View, and another for UI that should be.
     
  19. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Nothing happened, even the prompt text did not appear.
     
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    And what did you try exactly?
     
  21. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    239
    Basically, I completely followed the video tutorial to set up the players I created with the ‘UltimateCharacterController’ plugin, such as adding the necessary component 'VehicleEnterExitManager.cs', etc. But because the character system of ‘UltimateCharacterController’ is very complicated and it has its own camera system, so I think the settings in the video tutorial are not completely suitable for it.
     
  22. SpaceFreak

    SpaceFreak

    Joined:
    Aug 5, 2019
    Posts:
    2
    Does this support multiplayer ?
     
  23. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    No, it does not currently have multiplayer.

    I'm still not clear on exactly what happened when you tried to implement it. I can't speak for how to disable the Ultimate Character Controller when you're in the ship, or disabling its camera scripts, but the tutorial should work if they are both vehicles.
     
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Hi everyone! New tutorial video added on the Floating Origin System.

    This system enables you to create very large scenes in your space game without floating point precision problems (the symptoms of which are shaking cameras and objects when you move far from the scene center).

    Let me know if this video is helpful and what other videos you would like to see!

     
    Keywise, joshua_42 and JFI66 like this.
  25. rboerdijk

    rboerdijk

    Joined:
    Aug 4, 2018
    Posts:
    96
    Does this package support spaceships flying in formation?
     
  26. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Yes indeed! There is a Spaceship Formation Behaviour script where you can set a formation target reference and specify the position offset. This behaviour also supports using acceleration/deceleration to adjust position, rather than turning around toward the target point when overshoot happens.
     
    rboerdijk and JFI66 like this.
  27. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    How suitable is this for a top-down 3D space shooter? Something akin to SPAZ 2 which is a 3D shooter that exists on a single plane (a bit weird to explain, basically ships don't move higher or lower, only on a single plane, but you can pan around the camera and whatnot).

    I'm also curious about spaceship controllers, as the 'feel' of the player controller is central to a good player experience. Are there physics-based controllers with collision reaction, like two objects colliding and spinning away from each other?
     
  28. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    If the ship can only move on a plane, what happens with collisions and spinning around? Wouldn't that be off the plane? I had a quick look at a youtube video of SPAZ 2 but this wasn't clear to me.

    I can't say for sure if this would be suitable. It would be possible to write a controller that took your intended plane of rotation and managed the pitch/yaw/roll of the ship to roughly achieve it, but momentum can be a tricky thing during rotational maneuvers. The controller would have to manage the player's intention plus correction for any errors. This may well have an impact on how the controls feel.

    I don't think you will find that this kit can achieve what you want out of the box, but it comes with a ton of useful features so putting your own controller together might be worth it.
     
  29. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    The collisions and 'bounce' from impacts would still be on the same plane.

    Here is a video of SPAZ 2:


    As you can see, the whole universe exists on one plane, yet is still 3D. The game can be played as a top-down 3D space shooter if desired.

    The kit seems like it provides a lot of what I want out of the box, just curious if the player controller could be modded to remove any movement / collision handling along the Y axis.

    I'm also curious if the kit provides any sort of space generation, like nebulae, etc.
     
  30. rboerdijk

    rboerdijk

    Joined:
    Aug 4, 2018
    Posts:
    96
    I'd suggest to join the discord channel. The author isn't available every single day, but he's there regularly and very helpful.

    At first glance I'd say the movement should be possible ( I'm trying something similar but with limited up-down movement, while avoiding ships flying "upside down"). Didn't spot anything for nebula's in sck ( but I'm not the author, and I only looked at the area's I was interested in, so I didn't look at everything).
    As a sidenote, I did start experimenting with skymaster (different package), to see if the volumetric fog it offers would work in space.
     
  31. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Hey everyone, I've started creating online documentation for both the Space Combat Kit and the Mech Combat Kit here:
    https://universal-vehicle-combat-documentation.vsxgames.com/

    These kits share many components and are built on a common foundation, making it easy to understand them all once you've got the hang of one of them. I am officially naming these kits collectively the Universal Vehicle Combat Series!!

    Did you know...?

    The Game State system enables you to easily handle different states in your game, managing the timescale, mouse cursor attributes, and more, for example when you go from gameplay to the pause menu and back.

    With the Game State Enabler component and the wonder of Unity Events, you can run functions in any script when a change in game state occurs, without writing any code! Enable/disable menu UI, enable/disable input scripts, it's up to you!
     
    Keywise and JFI66 like this.
  32. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Hey everyone, just sent off an update to the store with lots of polishing and quality-of-life improvements. Here are a few of the things included in the update:
    • Improved ship warp spawner. Now you have a base class that can spawn an AI pilot and vehicle ready-to-go, and a child class that adds a warp-in feature.
    • Simplified the menu system by removing dependencies on the Game State system.
    • Separated the HUD Cursor from the mouse cursor, which enables the mouse to be locked and prevents it from leaving the game window.
    • Removed unnecessary custom Unity Events and added simple Unity Events for many classes/events.
    • Massively simplified setting up default values on the Tracker and Target Selector components.
    Take a look at the update log when it arrives on the store to see all the details!
     
    Keywise, rboerdijk and JFI66 like this.
  33. Insurrectionist

    Insurrectionist

    Joined:
    Sep 23, 2020
    Posts:
    4
    I like the product also. I am getting errors
    Assets\SpaceCombatKit\SpaceCombat\Demos\CapitalShip\CarrierLaunch.cs(41,50): error CS1503: Argument 1: cannot convert from 'GameState' to 'VSX.UniversalVehicleCombat.GameState'

    Assets\SpaceCombatKit\SpaceCombat\Demos\CapitalShip\CarrierLaunch.cs(59,58): error CS1503: Argument 1: cannot convert from 'GameState' to 'VSX.UniversalVehicleCombat.GameState
     
  34. Insurrectionist

    Insurrectionist

    Joined:
    Sep 23, 2020
    Posts:
    4
    Well I uninstalled everthing works fine in 2018.4.27f1
     
  35. Insurrectionist

    Insurrectionist

    Joined:
    Sep 23, 2020
    Posts:
    4
    Seems to be missing UVCEventManger Script for your quick start tutorial video 2
     
    Last edited: Sep 25, 2020
  36. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    JFI66 likes this.
  37. Insurrectionist

    Insurrectionist

    Joined:
    Sep 23, 2020
    Posts:
    4
  38. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
    Looking for suggestions for dealing with very 3D large objects (e.g. planets, rings around planets the player can fly through, space wedgies) and floating point issues with the camera. The float point origin code is great for keeping the player out of the jitter zone, but anything bigger than 100K runs into common Unity issues because we are not using doubles. Tried to scale the SCK demo from 1.0 to 0.001 (to get a few orders of mag more scale), but it appears the demo really likes to be a 1.0 scale. Any best practices for SK when dealing with the vastness of space?
     
  39. rboerdijk

    rboerdijk

    Joined:
    Aug 4, 2018
    Posts:
    96
    Draw the planets in a different scale and have a 2nd camera move according to that modified scale, while keeping the rotation identical to the main camera. That would at least work for "far away" planets (while maintaining the illusion they are "far-away")... Not sure how well that'll work if you can actually fly through rings and such.
     
  40. Keywise

    Keywise

    Joined:
    Mar 21, 2015
    Posts:
    36
  41. White_Mouse

    White_Mouse

    Joined:
    Jun 22, 2015
    Posts:
    22
    Can I get an actual explanation on how to add weapons that can be triggered to the vehicle?

    Documentation is no help. There are discrepancies between it and actual scripts. After following the steps in UserGuide game still ignores my input.
    Videos are incredibly inconvenient by their nature in general, and the Triggerables tutorial is 1 year old in particular.
    Online documents are so bare-bones they are not usable.


    Documentation must work with the asset it comes with.
    I want to get a proper one, please.
     
    Hungry-Lion likes this.
  42. GamePowerNetwork

    GamePowerNetwork

    Joined:
    Sep 23, 2012
    Posts:
    257
    Anyone using the universal render pipeline with this? I can't seem to get the camera to work. It's always just a blank blue screen.
     
  43. Hungry-Lion

    Hungry-Lion

    Joined:
    Sep 2, 2018
    Posts:
    21
    Ok, this doesn't work with 2019.4LTS when you try to attach the GameAgent script it says that the script class cannot be found, is this some kind of dependency problem?
     
  44. Hungry-Lion

    Hungry-Lion

    Joined:
    Sep 2, 2018
    Posts:
    21
    So, kinda solved it, I updated package manager UI to 2.20, installed mathematics and burst, don't know which one did it but my money is on the piece of cr*p that is the package manager, its just on the root of every problem lately.
     
  45. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Sorry I missed this post! I recommend dividing up your scene into smaller areas and turning them off when they get far enough away.
     
    JFI66 likes this.
  46. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Good suggestion as well, for a game I was working on I put something together with foreground and background cameras at different scales, with a script to manage how they moved such that moving in and out of warp made the different scale objects accelerate and decelerate at the right speed. I would definitely advise this approach for anything that involves warp travel with objects in view.
     
  47. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Sorry I missed this post!

    The current online documentation is here and will soon cover everything you need to know:
    https://universal-vehicle-combat-documentation.vsxgames.com/
     
    JFI66 likes this.
  48. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Sorry I missed this post!

    URP is not currently supported, but the issue is not too difficult to fix. The cameras are layered in SCK which is not supported directly by URP. You need to render each one to a render texture.

    There are a couple of shaders as well (such as the shield and hologram shaders) which will need to be modified/replaced as well, but that should be about it.

    I will be maintaining a URP integration to solve all these issues in the near future.
     
    JFI66 likes this.
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Sorry I missed this post! For some reason Unity upload the guts of Unity 2018 (i.e. the Package Manager UI package) when I upload to the store, which causes errors in Unity 2019. It can be fixed by removing the Package Manager UI package when you install. I will be maintaining separate updates for these versions after tomorrow so this won't be an issue.
     
    JFI66 likes this.
  50. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,012
    Hey everyone, the Space Combat Kit is currently 50% off in Unity's Super Sale! Grab your copy while you can!

    I'm putting the finishing touches on a big new update that will bring a massive improvement to the spaceship controller and cursor-based aiming and targeting, as well as support for Unity's Input System, and an exciting new demo scene you'll be excited to check out!

    Try this Windows demo out with a gamepad: https://www.dropbox.com/s/6m86yqwiwy9diyt/SCK2019WindowsBuild.zip?dl=0

    Or take a look at this playthrough video I put together:


    More details coming tomorrow when I send the update off to the store :)
     
    Hungry-Lion and JFI66 like this.