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

[RELEASED] Ultimate Survival - The Complete Survival Template

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

Thread Status:
Not open for further replies.
  1. Wampster

    Wampster

    Joined:
    Jul 22, 2014
    Posts:
    7
    That's quite amazing. Amazing that all he has done is moved the vitals UI and changed their icons and calls it his own game!

    It's a great framework, but we still have to make our own game from the framework. It's kind of embarrassing for all of us, to see this.
     
  2. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    522
    It is the same guy as the first flip (Lone Survivor), he even has the same HUD as his last change.
     
    Last edited: Mar 22, 2017
  3. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    522
    I was editing the next tutorial video tonight, but its 1am and I need to sleep!

    The video is on adding custom building pieces for those who havent tried and need some help. It is very easy to do, just can be a bit fiddly to get objects perfectly lined up.
     
  4. Wampster

    Wampster

    Joined:
    Jul 22, 2014
    Posts:
    7

    Last time? "Lone Survivor"? I looked through this "developer's" profile in steam. "Empires" is "Lone Survivor" re-titled. Perhaps what you should have said is that it's the same game. He's merely changed the name, I think.

    I'm curious to know the thoughts of Winterbyte regarding this.
     
  5. luis29vm

    luis29vm

    Joined:
    Oct 25, 2016
    Posts:
    164
    Hello I'm looking to buy this asset , I have questions can I use 3D person like RPG game? I'm not sure if this is possible or just in 1er person? Also is the game ready for multiplayer? Thank you guys looks very nice.
     
  6. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    This is really cool man!

    Good work and keep it up. I purchased today and looking forward to all your updates. I'm going to test this on mobile and see what I can get working.
     
    AngryPixelUnity likes this.
  7. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Third-person mode is not in the asset now, but it will be in version 0.3 :)
    The asset is not totally ready for multiplayer (you have to code and modify some scripts), BUT the 0.3 version will bring multiplayer as well.
    See the roadmap: https://trello.com/b/gmNow8UL/ultimate-survival
     
  8. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    522
    Yes i meant same as Lone Survivor, It gets difficult to keep up with all the different asset flips.
    By the way, looks like you quoted the wrong message :)
     
  9. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    @Winterbyte312
    1) When you have a chance, can you mke the loot of AI random like trees and rocks? What I'm trying to say is to add a random slider and a min/max of each loot drop?

    2) Is there an option that makes tress respawn again like AI? I haven't seen anything like that for trees and rocks.


    Also, I really think this is perhaps one of the best assets for Unity. Don't think that every time I write about a bug i found or a possible addition is to complain. I just really want this to succeed and be top notch.
     
  10. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Hey Kenny, both of them are on Trello and coming in v0.2.
    We appreciate your feedback a lot, thank you. We expected many more "complaints" to be honest, considering this is the first version. But so far the asset has been pretty stable, all considered.

    Keep them coming, you're making the asset great.
     
    ShatterGlassGames likes this.
  11. Wampster

    Wampster

    Joined:
    Jul 22, 2014
    Posts:
    7
    Yes, I did quote the wrong message. As you might notice from my post count, I am usually a lurker. This is my first time in many years to reach out to a community on the Internet. I'm just that excited about this asset. I am not used to using forums. I usually just study tutorials and read the documentation alone.

    The roadmap looks great. I am very eager for 0.3. If I was a decent coder I would help just to get it ready!

    Sorry that I haven't got back to you about Tenkoku Dynamic Sky. I have been having numerous problems with Suimono and Tenkoku. Neither is importing correctly and I don't even know where to begin trying to get them both working.
     
    AngryPixelUnity likes this.
  12. Misiek08

    Misiek08

    Joined:
    Aug 5, 2013
    Posts:
    4
    Is it possible to release version like 0.15 or anything before 0.2 without singletons? It will be much easier to add multiplayer then and I don't want to use UNET to be honest. Not in the long plans.

    This asset looks great, it has great possibilities, but I don't want to make anything bad like the mentioned game from Steam and those circular singleton dependencies are crazy in terms of multiplayer :)
     
  13. Wampster

    Wampster

    Joined:
    Jul 22, 2014
    Posts:
    7
    Why not UNET? What is your alternative plan? I have used UNET a couple of times and it's good for me. I prefer it to photon since Unity 4.6.

    Winterbyte - What networking method are you planning to implement?
     
  14. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Hey, we're getting rid of singletons in v0.2. Is that too late for you? :)

    We haven't made any plans on networking, we'll see at that point when we start v0.3 :)
     
  15. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    522
    Hi Wampster, Photon is good and has long history of dev & support, however the official networking solution from Unity can only grow from strength to strength.
     
  16. TheMessyCoder

    TheMessyCoder

    Joined:
    Feb 13, 2017
    Posts:
    522
    Hi all, sorry for delay was a little more than a week this time (I try to upload 1 Ultimate Survival video a week).

    Tutorial #8 on how to create a Survival Game with unity3d using Ultimate Survival

    How to craft & build a House
    It is a bit of a longer video than usual, but a lot of fun and easy to follow.




    If you want to see what stuff I am working on, don't forget to click on that follow button on twitter. https://twitter.com/theMessyCoder cheers :D
     
  17. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    There is a script called "ItemDragHandler", how does it work ?, I want to drag objects, is this script to be able to do this?

    And could anyone help me? I want to, after moving an object (prefab) and leave it in one place, to be able to change that prefab for another, using a key, would be of great help, thank you very much!

    sorry, my inglish
     
  18. UltraTM

    UltraTM

    Joined:
    Dec 8, 2013
    Posts:
    221
    i also cant say anything again unet. Its included an has an awesome performance. Also theres an asset on the store something with Master server.
    It looks great and i bought it for testing. Simple and easy to start with. You can host all by yourself. And when we get dedicated server support as told here a few pages before. With that asset its linux and windows.
    Photon we also used but i dont like the ccu limit and all that stuff you need to pay. Otherwise i dont know Photon Bolt if its free or not.
     
  19. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    The ItemDragHandler script handles dragging the item icons, not physical objects. Object dragging coming in v0.2.
     
  20. sebasfreelance

    sebasfreelance

    Joined:
    Aug 27, 2015
    Posts:
    240
    ok thx
     
  21. Will-D-Ramsey

    Will-D-Ramsey

    Joined:
    Dec 9, 2012
    Posts:
    221
    Any ideas on how to optimize the AI for alot of them. Im using a very big terrain with over 100 AI spawns, tried some LOD stuff and it didnt seem to work HALP!
     
  22. Sorrowthief

    Sorrowthief

    Joined:
    Dec 14, 2016
    Posts:
    48
    Ive been adding some building objects and ran into a problem I cant figure out. I have a spiked wooden fence that I have assigned 3 sockets on each side to. Two Sockets up top that allow another fence to be connected left or right and the 3rd lower socket allows straight connection. As you can see in the video I am able to overlap my fences and layer them up. This is not what I'm after. I have assigned box colliders and rigid bodies. I have rigid bodies and have messed with the size of the sockets colliders to no avail. Is there some way to specify that you can only place one piece on and not overlap them. I must be doing something wrong. I have noticed that if I use the default size of the socket colliders of 0.8 that it will not do it, but it will not let me place the turning fences either like that?

     
  23. Will-D-Ramsey

    Will-D-Ramsey

    Joined:
    Dec 9, 2012
    Posts:
    221
    It seems to be getting the same position but a different rotation, i'd check your ".positions" in your code.
     
  24. Sorrowthief

    Sorrowthief

    Joined:
    Dec 14, 2016
    Posts:
    48
    Hey thanks I in fact had 2 of my rotations wrong and I separated the distance of of my top two sockets on each side and it seemed to fix the problem. Thanks a lot!
     
  25. Will-D-Ramsey

    Will-D-Ramsey

    Joined:
    Dec 9, 2012
    Posts:
    221
    Glad it helped, nothing better than fixing a problem and getting to move on. Best of luck!
     
  26. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Hey Will, I gotta say the AI is not great in v0.1, we're working on it, v0.2 will bring a better AI, more optimized as well, the main problem is the garbage generated by their brain updating. Another thing we're gonna do is stop updating them once they're far enough from a player.
     
    UltraTM likes this.
  27. Sorrowthief

    Sorrowthief

    Joined:
    Dec 14, 2016
    Posts:
    48
    I have added a few new building pieces and I will get this error occasionally "
    [This HitBox is not under an entity, like a player, animal, etc, it has no purpose.
    UnityEngine.Debug:LogErrorFormat(Object, String, Object[])
    UltimateSurvival.HitBox:Awake() (at Assets/Ultimate Survival/Scripts/By Namespace/UltimateSurvival/Damage System/HitBox.cs:43)

    It only happens sometimes and not on other items. I have made Empty game object Hitbox set layer to Hitbox and made it a child of my main object. I can't figure out why I get this error sometimes as I have made a lot of pieces and it does not happen every time.
     
  28. txarly

    txarly

    Joined:
    Apr 27, 2016
    Posts:
    197

    Yes, i think to activate/deactivate ai from a distance from the player or area trigger is a good idea, specially for multiterrain.

    - How is going to work the world spawn of objects?

    Can I suggest spawning objects randomly or not from categories or adding them in a list and spawning in transform points, and after the player picks up them and after a time and a distance , that can be respawn again or not.

    thanks
     
  29. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    It happens because you need the EntityEventHandler script attached on the root.

    We're adding a respawn behaviour to AI & interactable objects.
     
  30. Sorrowthief

    Sorrowthief

    Joined:
    Dec 14, 2016
    Posts:
    48
    haha u r right I was so caught up on the Hitbox part I keep forgetting to add it. Thanks man! :)


    Edit: Under Placing-Needed Space can I add my new building objects to this list?
     
    Last edited: Mar 24, 2017
    AngryPixelUnity likes this.
  31. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    You also may want to look at Crux AI spawner. https://www.assetstore.unity3d.com/en/#!/content/79350

    It's from the same guys who make Emerald AI and Unistorm so they are not going anywhere. It looks really promising though and will support multiplayer as well. It can also be used with any ai system "I'm currently using ICE". The ICE developer has also stated the next release will support Ultimate Survival :)
     
    RobsonFMaciel likes this.
  32. Will-D-Ramsey

    Will-D-Ramsey

    Joined:
    Dec 9, 2012
    Posts:
    221
    Is ICE an AI spawning solution?
     
  33. tyger81

    tyger81

    Joined:
    Mar 24, 2017
    Posts:
    13
    Hello, I can not find the script of the menu Ctrl (Lock Cursor) to replace it with my menu, an idea of where to find it?
     
  34. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    Is there a trick to getting the Trees to be mineable when using Gaia? I've added the Tree Manager and the empty tree to my terrain. Cleared the trees then respawned them but no luck.
     
  35. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    AngryPixelUnity likes this.
  36. yummybrainz

    yummybrainz

    Joined:
    Jan 14, 2014
    Posts:
    69
    Never mind I figured it out. I had copied the empty Tree object to my terrain and the trasform position was offset :D
     
    AngryPixelUnity likes this.
  37. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    The lock cursor button is in the MouseLook script.
     
  38. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Hey guys, Jay AnAm started a tutorial series on Ultimate Survival, you might find it useful:
     
  39. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    A quick look of what I've been working on. Haven't done much because i'm waiting for the save feature to be implemented before i really go all out but so far everything is looking fine with the addition of this asset pack.

    .
     
  40. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    WOW! You're a master of Ultimate Survival haha :p The sounds are spot on, and you used a few US's features the way they were designed to be used. The only bad thing I see is the slot texture, I don't know why I find it a bit weird.
    Good job!
     
  41. ShatterGlassGames

    ShatterGlassGames

    Joined:
    Jan 14, 2016
    Posts:
    135
    thx

    I agree about what you said in regards the slot texture, I will be changing them because i really don't like them as well. I'm actually planning on replacing the entire UI look and feel.
     
    Last edited: Mar 25, 2017
  42. tyger81

    tyger81

    Joined:
    Mar 24, 2017
    Posts:
    13
    When I disable the mouse lock option, my perssonable can no longer turn ... an idea? (I handed the stock file its change nothing) there is a cache?
     
  43. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Replace the MouseLook script with this, and let me know if it works:


    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. namespace UltimateSurvival
    6. {
    7.     /// <summary>
    8.     ///
    9.     /// </summary>
    10.     public class MouseLook : PlayerBehaviour
    11.     {
    12.         [Header("General")]
    13.  
    14.         [SerializeField]
    15.         [Tooltip("The camera root which will be rotated up & down (on the X axis).")]
    16.         private Transform m_LookRoot;
    17.  
    18.         [SerializeField]
    19.         private Transform m_PlayerRoot;
    20.  
    21.         [SerializeField]
    22.         [Tooltip("The up & down rotation will be inverted, if checked.")]
    23.         private bool m_Invert;  
    24.  
    25.         [SerializeField]
    26.         [Tooltip("If checked, a button will show up which can lock the cursor.")]
    27.         private bool m_ShowLockButton = true;
    28.  
    29.         [SerializeField]
    30.         [Tooltip("If checked, you can unlock the cursor by pressing the Escape / Esc key.")]
    31.         private bool m_CanUnlock = true;
    32.  
    33.         [Header("Motion")]
    34.  
    35.         [SerializeField]
    36.         [Tooltip("The higher it is, the faster the camera will rotate.")]
    37.         private float m_Sensitivity = 5f;
    38.  
    39.         [SerializeField]
    40.         [Range(0, 20)]
    41.         private int m_SmoothSteps = 10;
    42.  
    43.         [SerializeField]
    44.         [Range(0f, 1f)]
    45.         private float m_SmoothWeight = 0.4f;
    46.  
    47.         [SerializeField]
    48.         private float m_RollAngle = 10f;
    49.  
    50.         [SerializeField]
    51.         private float m_RollSpeed = 3f;
    52.  
    53.         [Header("Rotation Limits")]
    54.  
    55.         [SerializeField]
    56.         private Vector2 m_DefaultLookLimits = new Vector2(-60f, 90f);
    57.  
    58.         private float m_CurrentRollAngle;
    59.         private bool m_InventoryIsOpen;
    60.    
    61.         private Vector2 m_LookAngles;
    62.  
    63.         private int m_LastLookFrame;
    64.         private Vector2 m_CurrentMouseLook;
    65.         private Vector2 m_SmoothMove;
    66.         private List<Vector2> m_SmoothBuffer = new List<Vector2>();
    67.  
    68.  
    69.         private void Start()
    70.         {
    71.             if(!m_LookRoot)
    72.             {
    73.                 Debug.LogErrorFormat(this, "Assign the look root in the inspector!", name);
    74.                 enabled = false;
    75.             }
    76.  
    77.             InventoryController.Instance.State.AddChangeListener(OnChanged_InventoryState);
    78.  
    79.             Cursor.visible = false;
    80.             Cursor.lockState = CursorLockMode.Locked;
    81.  
    82.             m_LookAngles.y = m_PlayerRoot.localEulerAngles.y;
    83.         }
    84.  
    85.         private void OnChanged_InventoryState()
    86.         {
    87.             m_InventoryIsOpen = !InventoryController.Instance.IsClosed;
    88.  
    89.             if(m_InventoryIsOpen)
    90.             {
    91.                 Cursor.visible = true;
    92.                 Cursor.lockState = CursorLockMode.None;
    93.             }
    94.             else
    95.             {
    96.                 Cursor.visible = false;
    97.                 Cursor.lockState = CursorLockMode.Locked;
    98.             }
    99.         }
    100.  
    101.         private void OnGUI()
    102.         {
    103.             if(!m_ShowLockButton)
    104.                 return;
    105.  
    106.             Vector2 buttonSize = new Vector2(256f, 24f);
    107.  
    108.             // NOTE: While in Unity Editor, pressing Esc will always unlock the cursor.
    109.             if (Event.current.type == EventType.KeyDown && m_CanUnlock)
    110.             {
    111.                 if (Event.current.keyCode == KeyCode.Escape)
    112.                 {
    113.                     Cursor.visible = true;
    114.                     Cursor.lockState = CursorLockMode.None;
    115.                 }
    116.             }  
    117.  
    118.             if(Cursor.lockState == CursorLockMode.None && !m_InventoryIsOpen)
    119.             {
    120.                 if(GUI.Button(new Rect(Screen.width * 0.5f - buttonSize.x / 2f, 16f, buttonSize.x, buttonSize.y), "Lock Cursor (Hit 'Esc' to unlock)"))
    121.                 {
    122.                     Cursor.visible = false;
    123.                     Cursor.lockState = CursorLockMode.Locked;
    124.                 }  
    125.             }
    126.         }
    127.  
    128.         private void Update()
    129.         {
    130.             if(!m_ShowLockButton && Input.GetMouseButtonDown(0))
    131.             {
    132.                 Cursor.visible = false;
    133.                 Cursor.lockState = CursorLockMode.Locked;
    134.             }
    135.  
    136.             if(Player.ViewLocked.Is(false) && Cursor.lockState == CursorLockMode.Locked && !Player.Sleep.Active && Player.Health.Get() > 0f)
    137.                 LookAround();
    138.  
    139.             Player.ViewLocked.Set(Cursor.lockState != CursorLockMode.Locked || Player.SelectBuildable.Active);
    140.         }
    141.  
    142.         /// <summary>
    143.         /// Rotates the camera and character and creates a sensation of looking around.
    144.         /// </summary>
    145.         private void LookAround()
    146.         {
    147.             CalculateMouseInput(Time.deltaTime);
    148.  
    149.             m_LookAngles.x += m_CurrentMouseLook.x * m_Sensitivity * (m_Invert ? 1f : -1f);
    150.             m_LookAngles.y += m_CurrentMouseLook.y * m_Sensitivity;
    151.  
    152.             m_LookAngles.x = ClampAngle(m_LookAngles.x, m_DefaultLookLimits.x, m_DefaultLookLimits.y);
    153.        
    154.             m_CurrentRollAngle = Mathf.Lerp(m_CurrentRollAngle, Player.LookInput.Get().x * m_RollAngle, Time.deltaTime * m_RollSpeed);
    155.  
    156.             // Apply the current up & down rotation to the look root.
    157.             m_LookRoot.localRotation = Quaternion.Euler(m_LookAngles.x, 0f, m_CurrentRollAngle);
    158.  
    159.             m_PlayerRoot.localRotation = Quaternion.Euler(0f, m_LookAngles.y, 0f);
    160.  
    161.             Player.LookDirection.Set(m_LookRoot.forward);
    162.         }
    163.  
    164.         /// <summary>
    165.         /// Clamps the given angle between min and max degrees.
    166.         /// </summary>
    167.         private float ClampAngle(float angle, float min, float max)
    168.         {
    169.             if(angle > 360f)
    170.                 angle -= 360f;
    171.             else if(angle < -360f)
    172.                 angle += 360f;
    173.            
    174.             return Mathf.Clamp(angle, min, max);
    175.         }
    176.  
    177.         private void CalculateMouseInput(float deltaTime)
    178.         {
    179.             if (m_LastLookFrame == Time.frameCount)
    180.                 return;
    181.  
    182.             m_LastLookFrame = Time.frameCount;
    183.  
    184.             m_SmoothMove = new Vector2(Input.GetAxisRaw("Mouse Y"), Input.GetAxisRaw("Mouse X"));
    185.  
    186.             m_SmoothSteps = Mathf.Clamp(m_SmoothSteps, 1, 20);
    187.             m_SmoothWeight = Mathf.Clamp01(m_SmoothWeight);
    188.  
    189.             while (m_SmoothBuffer.Count > m_SmoothSteps)
    190.                 m_SmoothBuffer.RemoveAt(0);
    191.  
    192.             m_SmoothBuffer.Add(m_SmoothMove);
    193.  
    194.             float weight = 1f;
    195.             Vector2 average = Vector2.zero;
    196.             float averageTotal = 0f;
    197.  
    198.             for(int i = m_SmoothBuffer.Count - 1; i > 0; i--)
    199.             {
    200.                 average += m_SmoothBuffer[i] * weight;
    201.                 averageTotal += weight;
    202.                 weight *= m_SmoothWeight / (deltaTime * 60f);
    203.             }
    204.                
    205.             averageTotal = Mathf.Max(1f, averageTotal);
    206.             m_CurrentMouseLook = average / averageTotal;
    207.         }
    208.     }
    209. }
    210.  
     
  44. tyger81

    tyger81

    Joined:
    Mar 24, 2017
    Posts:
    13
    no work
     
  45. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Do you have Skype? if so, add my id and I'll help: cristian.pavel40
    Otherwise make a screenshot with your MouseLook script, or give me more info
     
  46. tyger81

    tyger81

    Joined:
    Mar 24, 2017
    Posts:
    13
    i not speak english ^^ But in writing if you want
     
  47. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    Yes sure, add me.
     
  48. tyger81

    tyger81

    Joined:
    Mar 24, 2017
    Posts:
    13
    Thank you Winterbyte312 for your help;)
     
    AngryPixelUnity likes this.
  49. tyger81

    tyger81

    Joined:
    Mar 24, 2017
    Posts:
    13
    I finally managed to remove the lock of the mouse, but when I place my script for the pause menu, when I resort from pause mode, the camera can not move any more, an idea?
     
  50. AngryPixelUnity

    AngryPixelUnity

    Joined:
    Oct 25, 2016
    Posts:
    816
    To lock the view, get the PlayerEventHandler component, and write: eventHandler.ViewLocked.Set(true);
     
Thread Status:
Not open for further replies.