A simple save system in Unity

Saving game data is a task that I need regularly. Using serialization and writing data to a file is an approach that I have used much, but that does not work in WebGL builds. Instead, I wrote data in a PlayerPrefs string. In this way I do not need to keep a details about what objects have a save data to delete or find all save data. The XML string stored contains everything.

Read more

Tutorial: 1st-person sneak in Unity 5, part 8

It is time to create a start menu for the game. For that, we need a scene. After creating the scene, rename the scene file to “start_screen” or something like that.

(Scroll down for the links to previous parts of this tutorial.)

Add the scene to the build settings (File->Build Settings…)

Make sure that start_screen scene is scene number zero (that scene will be loaded when the game starts).

Read more

Tutorial: 1st-person sneak in Unity 5, part 5

This part adds logic for the PC and keep track of things such as health, dying. I also add functionality for invisibility (that have already partly added in Guard class).  I also add HUD using the new GUI system to show health and energy (that is used to maintain invisibility).

Previous parts:

Read more

Tutorial: 1st-person sneak in Unity 5, part 2

The first part of tutorial: /2015/05/07/tutorial-1st-person-sneak-in-unity-5-part-1/

The guards needs to be able to observe their surroundings so we need a perception system. I want to make agent not to see its back, but sensing if someone is really close and have some peripheral vision with limited range (cf figure below). Also, guard should not be able to see through obstacles.

Read more