Don't Walk By - 4

Don't Walk By - 4

Feb 13, 2020. | By: Evan Diamond
1 min

The fourth CGD blog post about Don’t Walk By

Overview

This week I added a camera touch system to the touch manager script as well as implementing a script to manage and spawn the pawns (previously called students). I also made a start on the density grid system.

Camera Touch

The camera system works by the user touching with two fingers and dragging to move the camera around the scene. In order for this to happen however the touch manager needs to detect when a touch occurs even when its touching nothing. This is simply done by checking whether each current touch and seeing if they’re within a dictionary of touched gameobjects and touches. If there are at least two touches not touching any gameobject then it is a camera touch.

Pawn Manager

The pawn manger script primary function is to spawn the pawns in. I implemented a data driven system that can spawn pawns in up to an amount with intervals between each spawn. The pawn manager also holds a list of all the pawns that have spawned in, this allows users to reference that when handling the pawns instead of using FindGameObjectsWithTag which can reduce performance if done every frame.

March Demo

Density Grid

I also started implementing my density grid system. What this does is create a 1d array of floats as grid spaces and then find each pawns grid space using the pawns list from the manager and for each space a pawn is in increment the float in that array position.

About

Gamers developing new games.

Social Links

Our Bunker

University of the West of England,
Frenchay Campus, Bristol, BS16 1QY,
United Kingdom.