Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,008
    Updated the first post to reflect the current state of this project.
     
  2. Arganth

    Arganth

    Joined:
    Jul 31, 2015
    Posts:
    277
    I just stumbled upon this asset

    Did you mean you just submitted it?
    if so, i am eagerly awaiting it :D (how much will it be?)
     
  3. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi Arganth! Yes, I sent it off earlier today. Glad to hear you're interested! The price of this asset will be $15.
     
    GregMeach and Arganth like this.
  4. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    Please post the link once the asset is approved - @$15 it's a bargain! :cool:
     
  5. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Will do!
     
    JFI66 likes this.
  6. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Wow, that was quick! The package is now live on the store.

    Vehicle Combat Radar - ASSET STORE

    Thanks to everyone who helped me get it to its current state by giving valuable feedback.

    If you purchase this package, please don't forget to rate it!

    Just to be clear, the preferred way to contact me for support issues is by email (see my sig below), but if for any reason you don't get a response within a day or so feel free to post here as well.

    I am always glad to hear about what you did or did not like and suggestions for updates and improvements so I can continue to improve it.

    I hope you find it useful, and stay tuned, there's a lot more stuff on the way!
     
    Last edited: Jan 20, 2017
    ikemen_blueD, JFI66 and Arganth like this.
  7. JFI66

    JFI66

    Joined:
    Aug 25, 2015
    Posts:
    41
    Thank you for this great asset!!

    It looks very nice, and has a lot more than just a 3D radar! The included demo scene is almost a playable game.

    I have one question: how should I change the position of the radar hud? Do I need a second camera if the position is on the right or left side?

    Thanks a lot for this awesome asset, which is a bargain!

    Best regards from germany
    Jürgen
     
  8. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi Jurgen! Thank you, glad to hear you're happy with it.

    If you mean the 3D radar, you simply have to go to the Player object, find the child named HUDRadar3D and move it as you please. The 3D radar is a self-contained world-space asset so there won't be a problem moving it.

    To move the 3D hologram of the target, you would go to the Player object, find the child named HUDHologram, find the child under that named SelectedTargetHologram and move its position as you please.

    Please rate the asset on the store when you have the chance! It is very important for helping it to succeed and grow.

    Regards from Australia,
    William
     
  9. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    Awesome, finally the radar system is out. I will buy it when I'm back on vacation. Hopefully, this is performant, no runtime allocations every frame, etc. I still wish you could come up with another space more complete project. I'm really interested how you do with the AI system. My AI system using ray-cast, kind of work, cheap, but just okay in some scenarios.



    This guys uses kind of like voxels-based for his 3D path finding. I'm not sure if it is overkilled, or performant if implementing it correctly with multi-threads, and over-frames. Anyway, I hope something like that in AS soon ;)
     
  10. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi! The package is extremely optimised and performant. The biggest issue when I was testing it was the .ToString calls for the distance display, which is why I added the lookup table, which solved that problem. Memory allocation per frame is very very low (several KB).

    I just tested on my phone, which is a really bad one. When I bought it around 2012 it was the cheapest thing I could find with a touchscreen, and it struggles to run anything from the play store.

    LG-E435k

    Predictably fps was low, around 15fps for 50 targets and down to around 4fps for 200 targets.

    On any decent phone I'd say you should have no problem. Also a customer kindly tested on tablet and had no framerate issues at all.

    PS for anyone testing on mobile, I left the skybox textures at 2k resolution, Truecolor (uncompressed) which is not really suitable for mobile. You may want to adjust this first.
     
    ikemen_blueD likes this.
  11. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    You'll be glad to know that's the next part of this kit (spaceship controls, AI and navigation). It coincides with what I'm working on in my game right now so you can be sure that what comes out is going to be well-tested in a game scenario.

    Very interesting, shame he never got around to writing up the 'technical overview' on his website so it's hard for me to understand exactly what's going on just looking at it, but I'll definitely have a closer look. Seems to work quite well for complex paths too.
     
    ikemen_blueD likes this.
  12. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    Thanks - purchased :)
     
    Billy4184 likes this.
  13. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Thank you! Don't forget to rate :)
     
  14. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Featured on #New, thanks Unity!

    Update to the radar asset coming soon, maybe this weekend, including a request for an expanding target box. Looking forward to more requests!

    After a bit of a break I'm still working on the AI in my mobile game, which will be cleaned up and packaged with what I already have for spaceship movement and control for the next part of this kit. Still a couple of weeks probably.
     
    Last edited: Feb 10, 2017
  15. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    Hi there, just purchased. The radar system is very pretty to the eyes. I notice HUDRadar3D.LateUpdate triggers a GC sometimes, which easily kills the fps by half. Also, DemoRadar.Update generates 1.2 KB every frame. Any thoughts to improve that. I prefer no runtime allocations though ;)

    GC Link
    https://s23.postimg.org/40af3zp5n/2_10_2017_9_02_49_PM.png

    very quick test though. I will study your system soon.
     
  16. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hey there! Thanks for buying the asset, and I'm glad you like the demo and shaders.

    This garbage is produced by creating a new instance of an information-passing class to the widget, every frame for each widget.

    It's probably a better idea to create the class instance for a new widget only when it is pulled from the pool and keep it in memory until the widget is sent back. I will add this to the update.

    Thanks for the feedback!
     
    ikemen_blueD likes this.
  17. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Wow, featured on the front page now! Thanks again Unity! Very motivating to say the least...

    To everyone who's bought it, don't hesitate to post any feedback you have for making it a better system and more suitable for your projects, and don't forget to rate!!
     
    runningbird likes this.
  18. runningbird

    runningbird

    Joined:
    Sep 3, 2009
    Posts:
    382
    @Billy4184 Just purchased last night awesome job easy to implement.

    Keep up the great work!
     
    Billy4184 likes this.
  19. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Glad to hear it! :)
     
  20. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Version 1.1 sent off for review.

    WEBGL DEMO

    User Guide

    Updates:
    • Expanding visor tracking widget;
    • Performance optimisation;
    • A few minor bugfixes and modifications to code organisation.
    There is now the option to expand the target box based on the on-screen size of the target. See updated User Guide for details.

    Garbage collection has been greatly reduced:

    Performance.png

    There are still intermittent spikes of several KB due to:
    • Calling Image.fillAmount on the health bar causes garbage collection.
    • Enabling/Disabling UI elements causes garbage collection.
    However the regular garbage produced by both the Visor and the 3D Radar, as well as a significant amount by the DemoRadar script, has been entirely eliminated.

    Several small bugs have been fixed, and the pooling has been moved to a different generic namespace so as to be able to be used across upcoming packages.

    Any feedback and suggestions are greatly appreciated!
     

    Attached Files:

    ikemen_blueD likes this.
  21. ikemen_blueD

    ikemen_blueD

    Joined:
    Jan 19, 2013
    Posts:
    341
    @Billy4184 amazing works. I'm glad to buy assets from you. I'm looking forward to any other systems, you may contribute to the community. I'm still working on my stuff >< will learn your system and write good reviews soon. Happy coding!!! AI system *cough* cough*
     
    Billy4184 likes this.
  22. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Spaceship controls, navigation/obstacle avoidance and AI system on the way! :)
     
    FusionSticc and ikemen_blueD like this.
  23. Konst

    Konst

    Joined:
    Aug 26, 2013
    Posts:
    78
    I am sold for VR version! Does it work with World Space Canvas? If not yet @Billy4184 do you plan to make VR ready solution? Overall looks great, i am spinning around...
     
  24. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi Konst, glad you like it!
    I did have a world space UI in there at one point. If I remember correctly, the jitter at long distances (floating point precision problems) was a lot worse than with the screen space canvas, so I replaced it, but there may be ways to reduce it. I'll let you know how it goes.
     
    Konst likes this.
  25. Konst

    Konst

    Joined:
    Aug 26, 2013
    Posts:
    78
    I have a question: Demo scene. Play. Everything cool. Select random Ship from Scene right click Delete! Result:
    Bunch of errors.
    MissingReferenceException: The object of type 'DemoTrackable' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    VSX.Vehicles.DemoTrackable.GetGameObject () (at Assets/VehicleCombatRadar/Scripts/Demo/DemoTrackable.cs:131)
    VSX.Vehicles.RadarSceneManager.GetTrackablesInRange (System.Collections.Generic.List`1 targetsList, Single range, ITracker tracker) (at Assets/VehicleCombatRadar/Scripts/Tracking/RadarSceneManager.cs:98)
    VSX.Vehicles.DemoRadar.Update () (at Assets/VehicleCombatRadar/Scripts/Demo/DemoRadar.cs:316)
    @Billy4184 How can i fix this properly?
    Thanks :)
     
  26. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hey there Konst, first of all, the package is designed to handle activating and deactivating gameobjects as a way to add or remove them from radar tracking, so that's an alternative if you want to avoid garbage collection from destroyed objects.

    To permanently remove a gameobject from tracking, there's a method in the RadarSceneManager called Unregister which will remove references to the trackable item from the tracking components. You would call this before calling Destroy() on your ship. I definitely didn't make this clear enough.

    However it's very important that you wait at least one frame before actually destroying the gameobject. This is because the HUDRadar3D, HUDVisor and HologramManager scripts, having updated their information from the RadarSceneManager at the beginning of the frame, still contain references to the destroyed item until they update in the next frame.

    Also there was a small bug as well - the Update() function in HologramManager should actually be LateUpdate(). Otherwise you may still get errors.

    I have already updated the user guide, fixed the above error, and provided a function in the RadarSceneManager called DestroyTrackable (see below) which handles destroying a trackable item properly, and sent the updated package off for review on Tuesday.

    In the meantime, here is what I added:
    • Change the Update() in HologramManager to LateUpdate();
    • Add the following code to RadarSceneManager for destroying the gameobject:
    Code (CSharp):
    1.  
    2. // Cleanly destroy a trackable object in the scene
    3. public void DestroyTrackable(ITrackable trackableToDestroy)
    4. {
    5.  
    6.     // Unregister
    7.     Unregister(trackableToDestroy);
    8.      
    9.     // Start a coroutine to destroy it
    10.     StartCoroutine(DestroyTrackableCoroutine(trackableToDestroy));      
    11.  
    12. }
    13.  
    14. // Coroutine for destroying trackable object after one frame
    15. IEnumerator DestroyTrackableCoroutine(ITrackable trackableToDestroy)
    16. {
    17.  
    18.     trackableToDestroy.GetGameObject().SetActive(false);
    19.  
    20.     // Wait one frame before destroying
    21.     yield return null;
    22.      
    23.     Destroy(trackableToDestroy.GetGameObject());
    24.  
    25. }
    And then just call the DestroyTrackable function to destroy a trackable item in your scene.
     
    runningbird likes this.
  27. Konst

    Konst

    Joined:
    Aug 26, 2013
    Posts:
    78
    OK solved that like this:
    1) to RadarSceneMenager.cs

    public void DestroyTrackableNow(ITrackable trackableToDestroy)
    {
    // Unregister
    Unregister(trackableToDestroy);
    Destroy(trackableToDestroy.GetGameObject());
    }
    2) to the DemoTrackable.cs

    declare: RadarSceneManager radarSceneManager;

    add OnDestroy:
    private void OnDestroy()
    {
    radarSceneManager.DestroyTrackableNow(this);
    }
     
  28. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Don't forget to wait one frame after Unregister, see my explanation above ^^. If not, it may work some of the time but you will eventually run into errors.
     
    Konst likes this.
  29. Konst

    Konst

    Joined:
    Aug 26, 2013
    Posts:
    78
    1) Well i cant find file HologramManager.cs, there is only HUDHologramManager.cs and in there is no Update() method but LateUpdate()...
    2) How do you consider the solution in my previous post?
     
  30. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Sorry, HUDHologramManager is what I meant. In that case you should be fine, but...

    The problem is that you are destroying the object immediately after unregistering. Depending on when you call this function, the 3D radar, visor and hologram components may still contain references to the object since they only update at the beginning of the frame.

    That's why you must wait one frame, and the best way to do this is through a coroutine. See the code I posted in my reply above ^^.
     
  31. Konst

    Konst

    Joined:
    Aug 26, 2013
    Posts:
    78
    With that one frame delay coroutine i have 1 NULL error warning in console before destroying object, while insta destroy works perfect, with no errors. OK ill leave it with my option for now for debugging case and going to wait for an updated version ... :)
     
  32. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Can you please PM me with the full error message, or take a screenshot of the console?
     
  33. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Updated the package to handle destroying tracked items from any script or in the editor, so the above discussed issue is no longer relevant. Sent it off today so may be a few days to arrive.

    Highest priority now is world-space/VR-compatible UI, hopefully it will be ready by next week sometime.

    Thanks for reviews, and keep the suggestions and feedback coming!
     
    Konst and runningbird like this.
  34. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Finished a version that should be VR compatible, going to clean up and test over the next few days. Should be done this weekend.

    WebGL Demo

    untitled.png
     
    Konst, runningbird and ikemen_blueD like this.
  35. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Just a quick update on the radar: a couple of users with VR devices have kindly tested out the update, and I'm fixing up a couple of issues.

    I haven't had a lot of time over the past week or so to work on it, due to some pretty demanding freelancing work, but hopefully it will be finished very soon.
     
    Konst likes this.
  36. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Radar update: I've corrected all the problems associated with VR, mainly focus and camera boundary issues, and am waiting for some feedback from testers. Hopefully will get the all clear!
     
    Konst likes this.
  37. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    OK there were some problems with the previous build, but it seems they are fixed. Testing on the Oculus SDK, OpenVR and Google Cardboard was successful, so now just to clean up the code, update the manual and send off the update within a couple of days.

    Thanks to Konst and Fabrice for helping me test on various VR devices.
     
    Konst likes this.
  38. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    OK, finally! The package version 1.2 has been submitted for review, which has the option for world space UI, and compatibility parameters for making it run smoothly across a range of VR devices.
    • Easy process to switch between screen space and world space UI (see updated manual);
    • Tracking UI prefab has been updated to allow it to be used across both screen space and world space settings;
    • Option for adjusting the viewport borders (since some VR devices use a smaller area of the viewport);
    • Option for positioning the UI at the target's world space coordinates for perfect alignment.
    • Option for easily adjusting the distance at whuch UI is to be displayed relative to the camera, to ease focus problems;
    I also spent more time reviewing and organising the code and testing, which unearthed a few subtle bugs, and added tooltips to the HUDVisor component to display more information in the inspector.

    The package has been tested on Google Cardboard and Oculus Rift (thanks again to Konst and Fabrice for their great help here) and the adjustable parameters should allow it to be used across other devices without issues.

    As always, if you have any problems send me an email or PM and I will get back to you as soon as possible.

    Looking forward to hearing how it goes with your VR projects!
     
    ikemen_blueD and Konst like this.
  39. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    VR/World space UI update to the radar package is live on the store!

    Hope it takes care of all your radar needs, and let me know if you have any ideas for features I could add for you.
     
    Konst likes this.
  40. Pvt_Hudson

    Pvt_Hudson

    Joined:
    Jan 20, 2016
    Posts:
    41
    The asset looks great.
    Per my email, seems to be issue with the demo scene being rendered upside down with the following combination:
    Unity 5.6.0f3, Visual Studio 2017, Windows 10 Creator update and deploying onto Microsoft HoloLens.
    Thought I would mention that, in case others experience the same.

    Demo works fine with Unity 5.5.2f3 or Unity5.6b10, Visual Studio2015 on normal Windows10 deployed onto Hololens.
     
  41. Konst

    Konst

    Joined:
    Aug 26, 2013
    Posts:
    78
    @ch0kk0
    Have you tryed Single Pass Rendering?


    Thank you! So far implementing to my project with no problems!
     
    Billy4184 likes this.
  42. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi, sorry I didn't check my emails today.

    I think since 5.5 there is an issue:

    "VR: Single-pass deferred rendering with multiple cameras in a scene results in the scene being rendered upside down. (851910)"

    Can you let me know if this is what you're doing?
     
  43. Pvt_Hudson

    Pvt_Hudson

    Joined:
    Jan 20, 2016
    Posts:
    41
    no probs re: emails.

    Just tried Single Pass rendering (was on multi before) and same issue.

    All i am doing is modifying the demo scene camera, changing it to the recomended Hololens settings (Solid color [0,0,0,0] clear flags, Clipping plane near = 0.85, field of view = 16) and changed the HUD Visor world space scale to 0.0008 so its not looking too chunky.

    I had Unity 5.6 beta10 on another PC where it worked fine per my previous post, so maybe there is something funky with this later version of 5.6
     
  44. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Can you try a test scene with a world space canvas and a random image (without any content from the radar package), just to confirm if it has to do with the package or not?

    I haven't tried out 5.6 yet but, if you can confirm it has to do with the package itself, I'll try to reproduce it there. Otherwise I'd recommend filing a bug report.
     
  45. Pvt_Hudson

    Pvt_Hudson

    Joined:
    Jan 20, 2016
    Posts:
    41
    Just did very simple world canvas with 2 stock images (one small, one large) in blank 5.6.0f3 project, and they appear correct way up.

    I'm also using Customisable SciFi Holo Interface asset which uses world UI (in another project), without issue on 5.6.0f3
     
  46. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    OK, I'll check it out within the next day or so.
     
  47. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Hi, I don't have Win 10 unfortunately, so I'm not able to test on the Hololens emulator. From what I can tell, Unity 5.6 may have introduced some bugs when using the Hololens, here's one that seems like it may be similar to yours.

    By the way, does the 3D radar and hologram render correctly, or upside down?

    If your bug is not the same as the one I linked ^^, and you're not able to just build your project in 5.5, the best option as far as I can tell, would be to remove stuff from the scene until it renders correctly. Take out the radar and test, take out the hologram and test, disable the target tracking and just put an image on the demo canvas, and see if it renders correctly. If you can isolate the script or scene object that is causing the problem, I can try to figure out how to fix it.
     
  48. Pvt_Hudson

    Pvt_Hudson

    Joined:
    Jan 20, 2016
    Posts:
    41
    was already running with radar, hologram off so unsure if they were affected. Good news, the MSAA on by default was the issue. Thanks!
     
    Billy4184 likes this.
  49. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    6,008
    Glad to hear it!
     
  50. FusionSticc

    FusionSticc

    Joined:
    Mar 16, 2014
    Posts:
    49
    Hello all! I've been intrigued by the radar system, and even more so by the other upcoming modules! I'm just curious, how are things progressing along?
     
    Billy4184 likes this.