Search Unity

VOXL - Unity Multiplayer Voxel Sandbox

Discussion in 'Assets and Asset Store' started by mischa2k, Nov 20, 2016.

  1. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    VOXL_forum.png

    VOXL is the first UNET Multiplayer Voxel Sandbox for Unity!
    (Store)(WebGL Demo) (Documentation)

    About:
    VOXL uses Noise functions to generate pseudo random infinite Voxel worlds. The asset was designed with simplicity in mind and has high quality networking code based on uMMORPG and uMOBA.

    VOXL was designed with simplicity in mind. The code is as simple as possible, while still being able to handle an infinite world

    Video:


    Screenshots:
    2016-11-20b.png
    2016-11-20m.png
    2016-11-20i.png
    2016-11-20g.png

    Features:
    * Fully Unity + UNET based
    * Same Scripts for Client & Server
    * Infinitely huge Worlds
    * Procedural Generation via Perlin Noise
    * Structure Generation: Trees, etc.
    * 100% Pseudo Random
    * First Person Movement
    * Player Health, Damage, Defense, etc.
    * Voxel placement and destruction
    * Crafting
    * Dynamically loaded Chunks
    * Highly optimized via Local Occlusion
    * Smooth World (Un)Loading via Coroutines
    * Database to save players and world
    * Uses Unity's new UI system
    * Beautiful Textures
    * Local, Whisper, Info Chat
    * Items & Item Drops
    * Only 2600 lines of carefully crafted C# Code
    * Server can run on Linux in Headless mode
    * Login Panel
    * Start as Host/Client/Dedicated
    * Network Time Synchronization
    * Platform Independent
    * Mobile Support
    * Free of Deadlocks & Race Conditions
    * A Patcher is available separately

    Roadmap:
    • V1.0 [released 2016-12-12]
      • First release with a whole lot of features.
    • V1.1 [released 2016-12-20]
      • Upgrade to Unity 5.5.0p1 for important bug fixes
      • item.template property added
      • Inventory adding helper functions added
      • Player item drop pickup uses InventoryAddAmount helper function now
      • ItemTemplate uses ?? operator for cache initialization now
      • NetworkTime.time added
      • Database CharacterLoad/Save settings simplified via object initializer
      • Database CharacterCreate simplified via ternary operator
      • Extensions.FindRecursively simplified by using Array.Find
      • Extensions.FindObserver removed because it's not needed right now
      • PlayerChat syntax improved
      • TestMeshCopyText target renamed to source for consistency
      • TextMeshCopyName uses SerializeField instead of public now for consistency
      • Utils.AnyKeyup and Utils.AnyKeyDown use Linq.Any extension now
      • Utils.ClosestDistance simplified
      • Utils.GetAxisRaw syntax improved
      • GUIConsole improved
      • UIDragAndDropable syntax improved
      • NameOverlays made shaper
      • All NetworkMessage classes are public now
      • Entity.animator caching
      • UIChat isn't shown in login scene anymore
      • UIToolbar isn't shown in login scene anymore
      • UIChat.AutoScroll is faster now
      • UIChat.keepHistory added
      • 'var' is not used for simple types anymore
      • Utils.ClampLong/MinLong/MaxLong removed
      • Splash screen animation set to static
    • V1.2 [released 2016-12-25]
      • Bottom layer is undestroyable now. Fixes all kinds of issues.
      • NetworkManager.IsValidCharName fixed
    • V1.3 [2017-01-09]
      • Upgraded to Unity 5.5.0p3 for important bug fixes
      • NetworkManager configuration improved for sending huge amounts of messages
      • NetworkName uses unreliable channel now
      • All player commands use the unreliable channel now
      • PlayerChat component and all commands, targetrpcs and clientrpcs use the unreliable channel now
      • Entity.RpcShowDamagePopup uses the unreliable channel now
      • Removed UI Chat comment
      • Dedicated server fixed tick rate
    • V1.4 [in development]
      • Upgraded to Unity 5.5.1. Several variables were renamed, especially in the UI scripts. Make sure to properly assign each script's variables in the Inspector when upgrading your custom projects.
      • Utils.IsNullOrWhitespace comment typo fixed
      • UI Popup text color set to black so that it's always visible
      • Removed Networkmanager database header outdated comment
      • Utils.PrettyTime and ClosestPointOnBounds removed because they aren't needed
      • GUIConsole smaller improvements
      • UIChat simplified. Using more literal variables now
      • UIDragAndDropable improvements
      • UIHearts entry renamed to slot
      • UIInventory simplified. Uses UIInventorySlot script for easier component access now
      • UIKeepInScreen r is now rect
      • UILogin simplified
      • UIPopup simplified
      • UIToolbar simplified
      • Player: simplified some array initializers
      • Utils.IsPointerOverGameObject now works on mobile too
      • NetworkManager simplified
      • PlayerChat simplified and renamed to Chat
      • Item, ItemTemplate use more literal variable names now (boostsHp is now boostsHealth etc.)
      • Entity, Player use more literal variables now (hp is now health etc.)
      • Voxel hp renamed to health
      • Database idx renamed to index
      • PlayerChat OnStartLocalPlayer Client tag removed
      • PlayerEquipmentLocation renamed to EquipmentLocation
    • V1.5 [released 2017-08-23]
      • Upgraded to Unity 2017.1.0p1
      • PlayerDndHandling moved into Player class
      • Item.ToolTip uses StringBuilder for performance
      • Login button rapid clicking bug fixed
      • Player.onlinePlayers dict added for performance
      • NetworkManager initialization moved from Awake to Start
      • Inventory moved from Player to Entity
      • Entity components made public to be assigned in the Inspector. Reassign them in the Inspector when updating.
      • NetworkManager GlobalConfig threadpoolsize increased from 1 to 3
      • NetworkManager ConnectionConfig optimized
      • Entity.InventorySlotsFree improved
      • FaceCamera only updates while visible
      • NetworkProximityCheckerCustom only checks player layer now
    • V1.6 [released 2017-11-18]
      • Drag and Drop fixed
    • V1.7
      • Upgraded to Unity 2017.1.2p3
      • Name overlays are now udpated in Entity.UpdateClient
      • Player: public chat component instead of GetComponent call
      • Chat: public player component instead of GetComponent call
      • UIChat: AddMessage keepHistory check deletes half the history each time to avoid lag
      • Entity.IsWorthUpdating made virtual
      • Player.Start: equipment setup moved to OnStartClient so it's not done on the server anymore
      • Changed all Scrollbar movements to clamped
      • Entity.RpcShowDamagePopup improved
      • NetworkTime fixed
      • NetworkManager universal quit function to also work in Editor
      • UnityVersionCheck added so people know the recommended Unity version for VOXL
      • Removed old equipment update workaround for Unity 5.6
      • Player.equipmentTypes+Locations now in one struct
      • Player.OnDragANdDrop inventory slot to inventory slot uses configurable keys now
      • NetworkManager RegisterHandler calls moved to OnStartServer so that reconnecting works
      • Database CharacterLoad: health is assigned after everything else was loaded
    • V1.8
      • Upgraded to Unity 2017.4.1 LTS
      • Removed and added NetworkTransform component to Player prefab again. Fixes a bug where movement wouldn't sync to the server from build clients.
    • V1.9
      • Upgraded to Unity 2018.3.6 for significant performance increase
      • Upgraded from UNET to Mirror for significant performance increase
      • World Generator: default view range in chunks increased to 4 thanks to Unity 2018 and Mirror performance improvements
     
    Last edited: Apr 30, 2019
    nixter likes this.
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    No biomes supports?
     
  3. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,533
    hmm if the price is cheap enough I might grab it to take a look at some bits of it ..

    but as far as the voxel engine it doesn't really seem that performant (not sure if its the webgl build or that you coded it so that new chunks are rebuilt multiple times per chunk for the row building effect hard to tell)... I'm also already using another voxel framework for a game but have sunk more time on improving its performance and adding worldedit support so will have to see.

    I think most would love a fully featured minecraft framework to build there own a game on top of, but so many of these voxel projects fall so short in so many areas, so its nice to see a package that actually tries to put together a bigger part of all the components someone might need to get started without wasting time reinventing the wheel on things

    As a suggestion block rotations, ie like the log placement going horizontally/vertically on player placement angle.
    Water block is seen as a solid, can't place block in it only on it
    Fixing the water faces when next to same water block so they are not added.

    Some are just little things many could add/fix themselves and others not so simple. But its really the performance and how well it works for me , any parts of the voxel generation done on another thread?
     
  4. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    So I can use this and your ummorpg together and have a third-person mmorpg minecraft a-like? Do you provide tutorial for a combination of both?
     
  5. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    what are biomes?
     
  6. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    For example, some areas could be deserts while others could be ice regions.

    Not in V1.0, I really want to get VOXL to the store first. I do know how to implement biomes though, so it's very likely that we will see them in the future. I added it to the roadmap too.

    I don't have any combination tutorials right now, because things change too often. You should probably pick one (uMMMORPG/uMOBA/VOXL) and then base your game on that and copy features from the others if needed.

    Release price will be $80.

    About performance: there are a few more optimizations that I will implement, but the main performance cost is UNET right now. You will see this in the profiler too. The NetworkProximityChecker and NetworkServer have to go through a lot of voxels. There might be ways to speed this up more too, will have to dig through the HLAPI source a bit more / perhaps talk to a UNET developer. Note that the alternative is to not attach a NetworkIdentity to every voxel and do all the synchronization manually. This would be faster, but it would also be much more complicated. I really want this to be as simple as possible, so people can learn how to create voxel worlds with UNET, without getting too frustrated with it.

    About Minecraft clones: I also noticed that most other voxel assets on the store didn't have any networking and were mostly for rendering. Adding multiplayer is the hard part, that's what VOXL is trying to solve.

    About your suggestions: will keep them in mind. I wanted to get the core features on the store first before I put more work into it.

    About threading: UNET will use multiple threads very soon: https://forum.unity3d.com/threads/new-multiplayer-transport-release.435133/ . This should be a great performance boost already.
     
    nixter likes this.
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Here is another screenshot with chunks and local optimization:
    2016-11-20j.png

    The yellow boxes are the chunks that are automatically built around players. Those are the only parts of the infinite world that are currently ingame.

    At the bottom left you can see the local optimization, where all voxels that have 6 direct neighbors are automatically hidden. This is a huge performance improvement, because we wind up only drawing the surface of the world and not the thousands of voxels below it.
     
  8. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    How easy is it to add our own custome blocks, items, etc
     
  9. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Last edited: Nov 23, 2016
  10. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    Ok thanks. I will check it out when i get off work.
     
  11. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Sure. It's not on the store yet by the way, I am still waiting for the Asset Store team to review it. Should probably be done by next week I hope.
     
  12. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    This is why i will be purchasing this asset!
     
    mischa2k likes this.
  13. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    any plans to integrate photon instead of unet
     
  14. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Not at the moment, I really wanted to use Unity's native networking system for this.
     
    pushingpandas likes this.
  15. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    I hate Photon! Why always use third-party-solutions ...
     
  16. toddkc

    toddkc

    Joined:
    Nov 20, 2016
    Posts:
    207
    That's it exactly, and why this looks amazing! It all seems so easy until you try and add multiplayer...
     
  17. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    To keep everyone up to date: VOXL is still being reviewed by the Asset Store team. They must be very busy this time of the year.
     
  18. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    damn it takes too long. :(
     
  19. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    It will come!
     
  20. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    +1
     
  21. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: VOXL V1.0 is now on the Asset Store: https://www.assetstore.unity3d.com/en/#!/content/75829 !

    Note that the Server & Play mode won't be as fast as when just connecting to a dedicated server with a client.

    The next update will have code improvements that I found while it was pending review.
     
    Last edited: Dec 12, 2016
  22. MakeGames2

    MakeGames2

    Joined:
    May 23, 2016
    Posts:
    82
    This actually looks pretty nice. I have some questions.
    Is there any built in way to smooth the cubes out?
    Can you explain more about how the inventory works?
    What about integration with Inventory Pro, uConstruct, and UMA?

    Thanks!
     
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Thanks.
    What do you mean with smooth the cubes out? They are just a 3D model if that's what you are asking. You can replace it with a rounded corner cube for example.

    The inventory uses UNET's SyncList and Unity's new UI system for drawing.
    You can modify the looks of it easily. Not sure about third party assets though, it's really all about those SyncLists.

    Let me know if you have any more questions.
     
  24. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    Does this support webgl since unet doesnt support webgl??
     
  25. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    UNET does support WebGL. You can even try the WebGL demo: https://noobtuts.com/_builds/unity-VOXL/ . WebGL is only for clients though, so you can't host a server with WebGL - which wouldn't be very wise anyway.
     
  26. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    I already tried ur demo. I opened 2 instances of it and i cant see each other even tough i was in same place
     
  27. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes, the demos are separate from each other, you won't see someone else. I do this in my other uMMORPG and uMOBA packages too.

    There is a reason behind this: the demo should be available 100% of the time if someone is interested in the package. If I run them on a dedicated server, people could see each other. But then the server might need restarts every now and then, security updates, bills to pay, etc. It's just easier this way.

    If you really need to test it with two people I can send you a build for Linux/Windows/Mac if you want.
     
  28. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    I wana know if u can play with other ppl in webgl.
    If yes how easy it is to set this up??
     
  29. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Enable 'use Websockets' in the NetworkManager, then build the server for a windows/linux/mac server (preferably headless mode linux), then build the client for WebGL. Done.
     
  30. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    I am not well versed with unet.
    So how do i build server for windows??
     
  31. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You go to File->Build Settings.., select Windows, press the Build button, done.
     
  32. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    So u create client and sever same way. So when u click on dedicated server button it becomes dedicated server and others can join and play right??
     
  33. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes, exactly. Thanks to UNET.
     
  34. MakeGames2

    MakeGames2

    Joined:
    May 23, 2016
    Posts:
    82
    Thanks for the reply!

    I meant something like marching cubes or dual contour but I guess that's something that would have to be added then. I think it's more complicated than just replacing the models but also replacing the generation algorithm to make it appear like smooth terrain instead of cubes. I guess it would be a client side thing based on the SyncLists.
     
  35. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Might be possible, might work client sided too. Not really a goal right now though, so you'd definitely have to try that yourself.
     
  36. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Progress Info: V1.1 was submitted for review:
    • Upgrade to Unity 5.5.0p1 for important bug fixes
    • item.template property added
    • Inventory adding helper functions added
    • Player item drop pickup uses InventoryAddAmount helper function now
    • ItemTemplate uses ?? operator for cache initialization now
    • NetworkTime.time added
    • Database CharacterLoad/Save settings simplified via object initializer
    • Database CharacterCreate simplified via ternary operator
    • Extensions.FindRecursively simplified by using Array.Find
    • Extensions.FindObserver removed because it's not needed right now
    • PlayerChat syntax improved
    • TestMeshCopyText target renamed to source for consistency
    • TextMeshCopyName uses SerializeField instead of public now for consistency
    • Utils.AnyKeyup and Utils.AnyKeyDown use Linq.Any extension now
    • Utils.ClosestDistance simplified
    • Utils.GetAxisRaw syntax improved
    • GUIConsole improved
    • UIDragAndDropable syntax improved
    • NameOverlays made shaper
    • All NetworkMessage classes are public now
    • Entity.animator caching
    • UIChat isn't shown in login scene anymore
    • UIToolbar isn't shown in login scene anymore
    • UIChat.AutoScroll is faster now
    • UIChat.keepHistory added
    • 'var' is not used for simple types anymore
    • Utils.ClampLong/MinLong/MaxLong removed
    • Splash screen animation set to static
     
  37. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    3 things with Voxl:

    1. i had to remove !Utils.IsNullOrWhiteSpace(id) from IsValidCharName() inside NetworkManagerSandbox.cs otherwise in a fully built client / server setup clients get "invalid id" popups.

    2. in a headless linux setup, cpu pegs at 100% with a single client. (same server that i use for uMMORPG/uMOBA).

    3. in a fully built client / server setup, some blocks when destroyed doesnt get picked up or takes a few minutes to show up in your inventory (but i think this is due to issue #2 with the CPU).

    otherwise, im loving it!
    -J
     
  38. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    also wanted to add world persistence issue, seems after i logout and log back in blocks get shifted, example would be a tunnel i built, i logged out logged back in and the whole had no texture and a tree was next to it? (this is only in fully built client /server linux headless server.
     
  39. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    1. I just tested it with a fully built client and server setup and couldn't reproduce it. Was there anything in the player.log (https://docs.unity3d.com/Manual/LogFiles.html)? And what was the name you entered?

    2. Could you try Unity 5.5.0p1? Also is the CPU at 100% when no one is logged in? And does it also happen in a normal build?

    3. This is because of 2.

    Can you test this a bit more and see if the trees have the same position after saving and loading or not? And perhaps make a screenshot of that tunnel without textures?


    Also did you modify anything? Or got any UNET errors?
     
  40. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    @vis2k

    Sorry i should have been a little more verbose:

    Fresh VOXL install no changes.

    1. If you build and test locally ( on same desktop/laptop ) works fine, if you build a dedicated Linux Headless server and run it on its own hardware and build a client (windows, mac or linux) you will get the "invalid id" when trying to connect remotely from any of those clients, otherwise it works fine if you run "dedicated server" and build a client locally.
    2. i have tried 5.5.0p1 and p2, the moment you connect with a client the cpu goes to 100%. Only when a client is connected.

    ill start to add more debug.log's and see what i can find.

    thanks,
    -J
     
  41. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    The "invalid id" bug is fixed, great find.

    The world persistence issue is fixed too.

    The 100% cpu usage for headless mode should be normal, since Unity will always try to get as many FPS as possible. You should have 100% cpu usage for a normal build too, unless your enable VSync.
     
  42. jagatai33

    jagatai33

    Joined:
    Feb 2, 2016
    Posts:
    165
    are these changes in v1.1?
     
  43. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Update: V1.1 is now on the Asset Store:
    • Upgrade to Unity 5.5.0p1 for important bug fixes
    • item.template property added
    • Inventory adding helper functions added
    • Player item drop pickup uses InventoryAddAmount helper function now
    • ItemTemplate uses ?? operator for cache initialization now
    • NetworkTime.time added
    • Database CharacterLoad/Save settings simplified via object initializer
    • Database CharacterCreate simplified via ternary operator
    • Extensions.FindRecursively simplified by using Array.Find
    • Extensions.FindObserver removed because it's not needed right now
    • PlayerChat syntax improved
    • TestMeshCopyText target renamed to source for consistency
    • TextMeshCopyName uses SerializeField instead of public now for consistency
    • Utils.AnyKeyup and Utils.AnyKeyDown use Linq.Any extension now
    • Utils.ClosestDistance simplified
    • Utils.GetAxisRaw syntax improved
    • GUIConsole improved
    • UIDragAndDropable syntax improved
    • NameOverlays made shaper
    • All NetworkMessage classes are public now
    • Entity.animator caching
    • UIChat isn't shown in login scene anymore
    • UIToolbar isn't shown in login scene anymore
    • UIChat.AutoScroll is faster now
    • UIChat.keepHistory added
    • 'var' is not used for simple types anymore
    • Utils.ClampLong/MinLong/MaxLong removed
    • Splash screen animation set to static

    Will be in V1.2!
     
    jagatai33 likes this.
  44. Cassiopeiae-73

    Cassiopeiae-73

    Joined:
    May 2, 2016
    Posts:
    6
    can you add a fly mode for the player? Thanks in advance :)
     
  45. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    If a few more people are interested in that then maybe yes.
    For now you could modify the character controller in the Inspector (e.g. gravity).
     
  46. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Merry christmas everyone. VOXL V1.2 is now on the Asset Store with some important bug fixes:
    • Bottom layer is undestroyable now. Fixes all kinds of issues.
    • NetworkManager.IsValidCharName fixed
     
  47. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    Add Players animation. add firearms. bow. guns. friendly animals. agresive animals. hungry. Armor.
     
  48. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    One step after another :)
     
  49. freedom667

    freedom667

    Joined:
    Sep 6, 2015
    Posts:
    425
    Does this asset only work in games like minecraft? I want to make an CO-OP game for example, Would I be able to use it?
     
  50. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Can you go more into detail? You can definitely play with two people together in a minecraft like world.