Search Unity

Space Combat Kit (VSXGames) [RELEASED]

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

  1. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    173
    I don't need it ! TNX ! I wrote a litte controller.
     
  2. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Glad to hear it! Sorry for the delay, I've been crunching on some freelance work and keeping up pace on the update. Let me know if you have any questions or queries about anything else.
     
    frankadimcosta likes this.
  3. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    71
    HI Billy,
    Just wondering if you have any documentation (even a change log) for the next update. Would be handy if I could grab a copy now. Cheers!
     
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Hi, sorry I don't have the docs done yet.

    This is less of an update and more like a re-write. Pretty much every script has been reworked and often split into smaller ones. It's going to be a massive change, but there's no way around it to make the improvements that need to be done.

    The update has also been delayed a bit, it slipped my mind that I hadn't done the AI but it's done now and the code is much better organized than before. I'm putting together the demos again atm.
     
    joshua_42 and JFI66 like this.
  5. navy3001

    navy3001

    Joined:
    Jun 1, 2017
    Posts:
    14
    How would I make the Hostile fighter indepent? because pretty much what I want to do is have them spawn to music, which I can not currently do to how they currently work, how would I make the prefab be its own thing?
     
  6. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Basically you can spawn a game agent, spawn a fighter, and make the game agent enter the fighter. For the game agent, I suggest creating a prefab from one of the AI in the GameplayDemo scene, so that it has all the necessary control scripts etc attached. Let me know if you need any more info.
     
  7. navy3001

    navy3001

    Joined:
    Jun 1, 2017
    Posts:
    14
    i tried to do that, it just became a dead ship with a white name around it
     
  8. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Did you call EnterVehicle on the game agent component, and pass the ship reference?

    Is the AISpaceFighterControl script running?
     
  9. rickytsmith

    rickytsmith

    Joined:
    May 22, 2013
    Posts:
    22
    Just a quick head's up for anyone using the Gimbal Controller for turrets in 1.21. The Horizontal Arc limits is not working out of the box. You can see this in the turret test demo. In the GimbalController.cs method TrackPosition() the following lines need modifying.
    Code (csharp):
    1.  
    2. // Get the desired angle for the horizontal gimbal on the horizontal plane (wrt the gimbal parent forward vector)
    3.             float desiredLocalHorizontalPivotAngle = toTargetAngle_HorizontalPlane;
    4.  
    5.             // Take constraints into account
    6.             if (!noConstraints)
    7.                 Mathf.Clamp(toTargetAngle_HorizontalPlane, -horizontalArc / 2f, horizontalArc / 2f);
    8.  
    needs to be changed to :
    Code (csharp):
    1.  
    2.  
    3.  // Take constraints into account
    4.  if (!noConstraints)
    5.           toTargetAngle_HorizontalPlane=Mathf.Clamp(toTargetAngle_HorizontalPlane, -horizontalArc / 2f, horizontalArc / 2f);
    6.  
    7. // Get the desired angle for the horizontal gimbal on the horizontal plane (wrt the gimbal parent forward vector)
    8.        float desiredLocalHorizontalPivotAngle = toTargetAngle_HorizontalPlane;
    9.  
    In the original code the Mathf.Clamp result is never set to a variable - the first parameter is not an OUT so will not change the value. In any case this value is then never used to calculate the horizontal arc because the desiredLocalHorizontalPivotAngle ( which is used for this purpose) is assigned to the value before it is clamped.
    Caused me a few headaches so thought I would post this here for anyone else tearing out their hair over this issue.
    Hopefully this will already be fixed in the update
     
    Last edited: Jun 26, 2019
    Billy4184 and JFI66 like this.
  10. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Thanks for pointing it out!
     
  11. rubenpvargas

    rubenpvargas

    Joined:
    Jul 18, 2012
    Posts:
    31
    How is the new version going? Im thinking on buying it
     
  12. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    It's not 100% complete, but the current state of the update is being tested by a bunch of very helpful people on my SCK discord, and I'm working to finish it.
     
    JFI66 likes this.
  13. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
    Is there anyway to have the camera to automatically follow a target so the player just needs to fire the weapons?
     
  14. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    You would need to gimbal the weapons by adding a GimbalController and then aim them by calling the TrackPosition function.
     
  15. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
    Sorry but I'm sure how to call the TrackPosition function. Could you help me?
     
  16. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    @gearedgeek

    You call it like this:

    Code (CSharp):
    1. public GimbalController gimbalController;
    2. public Transform myTarget;
    3.  
    4. void Update()
    5. {
    6.     gimbalController.TrackPosition(myTarget.position, true);
    7. }
     
  17. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
    I meant to say that I would need a little more instruction.

    I think I remember playing one of the demos that the auto pilot was working. Is that correct? If so it would be good to use as a example.
     
  18. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    It wasn't an autopilot, it was AI control (which can be used for the same purpose).

    Can you explain exactly what you're looking to do? By the way if you're a beginner coder, modifying and adding code to the space kit won't be the easiest start for you. I would suggest going to the Unity Learn page and doing some of those tutorials, which is what I did when I started.
     
  19. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
    Basically, I'm looking to have two options for the player to play the game. 1) fully control of the ship, 2) ship movement is controlled by AI but the player is able to control the weapons. The idea for option 2 is like for mobile where you don't have mouse/keyboard or controller.

    As for coding, I use visual scripting, Playmaker.
     
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    That's great, but to be clear, modifying code and extending this kit will require traditional programming knowledge. I try to make it easy for non-coders to do a lot of things with the kit, but it will not cover everything.

    Should the weapons be turrets that can rotate? What view does the player have when using weapons - exterior or interior?
     
  21. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
    I understand that to really do major changes or add features would require a normal programmer. I'm not looking to make some major changes. I played that AI controlled demo and I thought it would work for my idea on mobile.

    That would work where the weapons are turrets and the player could use both views.
     
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    That demo didn't have turrets, which requires a different kind of camera controller and weapon aiming system that isn't ready-to-go in the kit yet (although it wouldn't be too difficult to adapt from whats there already).

    If you join my discord I can hook you up with an update I am fervently working to finish that includes a capital ship demo, which might be the sort of thing you're after.
    https://discord.gg/BrAxpsz
     
    Last edited: Jul 18, 2019
  23. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    119
    Do you still have that scene with the AI controlled ship for the player?
     
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    That was a much earlier version of the kit. But it was as simple as making the AI 'enter' the player's vehicle. Also that demo did not allow the player to partly control the vehicle with the AI controlling another part. That in itself would require some adaptation of the existing code.
     
  25. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Hello everyone, I have finally sent the Space Combat Kit 2.0 to the store! Hopefully it will be in your hands very shortly!

    Send me your invoice number or join the Space Combat Kit Discord to get your hands on it now!

    First of all, sorry for the long wait. It would have been better to add some of the requested features before overhauling the whole kit, and I will prioritize much smaller, regular updates from now on, even when I'm working on a bigger change.

    Note that although much of the structure is the same, this is a complete re-write of the codebase, so be sure to back up your projects before updating.

    Here are some of the added/improved features:

    CapitalShipCombat.png

    Capital Ships
    • Capital ship camera
    • Capital ship controller
    • Capital ship AI
    FPS.png

    First Person Character

    • Uses same architecture as other vehicles
    • Vehicle enter and exit
    • Ship landing and taking off
    User Friendly Code Architecture
    • Extensive use of Unity Events so you can easily connect additional functionality to important events without having to modify or extend the current scripts
    • Lots of small, re-usable components for building weapons and modules
    • Extensive use of base classes that are designed to be extended.
    • Minimal use of interfaces to improve ease of use and reduce problems when updating.
    • Designed as a foundation you can build on without directly modifying scripts.
    Powerful Radar/Tracking
    • Add information to targets and display the information on the HUD without writing code.
    • Customize target boxes and radar widgets to display different kinds of target information through text and UI bars, without writing code.
    • 2D/3D Radar
    • Have as many Target Selectors as you like (e.g. one for waypoints, another for enemies).
    • Create and target subsystems on big ships!
    • Customize target tracking bounds for different ship shapes
    User Friendly Modules
    • Lots of small, re-usable event-driven components for creating your own modules such as Triggerable, DamageEmitter, BeamController etc.
    Easily Customizable HUD
    • HUDComponent base class allows you to quickly create and manage your own additions to the HUD.
    • Easily manage how parts of the HUD are shown in different camera views
    Better Health System
    • Event driven, modular components to quickly create all kinds of damageable objects.
    Better control scripts
    • Easy to use base class for creating new control scripts
    • Have as many control scripts as you like on a vehicle.
    • Share control scripts among vehicles with overlapping functionality.
    • Specify game states that each control script is allowed to run in.
    Much more!

    Given that this is a total re-write of the kit, there's so much more that has been added and improved to each feature and how it works.

    I'm looking forward to seeing how much easier it is to customize your game when using this kit!
     
  26. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    366
    Good work Billy! I cannot wait to get my mitts on this and start working on my space project again...

    Congrats on the release,
    Mark
     
    JFI66 and Billy4184 like this.
  27. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    juris3d_unity, joshua_42 and JFI66 like this.
  28. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Please note that a new package has been submitted with the following bug fixes:

    - Enemy fighters missing Power subsystem.
    - Shields recharging after being destroyed.
    - Loadout menu bars no updating.
     
    juris3d_unity and JFI66 like this.
  29. Roachie

    Roachie

    Joined:
    Aug 2, 2009
    Posts:
    64
    Great work billy . Looking forward to trying out this new version .

    One of the best kits in the store :)
     
    juris3d_unity and Billy4184 like this.
  30. Kolgrima

    Kolgrima

    Joined:
    Feb 2, 2009
    Posts:
    37
    Just picked this up... where can I find documentation?
     
  31. jouveer

    jouveer

    Joined:
    Oct 2, 2017
    Posts:
    2
    Here is the PDF
     

    Attached Files:

    Kolgrima and Billy4184 like this.
  32. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    These docs are a little outdated, and I'm fixing them up. I am also preparing small scenes focused on isolated parts of the kit, with Readme files that explain how to set them up. During next week tutorial videos will follow.
     
    JFI66, Kolgrima and Inspeinre like this.
  33. Kolgrima

    Kolgrima

    Joined:
    Feb 2, 2009
    Posts:
    37
    Thanks for the reply. looking forward to the support materials...
     
    JFI66 likes this.
  34. Reiner

    Reiner

    Joined:
    Dec 2, 2012
    Posts:
    211
    hey billy nice work love it ! have you plant to made the kit multiplayer ready in future?
     
  35. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    @billy most of your links are broken including the demo. Are you updating them?
     
  36. VavylonaEntertainment

    VavylonaEntertainment

    Joined:
    Oct 21, 2015
    Posts:
    143
    Anyone else has problems with the setup guide scene? It doesnt respond to anything.
     
  37. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    At the moment I haven't got plans for it. It adds a huge amount of complexity to every feature, and I'm not sure there's enough demand.

    Yes, I will be updating the OP post soon with a new demo. I'm just working through an issue with the targeting that's specific to the WebGL platform.

    Do you mean the flight controls demo I put on the discord? I've updated it to use a complete set of flight controls.
     
  38. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    I've put up a WebGL Demo with:
    • Space fighter combat
    • First person character, entering/exiting ship, landing/taking off
    • Capital ship combat
    Enjoy!
     
    frankadimcosta, MMccathron and JFI66 like this.
  39. navy3001

    navy3001

    Joined:
    Jun 1, 2017
    Posts:
    14
    Does the scene still move around the player? or does the player now fly around the scene?
     
  40. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    The scene never moved around the player, but before there was an option for the player to periodically be put back at position (0,0,0) and the scene adjusted, such that the player never got far from the center. This will return shortly, but it glitches the trail renderers (which are world space) and I will hopefully write a trail renderer soon that can be shifted without stretching.
     
  41. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    366
    When will this be available / included?

    Why not, as previously suggested, turn the trail renderers off just before the move, then turn 'em back on again immediately after? If the trail renderers are setup to simulate pulsing, the interruption will be overlooked completely. This is what I did in the previous version. Please replicate it Billy.

    Thanks,
    Mark
     
  42. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    The discord is down too.
     
  43. dreamlarp

    dreamlarp

    Joined:
    Apr 22, 2011
    Posts:
    854
    We are working on multiplayer. Do you have any warnings about the features that may cause problems before we start or is it just the complexity

    P.S. I love the capital ship feature. Are you going to add a loadout scene for capital ships too?
     
    Last edited: Jul 27, 2019
  44. navy3001

    navy3001

    Joined:
    Jun 1, 2017
    Posts:
    14

    can you add an way to disable this? I was messing around with an idea I had (spawning ships to music) and because of the player being snapped to 0, 0, 0, the player could never run away form them
     
  45. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    186
    Perfect Asset!
    do you have a complete main menu - ingame menu? Save and load? :)
     
  46. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    I'll put it back in very soon, I need to take a look and make sure it's easy to add/remove Scene Origin Management from the scene first.

    Thanks for pointing that out, looks like I put a temporary link in there.

    I previously spent some time getting a multiplayer version going with a much earlier version of the kit, but did not continue because the amount of additional work didn't seem like it would pay off in terms of demand, and added a lot of complexity to what would otherwise be fairly simple features.

    The biggest complexity I encountered was accurately predicting ship and projectile movement at fast speeds between packets. If you get to that point (or have any other issue) I'll be happy to give you advice. My implementation is in this package: https://www.dropbox.com/s/9q7rxvkcnmva7te/SpaceCombatKitMultiplayer.unitypackage?dl=0

    It requires an earlier version of the kit (1.20) which is quite different from the current one. I will grab it for you sometime soon - it's on a dead laptop's hard drive (yeah should have done a better job of backing things up!).

    Did you try adding the capital ship to the Vehicles list on the PlayerItemManager prefab? :)

    upload_2019-7-28_0-4-47.png

    Yes I will make it easy to disable/remove.

    Glad you like it! What exactly do you mean by a complete main menu? Saving and loading is something that's a bit outside the scope of what I'm doing with the kit at the moment. Generally, I try to make it easy for people to set up essential features (such as input for example) but I'm trying to avoid spending time on things that other products on the store are dedicated for and do a much better job of. I'm aiming to do a much better job of integrating other great assets on the store, which will be much easier with the open, building-block-based design of this latest version of the kit.
     
  47. Turjav

    Turjav

    Joined:
    Jul 24, 2019
    Posts:
    2
    Sorry newbie here. Where is the user manual?
     
  48. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    4,587
    Hi, the documentation is WIP, but in the meantime I have created some small demo scenes to show parts of the kit, with text files giving you the steps you can use to create the scene from scratch. It's a great way to get acquainted with the kit.

    If you PM me your invoice number I will set you up with the update I finished just a few hours ago, which has tutorials for setting up flight controls, triggerables and modules/module mounts.
     
    JFI66 likes this.
  49. SteveArr

    SteveArr

    Joined:
    Jul 24, 2019
    Posts:
    1
    Just leaving a note to the developer that I would love to purchase your product but documentation is a requirement. In the future, please don't release until you have documentation in order. I understand you have a demo scene, etc but we purchase tools to save time and having to reverse engineer a demo scene is not ideal.

    Best wishes!
     
  50. Turjav

    Turjav

    Joined:
    Jul 24, 2019
    Posts:
    2
    I started a conversation that includes the invoice number. Please send any relevant information. I tried the demo scenes but I couldn't figure out how to do basic stuff like customize controls.

    On a related note, what version of Unity is best to use with this kit? I tried it on the latest version and got a ridiculous number of errors. It does some to run on an older, 2018 version of Unity though.