Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Space Combat Kit (VSXGames) [RELEASED]

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

  1. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,358
    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:
    224
    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:
    423
    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:
    5,358
    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:
    5,358
    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:
    423
    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:
    5,358
    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:
    5,358
    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:
    5,358
    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:
    5,358
    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:
    3
    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:
    5,358
    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:
    224
    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:
    3
    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:
    5,358
    What happens when you try?
     
  18. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,358
    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:
    224
    Nothing happened, even the prompt text did not appear.
     
  20. Billy4184

    Billy4184

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

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    224
    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:
    1
    Does this support multiplayer ?
     
  23. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,358
    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:
    5,358
    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!

     
    joshua_42 and JFI66 like this.
  25. rboerdijk

    rboerdijk

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

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,358
    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:
    321
    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:
    5,358
    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:
    321
    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:
    50
    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:
    5,358
    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!
     
    JFI66 likes this.
unityunity