Thursday 21 March 2013

A Free and Cheap Way.

Despawning cubes is one of the hardest challenges I've had to face. eventually I've had to split cube despawning into three strategies:

1. Red Lazer

















When shooting the red lazer, it was just like the blue lazer in the early days, (a continuous stream). The blue lazer involves shooting an individual pellet constantly. with the Right Mouse Button, it gives you a sense similar to 'spraying paint', but in this case, despawning cubes. 


2. The R Key












When pressed R, any cube currently in the scene with the destroy script will be destroyed.
Simple.


3. The Single Hit
















When your blue lazer hits a single cube, after two seconds the cube will despawn. Confusing at first.

There is an editable cube limit for every wall that spawns cubes. Once the cube amount reaches the cube limit, the cubes don't spawn for the certain wall and a message displays saying 'Press R'. Once you press r, the cubes are deleted and the cube amount goes to 0. 

That combats lag so you dont keep spawning cubes.

When you shoot the Pause receptor, you have no indication that the cubes are now paused.
So I decided to have a screen effector. I searched up one for Unity but they were all paid! So I worked out that if I have a plane with a transparent texture, I can do it!
Free and Easy!

Now here is the video!


No comments:

Post a Comment