Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Games [WIP] 2063: Haven

Discussion in 'Works In Progress - Archive' started by RaymondShooter, Feb 6, 2018.

  1. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10
    2063_haven_thumbnail.png
    2063: Haven
    is a 2D top-down multiplayer shooter game.

    Context:
    The name of it is based on a story set in a post-apocalyptic world plagued by infection. The world is left with the reanimated, mechanical droids and human survivors.
    Before the virus outbreak, a project called LIMB was in research to develop robots, seeking to use the mechanical beings to serve human and cope with various hazardous complex. The project had produced several droid models most of which were deployed under police control and were proved serviceable assets. As useful as those droids are, however, they failed to protect humanity when a type of virus emerged which later decimated the majority of human population.

    Development Stage:
    Although I initially planned to make a coop game based on the story, I figured that full-length campaign would be too difficult for me who had had no previous game-making experience. So I scaled down the project into a player-vs-player-vs-ai multiplayer game, and planned to make the story mode after I have the pvp mode stabilized. After almost a year I have finally cranked out a playable version that allow two players to connect through internet and play with each other.

    Design philosophy:
    I intentionally made the visual as simple as possible, trying to set up a beginner-friendly environment. No overwhelming GUIs, no complex rules, just shoot and win. I do realize that the in-game HUD is missing some information due to the visual simplification though, such as ammunition supply, experience bar etc. But do let me know what you think I should and shouldn't put in the HUD.

    Everything of the game is not finalized, but feel free to comment and tell me what you think is lacking from the game. A wishlist will be appreciated.

    2063_haven_gameplay2.png 2063_haven_gameplay3.png 2063_haven_gameplay1.png




    Here is a quick test play (Sorry about not having a video-editing software to do a fancy video-editing):
     
    RavenOfCode likes this.
  2. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10


    99 AIs test.
    AI strategy is still kind of primitive and linear right now. They tend to form a cluster as they don't have diverse plan for hostile encounters.

    All they can do are:
    -Go to random position when they are boring.
    -Look at corners when they are boring.
    -Go straight to enemies until they are in an effective shooting-range.
    -Go to remembered enemies.
    -Find cover while low on ammo.
    -Look at the direction of bullets that damaged them.
    -Track sound source.

    In a network environment AIs aren't primarily synchronized in transforms(only 2 position updates per second), but look-at positions and move-to-positions. The rest is calculated through each client side.
    The above behaviors are registered to fit this mechanic and are currently working well in multiplayer. However I have no clue how to implement complex AI behaviors using this synchronization method, such as moving in S to dodge bullet, and steering pass other AIs to prevent bumping each other.

    If you have any suggestion for implementing complex AI behavior or even an alternative network algorithm, please feel free to share! I would really appreciate any suggestion.
     
    Last edited: Feb 9, 2018
    RavenOfCode likes this.
  3. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10
    2063_haven_ai_steering.png
    An example would be like this. AI finds room to strike enemies instead of pushing its teammate forward. I saw this type of AI behavior in some strategy games such as starcraft. How is this done?
     
    RavenOfCode likes this.
  4. RavenOfCode

    RavenOfCode

    Joined:
    Apr 5, 2015
    Posts:
    869
    AI is a very complicated topic and I'm definitely not an expert on it. However, I did do a test on getting team formations to work a while back and I found it to be fairly easy with the system I used.

    My AI ran off a main script and a bunch of components. Each component had a rule (or set of rules) that said when they should run their action. The rules where generally things like distances, enemy locations, action priority, etc.; and the actions where the actual moving of the AI to do something, like a wander AI would make the AI wander as the action. My main AI script would simply select a component to run and then run it, once it ran it would find the next one to run and run that, and this would continue as the core loop. I used this system (rule --> action) because it allowed tons of flexibility and was fairly good in the performance department.

    Anyways, for setting up team formations I had a component that basically checked if allies where in the surrounding area (this was the rule) and if they where a formation would be selected from a list of formations (this was the action).
     
  5. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10
    Thanks for the thought. After getting lost in my code so many times, I find your technique well-organized and I like the idea of treating each behaviour as an individual object. I have been having troubles with code organization.
    For the formation, all I thought was letting individuals behave in certain ways in hope of having them act collectively. I should do a formation manager later.
     
    RavenOfCode likes this.
  6. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10


    Demo of the game's multiplayer feature and newly added zombies!
    The connection is quite bad, having 300 ping on the client regardless of the number of NPCs and players. Does any one know why? I am using Unity free relay server and currently living in California. Is this due to my geometric distance to the server or my game?
     
    RavenOfCode likes this.
  7. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10


    Here are the shoving animations for human and robot characters. And there is now an audience mode for those who joined but didn't want to participtae in the fight.
     
  8. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10


    - Sun light cycle (sped-up one-day cycle into 60 seconds)
    - Chat box-
    - AI steering
    - Character movement smoothing
    - Dedicated server build
     
  9. RaymondShooter

    RaymondShooter

    Joined:
    Feb 6, 2018
    Posts:
    10
    It has been a while since last the last update.
    A lot of things have been added and updated. But since there are either things that may spoil the content or things that aren't visually-interesting, I may just write them down:

    - Added a new map, pvp_trainstation, which is a lot smaller than the one in previous videos but still of a medium-large size.

    - Added scoreboard; Each player's kills, deaths and latency are shown by holding down the tab key.

    - Added base structures. Each team spawn/respawn near the bases. Each member can expand its team's bases by dropping a new base (costing some money) in its current location, allowing other members to respawn there. Each base does, however, has health to it and can be destroyed by enemies. A team loses if either all respawn tokens are used or all bases are lost. Bases can also be used as a shield as bullet penetration doesn't work on base structure. Any ally to the base can walk through the base structure while enemies cannot.

    - Players are differentiated from NPCs with unique colors, though can be disabled for enemy team if a server variable is set, to prevent enemy players being snipped out from the rest.

    - Polished line-of-sight player vision for high & ultra graphic setting.

    - Bullet synchronization enhanced, each client across the network should be able to see the same bullet appearing at more accurate position at the same time stamp. This helps client player to be able to predict bullets better and take the right actions.

    - NPCs can steer apart from other NPCs so that they don't squish into a pile. The method used is to generate two line-cast sensors to detect obstacles, though this cost CPU a lot when more than 100 NPCs exist in the map. A suggestion of a better solution would be welcomed.

    - Two more non-traditional guns added.

    - Chatbox enhancement.

    - NPCs no longer has infinite ammo. They drop guns when ammo is out and start knifing people.

    Feel free to share any thoughts if any. Any feedback is appreciated.