Online Survival Game

This is Testbuild, an online game prototype I have made in my spare time. It is inspired by survival games where you collect materials and build. This is more of a technical demo and might not be much of a game, but I think it has some interesting systems that I want to show in my portfolio.

Features

This project was made with Unity's old networking solution UNet. Most features can be seen in the GIF at the top, but here are is a list of some of the more interesting stuff I made for this project:

  • Weapon and health system.

  • An inventory that stores building materials and a hotbar with 3 spaces.

  • Building system:

    • Uses snap points to make it easier to build.

    • Structures cost materials collected from trees, rocks and bushes.

    • Menu with info of the different structures.

  • Items:

    • Can be dropped and picked up from the ground.

    • Equipped item is displayed on the player model.

    • Actions are synced with first person perspective animations.

A house built with the game's building system. The door is just for decoration, it does not actually work.

Building System

Players can build by collecting materials dropped from trees, bushes and rocks.

The picture here shows a floor piece with its snap points. The pink ones are for walls to snap to, the yellow are intended to be for pillars and the turquoise are for other floor pieces.

When the player wants to build, a ray gets sent out from the camera and a preview of the structure they want to build will be shown where the ray hits. If the ray hits any of the green boxes, the preview will be placed at the corresponding snap point.

Items and Weapons

There are weapons and healing items and their actions are synced with their animations. When the player picks up or switches to another item, a function runs on all connected clients that replaces the model in the hand of the third person model with the newly equipped item.

The first person model is just a copy of the third person model, but the hands are more accurately positioned and everything else is scaled down.