Search Unity

uSurvival Official Thread - Unity Multiplayer Survival Asset

Discussion in 'Assets and Asset Store' started by mischa2k, May 14, 2018.

  1. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Hotbar should be able to inherit from ItemContainer now. Will try soon.
    Yes, server still rejects some item usages because latency isn't constant, so sometimes the packet is received a few milliseconds earlier, and then it's rejected. Will need to do some research on how other games solve this.
     
  2. okumasama2

    okumasama2

    Joined:
    Aug 25, 2014
    Posts:
    7
    Hi. I have few basic questions about uSurvival and Mirror.

    I understand server hosting and client systems. In the actual product, when players connect to a server, they are assigned to a random room and the game starts with about 64 people, but in the uSurvival sample, there is only one room per server. How can I extend this network system to multiple rooms like PUBG?
    Is it possible to just edit the server part?
     
  3. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I never tried PUBG, but we have a List Server: https://mirror-networking.com/list-server/ where you can keep a list of running servers, and players can connect to any of them :)
     
  4. craftrap

    craftrap

    Joined:
    Apr 25, 2015
    Posts:
    30
    @vis2k#2357 ik and animation system is bad. You just used the upper body of the character's waist, ie arms and shoulders. When I activate the feet and body, the character trembles and does not walk properly. Example: For realism, the whole body needs to react when hitting a tree with an ax. But when I activate the underside, the character does not walk properly.
     
  5. okumasama2

    okumasama2

    Joined:
    Aug 25, 2014
    Posts:
    7
    Thanks I understand about its system.
    In the any survival game, dead player often leave off from the game and he might be the host. So I think host-migration is definitely necessary for this but I cant found the code in uSurvival. Do you know any host-migration code or module for Mirror?
    If there is any misunderstanding, please point it out.
    Thanks!
     
  6. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    We removed host migration from UNET (now Mirror).
    Reason being that host migration will always give bad gameplay experience - see Dota1 etc.
    Try to host on a server on the internet instead :)
     
  7. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    192
    I'm pretty sure he just wants to use this as a battle royale, and currently there is no info about how to do that with this asset.
     
  8. okumasama2

    okumasama2

    Joined:
    Aug 25, 2014
    Posts:
    7
    Thanks;)

    So, I want to implement battle royale system:
    - Every player joins a room randomly. (currently one room at one server in uSurvival Example )
    - First player may create a empty room.
    - Host on server.
    - So... how? Server makes virtual hosting server on every new room?

    I know old FPS network system, they often use several volunteers' servers in server list and players would select any of them.
    But this time I must prepare the all server and player should not be conscious of server existence.
    This may be a basic and silly question, but I would be very grateful if you could help me.
     
    Last edited: Mar 21, 2020
  9. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    There are several ways to do this. But it's really not a uSurvival problem, it's a network hosting problem.

    You could explain how people can host at home (port forwarding).
    You can use a list server for them to add their own server entry, so players can see it. Try https://mirror-networking.com/list-server/
    You can use a relay server so people can host at home without port forwarding. (we plan to release one for Mirror too)
    Or you can host the game on several of your own servers for players to connect.
     
  10. okumasama2

    okumasama2

    Joined:
    Aug 25, 2014
    Posts:
    7
    Thanks I'll check about network hosting.

    I just wonder that any of the games mentioned as examples in the description at Asset Store: DayZ, Rust, PUBG, Fortnite are hosted by servers in SOME way. None of these games should be a match that ends the moment the host drops his or her client.
    However, it is questionable that there is no information to extend nSurvival sample to the specification of these games. I don't think server lists or relay servers will make a technical contribution when you want to make these. Please tell me if there is any misunderstanding.
     
    Last edited: Mar 21, 2020
  11. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    DayZ doesn't have player hosted servers.
    They do what I recommend for uSurvival: rent a CPU on the internet, then run it there :)
    Google cloud/ aws, etc. all work
     
  12. okumasama2

    okumasama2

    Joined:
    Aug 25, 2014
    Posts:
    7
    "I" said so. Why can't you communicate at all?
     
  13. SirTwistedStorm

    SirTwistedStorm

    Joined:
    Sep 20, 2015
    Posts:
    192
    He wants to know the best way to have a master server to login to, so that you can form a party and then be matchmade into a server( Usurvival scene ) with 100 people. A battle royale addon on is listed but it's only the circle meaning no way to actually run a battle royale.
     
  14. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    Update beter Fps action or animation?
     
  15. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    What do you mean?
     
  16. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    Better character animation and better first-person animation.Add aiming,fire animation,reload?.run,walk.etc
     
  17. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You can replace all the animations.
    And yes I know they aren't very good. I just didn't have the money to buy better ones when I made uSurvival.
     
  18. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
  19. RelajoSoft

    RelajoSoft

    Joined:
    Apr 29, 2018
    Posts:
    23
    I dared to share this information on my facebook, I really hope that helps you to continue improving usurvival, I love this asset.
    Best regards
     
    Ronith and mischa2k like this.
  20. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    V1.75 pending review:
    • Anti Speedhack checks on server
    • Mirror updated to V13.0.2
    • CharacterController2k updated to V1.2
    • fix: https://github.com/vis2k/uMMORPG/issues/33 NetworkProximityGridChecker.OnDestroy only removes connection from grid if the identity is the connection's main player (not a pet that is owned by the player). Fixes a bug where despawning a pet would make all surrounding npcs/monsters disappear for a while.
    • fix: Latency UI is shown again
    • Apathy updated to latest version. Improves high CCU situations where previously error messages would be spammed way too much.
    • PlayerMovement.Update: isLocalPlayer check added
    • fix: PlayerMovement.FixedUpdate now calculates the correct velocity for combined moves. It was missing a fixedDeltaTime division.
     
    DBarlok likes this.
  21. DBarlok

    DBarlok

    Joined:
    Apr 24, 2013
    Posts:
    268
    Im planning on working on a game with uSurvival soon, thanks vis2k! I really admire what you did :)
     
  22. lcizzle

    lcizzle

    Joined:
    Jun 13, 2016
    Posts:
    18
    1.75 seems to have some weird issues in 2019.4.x.

    Not sure why you have Package Manager UI has a dependency. Package Manager UI looks to be a built in now so you force installing another one causes all kinds of editor issues and errors.

    Post Processing looks to be a depreciated package from the store and not one from the package manager. It works but not really optimal for a project start.

    Could you take a look? I did get it to finally work after removing the forced Package Manager UI dependency from installed packages.

    Edit: uMMORPG does the same thing. Force installs a very old Package Manager UI and TextMesh Pro packages.
     
    Last edited: Jun 13, 2020
  23. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I want to upgrade to 2019.4 LTS anyway, now that it's out. Will take a look.
     
  24. iraway

    iraway

    Joined:
    Dec 2, 2015
    Posts:
    12
    Any updates on 2019.4 LTS support for this? Thanks.
     
  25. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I am about to update all my assets to 2019.4 LTS yes.
    Some people reported crashes with 2019.4 on Unity's blog post so I am a bit hesitant still.
     
  26. iraway

    iraway

    Joined:
    Dec 2, 2015
    Posts:
    12
    The asset seems to work okay if I decline the requested package dependency on install so no rush for me at least, though having everything else checked would be great I have plenty of time for my project.
     
  27. KingLlama

    KingLlama

    Joined:
    Jul 18, 2015
    Posts:
    199
    Running into a issue with loading up the headless server on my vps.
    Code (CSharp):
    1. Mono config path = '/home/username/TSHeadless/TatteredSailsheadless_Data/MonoBleedingEdge/etc'
    2. Preloaded 'libnetwork.bindings.so'
    3. Initialize engine version: 2019.1.8f1 (7938dd008a75)
    4. Forcing GfxDevice: Null
    5. GfxDevice: creating device client; threaded=0
    6. NullGfxDevice:
    7.     Version:  NULL 1.0 [1.0]
    8.     Renderer: Null Device
    9.     Vendor:   Unity Technologies
    10. Begin MonoManager ReloadAssembly
    11. - Completed reload, in  0.147 seconds
    12. Stack overflow in unmanaged: IP: 0x55650d884f5a, fault addr: 0x7fd24c288fe8
    13. Uploading Crash Report
    14. StackOverflowException: The requested operation caused a stack overflow.
    15.   at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_array_new_specific(intptr,int)
    16.   at UnityEngine.UI.Image..cctor () [0x00006] in <e25f3429ffba4d908c6d3bfdcefb2d83>:0
    17. UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
    18. UnityEngine.DebugLogHandler:LogException(Exception, Object)
    19. UnityEngine.Logger:LogException(Exception, Object)
    20. UnityEngine.Debug:LogException(Exception)
    21. UnityEngine.UnhandledExceptionHandler:<RegisterUECatcher>m__0(Object, UnhandledExceptionEventArgs)
    22. System.Object:__icall_wrapper_ves_icall_array_new_specific(IntPtr, Int32)
    23. UnityEngine.UI.Image:.cctor()
    24.  
    25. (Filename: <e25f3429ffba4d908c6d3bfdcefb2d83> Line: 0)
    26.  
     
    Last edited: Jul 13, 2020
  28. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yep, that's a known Unity bug.
    While it says UI.Image, it's actually a PhysX bug that they never fixed, even though we begged Unity for years :)

    You have two options:
    a) Use exactly Unity 2018.3.6f1 - they introduced the bug when upgrading PhysX in 2018.3.7
    b) Use Unity 2019.4 LTS - it should be fixed there.
     
    KingLlama likes this.
  29. KingLlama

    KingLlama

    Joined:
    Jul 18, 2015
    Posts:
    199
    Yea, I found a older thread on it in which I upgraded to 2019.4 which is overall just better considering the framerate increase due to alot of the changes. Got the server up and running. Thank you!
     
    mischa2k likes this.
  30. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    Add AirDrop :)
     
  31. ParadoxSolutions

    ParadoxSolutions

    Joined:
    Jul 27, 2015
    Posts:
    325
    @vis2k uSurvival has features I don't want, removing them leads to a soft lock via the database and I have to reimport the asset.

    Say you create a character with the server and play, pick up some items, wait some time then exit playmode.

    Then go to the player prefab and say delete any component that has information stored in the database i.e. storage or hydration. You then can't log in because the editor will throw an error when the database can't link save data.

    The thing is the database just fails if a component is missing and I have no idea how to reset/clear the database during testing so I just reimport the asset.


    My game world is set in stages, players in the survival role have permadeath and need to make split second decisions, thus mechanics like hunger and the slot based inventory, storage don't make sense with the pace of the game.


    I guess what I need to know is how to isolate the networked character controller without breaking the web of dependency. Is there a character controller example that I can test with on vanilla mirror?
     
  32. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Check out the Database.cs file - remove the functions that you don't need and remove the tables if needed, then delete the old database.sqlite file once
     
  33. johny256

    johny256

    Joined:
    Mar 3, 2015
    Posts:
    258
    Next update.Update animation reloading guns and rifle.
    Update Aiming First person player.
    Add Dor key system or multiplayer.
     
  34. roger181078

    roger181078

    Joined:
    Jun 25, 2017
    Posts:
    3
    Greetings,

    Please excuse my English in advance, I use translator, my native language is Spanish.

    I love this asset. I'm not a professional programmer, but I like to program. I have developed a system to interact with vehicles, that I think works well.

    Among its main features:

    - Can be crafted and placed in the scene.
    - Synchronization of movement and sound.
    - Saving the location.
    - Turning on and off the lights and horn.
    - Vehicles can break down if they are damaged. They can also be destroyed.
    - After getting out of the vehicle, the position of the players is saved in the database.
    - If a player disconnects while driving, the vehicle does not disappear.
    - The player may die while driving (from hunger or thirst), this is contemplated, will respawn outside the vehicle.
    - If a zombie is chasing us and we get into a vehicle, he can't hurt us.

    I have seen several assets for sale in the Asset Store that add new functionality to uSurvival. My question, can I offer my work as an addon to uSurvival for sale in the store? I wanted to check here first in case there is a problem.

    Greetings to all, and best wishes.
     
    Last edited: Aug 20, 2020
  35. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Yes, but please name it 'Vehices for uSurvival' and not 'uSurvival Vehicles', otherwise people think it's from me :)
    And of course don't include uSurvival itself. Only your code/assets.
     
  36. roger181078

    roger181078

    Joined:
    Jun 25, 2017
    Posts:
    3
    Of course, I won't include anything from your package. I still have a few details to work out.

    Thank you very much. I'll share a video of the gameplay, so you can see how it works.

    Greetings, and again thank you. :)
     
    mischa2k likes this.
  37. roger181078

    roger181078

    Joined:
    Jun 25, 2017
    Posts:
    3
  38. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    V1.79 pending review:
     
    ekz likes this.
  39. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Hi vis2k, I am thinking of making a multiplayer survival game as well.
    Wondering before I purchase the following questions please:
    1. Is player movement 100% authoritative?
    2. Is gun shooting 100% authoritative as well? If so, how? Timestamp rollback? etc.

    Thanks so much! :)
     
  40. J_B_R_UnityDeveloper

    J_B_R_UnityDeveloper

    Joined:
    Oct 5, 2020
    Posts:
    7
    Good afternoon everyone. First of all sorry for my english translated with google. Second, I have several doubts about how to handle this project, since I have only been programming for a few months learning on my own. The problem at hand is to create an object (door), which can only be opened by the player who created it. In the Script that I include below, I get that the Server-Client only opens its door, but the clients open absolutely all of them. If someone can rewrite the Scrip with the enhancement, that would be of great help. Thanks for your cooperation.

    Script:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using Mirror;
    public class puerta : NetworkBehaviour
    {
    public float speed = 0.8f;
    public float time = 10;
    public float timeLeft;
    public float apertura = 80;
    public float cierre = 0;
    public float angle = 0;
    public Vector3 direction;
    public bool trigger;
    public GameObject objetoDrop;
    public GameObject objetoEstructura;
    public GameObject dueño;
    public GameObject UltimoJugadorEnLaZona;
    public bool aperturaPermitida;
    void Start()
    {
    angle = transform.eulerAngles.y;
    objetoEstructura.name = objetoDrop.name;
    }

    void Update()
    {
    if (dueño != null && this.UltimoJugadorEnLaZona.name == dueño.name && trigger == true)
    {
    aperturaPermitida = true;
    }
    if (aperturaPermitida == true)
    {
    open();
    }

    if (trigger == false)
    {
    timeLeft -= Time.deltaTime;
    if (timeLeft < 0)
    {
    timeLeft = 0;
    }
    }
    if (timeLeft == 0)
    {
    close();
    aperturaPermitida = false;
    }

    if (Mathf.Round(transform.eulerAngles.y) != angle)
    {
    transform.Rotate(direction * speed);
    }
    }
    void open()
    {
    angle = apertura;
    direction = Vector3.up;
    }
    void close()
    {
    angle = cierre;
    direction = Vector3.down;
    }
    void OnTriggerEnter(Collider other)
    {
    if (other.tag == "Player")
    {
    this.UltimoJugadorEnLaZona = other.gameObject;
    trigger = true;
    timeLeft = time;
    if (objetoEstructura.name == objetoDrop.name)
    {
    dueño = other.gameObject;
    objetoEstructura.name = objetoDrop.name + dueño.name;
    }
    }
    }
    void OnTriggerExit(Collider other)
    {
    if (other.tag == "Player")
    {
    trigger = false;
    close();
    }
    }
    }
     
  41. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I recommend doing a regular single player game first.
    If you have only been programming for a few months then diving deep into multiplayer games is crazy painful :)
     
  42. J_B_R_UnityDeveloper

    J_B_R_UnityDeveloper

    Joined:
    Oct 5, 2020
    Posts:
    7
    it is understood. thanks for the suggestion.
     
  43. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Hi vis, hopefully you just missed my question! I am curious to figure out these two answers being purchasing and fully diving into the package.
    1. Is player movement 100% authoritative?
    2. Is gun shooting 100% authoritative as well? And If so, how? Timestamp rollback? or how?

    Thanks!
     
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,694
    mischa2k likes this.
  45. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Yeah I asked this question twice and unfortunately that was on the 22nd of last month.
    Still no reply from anyone.
    Just thought I would get some communication if I used the forums instead.
     
  46. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Hmm... That's pretty disrespectful of vis2k to have enough time to drop a like on tony's comment but not want to answer two questions I have about his product.
     
  47. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Player movement is not 100% server auth yet. still need to check y (jumping etc.).
    Gun shooting 100% auth. But no timestamp rollback etc.
     
  48. iSleepzZz

    iSleepzZz

    Joined:
    Dec 23, 2012
    Posts:
    206
    Awesome, thanks! Really appreciate the answers!
     
  49. akke403

    akke403

    Joined:
    Jun 23, 2018
    Posts:
    4
    Is it possible to use implement your multiplayer solution to my single player game?
     
  50. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Possible but I wouldn't recommend it.
    It's easier to do multiplayer from the beginning.