Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Games [WIP] VRChat Clone in Unity3D

Discussion in 'Works In Progress' started by Glader, Dec 4, 2018.

  1. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    My Own VRChat-like Platform

    Hi guys, for awhile now I've been working on server/client network game emulation projects and over a long period was working on my own online game backend and networking. Originally I didn't know what it was going to be used for, just that I wanted to make a large online game.

    Now I know. I'm making a VRChat-like platform in Unity3D. VRChat proved that Unity3D was the best tool to deliver the ability to create custom content and download/load it at runtime.

    This isn't the first time I toyed with the idea, a long while back I put together a prototype for world uploading. Basically, AWS S3 + ASP Core + AssetBundles. Unity3D does the heavy lifting, you can watch that here:


    Two days ago I finally decided to seriously work on it and forked the project I was working on, based on GaiaOnline's intellectual property which I did not own but was using as a visual prototype for the project. Because of the previous work, progress is already far-ish along! I planned to have a proof-of-concept of networked VR in a day, and I'll have more information about that later.

    Enjoy this short video that recaps the work of the previous project, that this project is forked from, and the initial work done to create a VRChat type world.

     
    HeadClot88 likes this.
  2. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    Spent the day setting up world downloading, via asset bundles, in the current client. The client will select a character, request a session be created for it (if none exist) and then will go to the loading screen. When at the loading screen the client will send some requests to determine what zone/world it should be going to. With that information it can query the content server to get an AWS S3 download URL. Fun stuff!

     
    HeadClot88 likes this.
  3. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    I finally got around to making a "Networked VR Proof-of-Concept" video. This was hard to put together because I don't have VR. Required abit of testing with my friend. So, basically networked VR like VRChat is pretty easy and this proof-of-concept proves that it can and will be done for this project in the near-ish future. Exciting times!

     
    HeadClot88 likes this.
  4. HeadClot88

    HeadClot88

    Joined:
    Jul 3, 2012
    Posts:
    668
    Hey this is pretty neat!
     
    Glader likes this.
  5. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    Thanks! I'll have a new video out tomorrow about it, involving world downloading in the current client and moving between instance servers. (In VRChat this would be transfering between worlds)
     
    HeadClot88 likes this.
  6. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    Today I built the features required for authoritative zone/instance server registration on the "gameserver". These are headless/serverbuild Unity3D instances. I built a demo that showcases both the world downloading, AssetBundles via AWS S3, and joining and moving to different maps/instance servers. Each map shown is run by a seperate zoneserver and you can only see other people in the same instance as you, thought the video doesn't exactly prove that as the clients move together into worlds. I could have just created a second instance of the same map too, but thought it'd be more interesting to add 2 maps being downloaded at runtime!

     
  7. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    Put some time into networked voice chat. At first, I went the wrong route. So it took longer to implement than I wanted. However, voice is working over GladNet3 right now (only TCP) and eventually will be over a separate service using GladNet3 (R)UDP in the distant future. The voice integration was done using Dissonance Voice Chat for clientside audio data handling.

     
  8. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    Today is all about refactoring and addressing latent faults! For example, data races and threading issues. There hasn't been much safety in accessing resources entities are associated with. I'm introducing packet handler-level locking policies based on Nito.AsyncEx's AsyncReaderWriterLock. The concept is we need to not remove resources associated with an entity, this is sorta an ECS implementation, while handling a message related to them. Basically just covers the race condition of them disconnecting during handling, and whatever thread ends up doing the session cleanup and removal of the entity from the world.

    I'll also be addressing some design faults and missing features in GladNet3 to better support the cases of async session cleanup! Or, I may take the lazy way and work around the issue for now.
     
  9. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    Movement controls was something everyone complained about while testing the client. So, before public testing (which is soon) I decided to put a couple minutes into better clientside movement controls and supported networking. Here it is! Close enough to VRChat for now, though not exactly how they handle it.

     
  10. Glader

    Glader

    Joined:
    Aug 19, 2013
    Posts:
    332
    Added 3D/positional networked voice chat! Wasn't too much of a change, originally it just broadcasted voice that everyone could here. I've got a video demo of that here. Oh, and I'm now working on implementing custom avatar uploading + loading them into the client for everyone to see, so essentially model changing packets too and etc. Should be done within a couple days or sooner!