Search Unity

Space Combat Kit (VSXGames) [RELEASED]

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

  1. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    ok
     
    Billy4184 likes this.
  2. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    53
    I would like to say some idea, may consider "off topic", but .... Point is, I wish Author could know UE4 engine too. Simple (kind of) thing: there is not a single 3D Radar asset for Unreal Engine. Not paid, not free, not on github (that I am aware of), nothing. I think there is opportunity for someone who could make such asset for UE4.
     
  3. LunarLabs

    LunarLabs

    Joined:
    Dec 21, 2016
    Posts:
    16
    you're right it's totally off topic but since we're on it; the same could be said about a lot of assets, it's a well established fact that the unity asset store, and general "around the internet" documentation is significantly more abundant and readily available than UE4. Some argue this is generally down to the lower entry threshold of Unity, making game creation more accessible to beginners and hobbyists, people who ask a lot of questions and a great community who provide comprehensive and contextual scripted support. I'm inclined to agree to some extent, although UE4 is quite accessible these days imho.
     
  4. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    I've got plans for porting the space kit to UE, but not until a lot of other things have been finished first. My priority is the Unity Asset Store right now.

    I have an account on the unreal forums, if you'd like to discuss this please contact me there or email me at <contact at vsxgames dot com>. Let's keep this thread on-topic.
     
    Last edited: Jul 23, 2018
    JFI66 likes this.
  5. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Just a quick update on the multiplayer. Since I want this package to be as good quality as it can be, I've decided to implement more master client authority over interactions in the game while simultaneously reducing visible lag for fast-paced combat.

    I've taken a lot of inspiration from this fantastic Gamasutra article which shares information from a similar type of game.

    For kills/deaths, this means that:

    1. When a player makes a kill, it is implemented on the client (explosions etc), and then it is time-stamped and sent for verification to the master client.

    2. The master client must verify that the kill was possible by rewinding the movements of the vehicles and seeing if everything was hunky-dory.

    3. If the master client rejects the kill, it sends back a message to the first client to undo the kill (the explosion is stopped and the destroyed vehicle is put back).

    4. Other clients (except the client of the destroyed vehicle) will either have the kill implemented immediately (then undone if it's not verified) or may just wait until it's been verified or not. The client of the destroyed vehicle will definitely wait until it's been verified so as not to interrupt gameplay.

    The point is that 99% of the time, the players will see everything happen in real-time with very minimal lag.

    This is well on its way, but of course will need some more time and testing. At the moment, alpha testing of this package is aimed for next weekend.
     
  6. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    cool
    its great you are doing that. i would be pleased to just get something now that handles multiplayer (instantiated) focus and get updates to make game play smoother later
     
  7. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Yeah I understand, but it takes a lot of work to finish a multiplayer that works, and there's no point spending time doing something that's not designed at least basically along best practices.

    I probably won't spend too much time working on the damage verification part before we start testing, for now the master client can basically give the go-ahead to everything that comes through. But it's important that the architecture for lag-less combat is there (i.e. that damage is implemented immediately on the client, and it can be reversed later). Without this, everything is dependent on waiting for a round-trip message to the master client and feels crappy to play.
     
  8. danreid70

    danreid70

    Joined:
    Aug 28, 2010
    Posts:
    222
    Why not always let the Client immediately show the effects of the "hit" (ie: projectile hit effect), and then if the computer with Authority (server) determines the hit is legitimate, send the message to all to do the damage modifiers and the "damage" effects... that way, everyone sees the immediate "visceral" hits, and then even if there's a delay, the damage only happens when it's verified. Or is that the original intent? I'm realllllly looking forward to the multiplayer update!!! :)
     
  9. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Yes that's right. Effectively, everything is given the benefit of the doubt and is implemented as soon as possible on all clients, including implementing damage and destruction of ships. The master client however has full control of the scores and deaths tally (which is only updated after verification), and alone has the ability to call methods that reverse any death or kill on all clients. This means that anyone cheating will not be able to affect their score and the effects of their actions won't last longer than it takes for a round trip message to the master client.
     
    danreid70 likes this.
  10. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    I'm interested in the Vehicle Combat Radar. Is it compatible with Unity 2018.1.6? I'm not going to use it in space but to track underwater objects in 3D space. Would that work?
     
  11. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Hi, I tested in 2018.1.1 and it works fine. If you have any problems with it in 2018.1.6 I would be happy to fix them for you.

    It would certainly work for underwater objects, it works for any 3D space.
     
  12. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Alright, sent you further questions just to make sure the asset will fit my requirements. Thanks for the reply.
     
  13. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Check your PMs.
     
  14. Cosmas

    Cosmas

    Joined:
    Jan 9, 2010
    Posts:
    134
    Hi there, sorry if this has been covered, I searched through the thread. Are there any mechanisms in this asset or any recommended for allowing this kit to work in an open-world context? In other words, how is the floating point issue addressed?
     
  15. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    I have implemented floating origin in the package that will be coming out in the next update. It works fine except for trail renderers which cannot be shifted without stretching issues.

    I am working to finish a distributable multiplayer alpha by tonight. When that's done I'll spend a couple of days polishing the package and submitting a new (non multiplayer) update as there are a bunch of improvements in there that haven't made it to the store yet.
     
    Legorobotdude and JFI66 like this.
  16. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    404
    Billy, what about that workaround I proposed by turning off the trail renderers just before hitting the floating point threshold, and then back on again immediately after? It introduces a very short stutter, but that is preferable (at least by me) to the crazy stretching that was occurring during the shift. The visual stutter of the trail renderer can be compensated for or minimalized by shortening the length of the trail as well. When shortened to about half the default value, the trail appears to pulsate a bit, disguising the brief stutter as a larger than normal pulse.

    Just my 2¢, collect the whole dime...
    Mark
     
    Billy4184 likes this.
  17. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Thanks, I'll try that out.
     
  18. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    woo hoo, cant wait billy...good job.
     
    JFI66 likes this.
  19. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Hi everyone, a multiplayer alpha is ready to try for those who have already bought the kit. PM me your invoice numbers and I will send you a unitypackage (includes space combat kit + multiplayer, and of course requires Photon). I'll be offline for about 7-8 hours btw.

    Multiplayer.png

    All of the features of the space kit, except for the loadout menu, are in the multiplayer. Including some stuff that wasn't in the multiplayer demo:
    • Bots (kicked or brought back in depending on how many players are in the room)
    • Networked missiles
    • Score/stats menu (Press T to show it)
    • HUD lead target tracking of network vehicles
    • etc
    In terms of multiplayer-centric functionality, the master client damage verification is not implemented (and likely will still take quite some more work).

    I recommend importing into a new project as I have made a lot of modifications to the base kit. The base kit still operates completely separate from the multiplayer, but I have had to modify a lot of scripts to enable event catching and operating of specific functions by multiplayer scripts.

    Before I release the package I will need to add/fix:
    • Master client verification of damage;
    • Loadout menu
    • Better/smoother vehicle movement prediction model
    • Several multiplayer game modes
    • Measure and test performance in terms of network traffic etc
    I would be very glad to hear any feedback or suggestions you have about the multiplayer so I can get it finished and released ASAP. As I mentioned before, I am focusing for the next week or so on making a much-needed update to the single player kit which I'll post about soon. After that it's back to multiplayer.
     
    Last edited: Aug 4, 2018
    danreid70, RendCycle, rubble1 and 4 others like this.
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    By the way, if anyone is interested in floating origin, the GameplayDemo (singleplayer) scene in the package will be using it.
     
    Last edited: Aug 4, 2018
  21. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    Thats Great....way to go!!!. Thank you.
     
    Billy4184 likes this.
  22. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    also, i can convert this to Unet and kick you my changes if you want.
     
    danreid70, Billy4184 and JFI66 like this.
  23. juris3d_unity

    juris3d_unity

    Joined:
    Nov 14, 2017
    Posts:
    53
    if (when) you later convert this to UE4 too - you will be famous there! ;-)
     
    Billy4184 likes this.
  24. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    so, the conversion to Unet might be outside my skillset. 2018 obsoletes the old Network. class. so what i thought would be as simple as changing things like PhotonNetworking and things like PunNetworkingBehaviour isnt going to work. i will look at this some more, but i will have to relearn the new API. sorry.
     
    Billy4184 likes this.
  25. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Decided to buy SCK instead of just the Radar as it is also included therein and I think would be a better value. Anyhow, I've read the full documentation and tried importing SCK to an existing project but couldn't seem to make it work. Anybody has a step-by-step instructions (better if video) on how to implement the Controls and Radar on an empty project (so it will be much clearer)?
     
  26. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Thanks for buying! Did you check out the Quick Start Scene demo? If you have specific questions I'll be happy to answer them all, email me at contact at vsxgames dot com.

    This weekend when I update the kit, it will be fully documented (using doxygen) and there will be a quick start tutorial video for creating the Quick Start Demo scene from an empty scene.
     
    Last edited: Aug 10, 2018
    JFI66 likes this.
  27. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Yes, I did check the QuickStartScene. But I still don't know where to begin, what components to include, and what can be excluded into my existing project. There are clues in the existing documentation but I need more specifics and I guess a step-by-step guide on the basics would greatly help fast track the setup. Good to know there will be an updated documentation and a quick start tutorial video! Will await those. Thanks! :)
     
    JFI66 likes this.
  28. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Just remember, the quick start scene is really the bare minimum of what components need to be included in the scene to have all the core functionality.

    In terms of vehicles, you can add or remove Subsystem components (such as Engines, Weapons, Radar, Health etc) according to what functions you will need.

    Modules are things like weapons, which can be loaded onto module mounts on the vehicle and which are activated through the relevant Subsystem component.

    The video will go through all of this, including creating a vehicle from an imported mesh, all the way to the finished Quick Start scene. I will also definitely create a wizard for making a new vehicle, but probably not by this weekend.
     
    Brandon_Powell, JFI66 and RendCycle like this.
  29. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    @RendCycle We bought the whole kit also to support billy. we were just looking for the radar to add to our fighter craft. had to wait for abit to get the MP version. we are just starting our integration with our FPS game as of today. Hoping the 'changing focus' on instantiated objects (players and vehicles) won't be too difficult. Billy did some great work here.
     
    Billy4184 and RendCycle like this.
  30. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Alright, that is good to know. What if, for now, I am interested in just implementing the 3D Radar and maybe the HUD functionality?

    Ok, I understand. This has also been made clear in the documentation which actually made a really good overview of the capabilities of the system.

    That would be excellent! Anything that can further expand and clarify how to implement the system would be a great addition. It can only lessen the barrier of entry in using SCK and therefore will expand its target market. :) Currently, to be able to successfully implement SCK I think requires at least an Intermediate level in scripting.
     
    Last edited: Aug 12, 2018
    Billy4184 likes this.
  31. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Reading how challenging it is to create a modular Multiplayer functionality, adding that integration with SCK will just further contribute to the appeal of this asset. I just hope the setup will be easy for that and mostly everything included in SCK so they can be quickly implemented and utilized by users. I'm actually not yet sure how difficult it will be to convert and implement this for a non-space combat game but has almost similar functionalities. In the documentation it describes that this is very modular/flexible, so I hope I can actually make use of this asset in my ocean faring game.
     
    Last edited: Aug 12, 2018
    Billy4184 likes this.
  32. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    I hear you! The video tutorial will be ready tomorrow, and should help you with a lot of these questions. After you've gone through it, let me know what questions you still have.
     
    RendCycle and JFI66 like this.
  33. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Allright, I present to you the Space Combat Kit Quick Start Tutorial video series! Instead of one long video, I decided to break it up into a bunch of smaller ones to make each part clearer.

    I haven't made tutorials before, so any comments and critiques are greatly appreciated, as I want to make sure these videos are really getting at whatever sticking points you guys might have when beginning to use the kit. I'll be uploading at least one per day until I get through the quick start scene.









    Also, the doxygen documentation is almost ready so that will be available very soon. Straight after, I'll be updating the asset store with the latest version.
     
  34. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Wow, thanks for creating these! Will check them out. :)
     
    Billy4184, ariock and JFI66 like this.
  35. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    WOO HOO....thanks, billy!!!
     
    Billy4184 likes this.
  36. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Next in the Space Combat Kit Quick Start Tutorial series, we'll add a vehicle camera and configure different camera views on our ship!

     
    danreid70, Brian-Ryer, ariock and 5 others like this.
  37. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    These tutorials are very useful! Looking forward for more video tutorials and also for the next update which will add further controls to the Camera (see attached image) and fixes as you've mentioned. :)
     

    Attached Files:

    Last edited: Aug 16, 2018
    JFI66 likes this.
  38. ariock

    ariock

    Joined:
    Jul 23, 2015
    Posts:
    23
    any tuts coming on multiplayer?
     
    rubble1 and Neviah like this.
  39. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    There will be some, but not until the multiplayer is ready for the store, which might be some weeks still.
     
    JFI66 likes this.
  40. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Next in the Space Combat Kit Quick Start Tutorial series, we add a Radar to the ship and begin tracking targets in the scene.

     
  41. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Thanks again for this! :) Will test it out... but might do it in the next update so I might avoid re-configuring anything.

    By the way, I just want to report that in the current 1.1 version of this asset, any code in the Update section in SpaceVehicleEngines.cs I think is not working. I was trying to see how the various audio clips work and planning to have a background Engine Sound (Cruising Audio Clip) running even when my Vehicle is not moving. Then use the Steering Audio when the Vehicle is moving to change its audio pitch dynamically depending on speed. I was able to notice this when I placed a test Debug.Log() under the Update section to display a text. It did not appear in the Console so any code I place there does not seem to run. Below is the particular piece of code I am referring to:

    Code (CSharp):
    1. // Calculate/update the current thrust value
    2.         void Update()
    3.         {
    4.            Debug.Log ("Passed through Update!);  //-- for testing
    5.  
    6.           UpdateAvailableForces ();
    7.  
    8.            // set the engine audio values
    9.            if (hasEngineAudio)
    10.            {
    11.                if (Time.timeScale < 0.0001f)
    12.                {
    13.                    engineAudio.volume = 0;
    14.                }
    15.                else
    16.                {
    17.                    engineAudio.volume = currentThrust / GetMaxPossibleThrust(true) * maxEngineAudioVolume;
    18.                }
    19.            }
    20.  
    21.            // Update the exhaust effect controllers
    22.            for (int i = 0; i < exhaustControllers.Count; ++i)
    23.            {
    24.                exhaustControllers[i].Set(throttleValue, lastBoostInputs.z > 0.99f);
    25.            }
    26.        }
    Did anybody experienced this? If this is indeed a bug, I hope this will be fixed in the upcoming update.

    Note: The Steering audio code under SetRotationInputCoefficients () is working though.
     
    Last edited: Aug 18, 2018
  42. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    If the gameobject that this script is on is active in the scene, and the component is enabled in the inspector, then Update must work.
     
  43. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    The Spacefighter GameObject is active and I am able to control / move it in the game. But the Debug.Log message doesn't appear in the Console window. Aside from this, I've noticed if I use an Input Type of Keyboard in the PlayerSpaceFightControl.cs script, the audio only plays when pressing Keyboard Keys WASD & Roll (Q & E) and no background engine audio. But when the Input Type is set to the default Mouse option, the engine audio plays in the background and also by pressing the Keyboard Keys for Roll (Q & E) which changes the audio volume. Attached is my test configuration for the Audio Source and SpaceVehicleEngines.cs attached to the Spacefighter GameObject if it matters.

    I have noticed this when I was trying to setup another control for a Boat Vehicle.
     

    Attached Files:

    Last edited: Aug 19, 2018
  44. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Do you have output suppressed in the console? See attached image.

    Untitled.png

    I can't think of anything else that would cause this. I just tested v1.1 and Debug Logs in the Update method in SpaceVehicleEngines work fine. If this doesn't fix it, can you send me a screenshot of your editor, showing the Console tab, the Hierarchy tab, and with the Inspector tab focused on the SpaceVehicleEngines component on your ship?

    This kit has no background engine noise when the ship is idle (not moving or turning). If that's the case, it's a bug and not by design, but I cannot find any problem when I test v1.1 of the kit.

    When you press W and S, you accelerate and decelerate the ship. This causes the engine noise to increase/decrease.

    When you steer the ship (roll with Q and E, or move the mouse when the Input Type is set to Mouse) then the engine noise also increases depending on how hard you are turning.

    It probably seems like there is background audio with the mouse control, because as soon as the game starts, if your mouse is not centered the ship will begin turning, and making engine noises.

    As always, if we can not figure out what a problem is, you can send me a project that reproduces the error and I'll be happy to fix it for you.

    In future, it would be great if you could reach out via email (contact at vsxgames dot com) for support issues. Thanks!
     
    JFI66 likes this.
  45. Mad_Mark

    Mad_Mark

    Joined:
    Oct 30, 2014
    Posts:
    404
    @RendCycle try closing the quotes in the Debug.Log statement.
    Done that a bazillion times myself.

    Mark
     
    Neviah and Billy4184 like this.
  46. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Billy, that solved it and I can now see the Debug.Log message! For the life of me, I was so focused on the code that I forgot about that small button as I remember turning it on previously before migrating to a new project file. Apologies and thanks! :)

    For the background Engine Audio, I suggest just changing the sound pitch instead of the volume (or have that option) as the Vehicle receives control inputs (Keyboard &/or Mouse) from the Player. The Max Engine Audio Volume variable can then just be used initially in the Kit's setup to control the overall Engine sound volume as preferred by the developer... or maybe when the player exits from the Vehicle, volume can be lowered to zero or totally deactivated. Since the engine is running when the Player is driving the Vehicle, I think having a soft background Engine Audio playing even without the vehicle moving makes sense to me. In the original open source Boat movement/control script that I got, here is the code that enables this if anyone is interested:

    Code (CSharp):
    1.  
    2. if (m_enableAudio && m_boatAudioSource != null) {
    3.      float pitchLevel = m_boatAudioMaxPitch * Mathf.Abs (m_verticalInput);
    4.      if (m_verticalInput < 0) { pitchLevel *= 0.7f; }
    5.      if (pitchLevel < m_boatAudioMinPitch) { pitchLevel = m_boatAudioMinPitch; }
    6.      float smoothPitchLevel = Lerp (m_boatAudioSource.pitch, pitchLevel, Time.deltaTime * 0.5f);
    7.      m_boatAudioSource.pitch = smoothPitchLevel;
    8. }
    9.  
    10. static float Lerp (float from, float to, float value) {
    11.      if (value < 0.0f) return from;
    12.           else if (value > 1.0f) return to;
    13.           return (to - from) * value + from;
    14. }
    15.  
    This works with having two new Inspector editable fields m_boatAudioMinPitch and m_boatAudioMaxPitch under SpaceEngineVehicles.cs script.
     
    Last edited: Aug 21, 2018
    Billy4184 likes this.
  47. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    329
    Mark, I have a different and longer line of Debug.Log code in my actual script that has no missing ending quotation. I must have accidentally removed the ending quotation here when I edited the comment message before posting. You've got a sharp eye for spotting this! Nevertheless, thanks for the tip! :)
     
  48. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Glad to hear the problem is resolved!

    Thanks for those ideas. Definitely the ability to maintain a background engine sound when not moving is a great idea.
     
    Neviah, RendCycle and JFI66 like this.
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Hi everyone, the first pass on the doxygen generated documentation is available:

    http://vsxgames.com/SpaceCombatKit/Documentation/html/index.html

    Let me know how it goes. Now that I've had some time to look through it, perhaps it could be a bit more verbose, but at least it should give you guys a birds eye view on all the stuff in the kit and what it is for.

    I'm trying to get the next update sorted out, but of course as I went along making the documentation I logged a bunch of things that really need to be fixed, and that's what I'm working on now.
     
    Neviah, JFI66 and RendCycle like this.
  50. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,068
    Hi guys, I'm putting together a setup wizard for creating new vehicles. After watching the video tutorials I posted recently, what do you particularly find difficult and/or time consuming about setting up a new vehicle?
     
unityunity