Game Design, Programming

SoundRipples, Guard Patrolling and Light-prototype

I have been working on two things today. I continued with our guard’s detection of sounds around them and got our PatrolState working.

I’m having a SoundRippleManager to hold a vector of SoundRipples, which is basically an object with position, volume and time alive. The SoundRipple will stay alive for about 1 second and during this time it will draw an expanding circle from its origin to represent our visual respond to the sound.

When a new SoundRipple is created it checks all the guards’ positions to see if anyone is within a certain range, depending on its volume. Everyone that is within hearing range will set a waypoint there to check it out. I did it like this just to see if I could get it working properly, and I think it does. But what I will do, when I have made it, is to change the state from Patrol to Investigate, instead of just adding a waypoint to the sounds origin.

The PatrolState is working, kind of like I want it for the start of our alpha stage. Only big thing to add is to implement the line-of-sight so it can detect the player even if he/she doesn’t make any sound.

LightPrototype_1

Our light-prototype is pretty awesome looking now, and I really want to get it implemented to see how it will look with all the sprites. Most of the strange bugs are fixed now.

LightPrototype_2

I can only find one unfixed that occurs if the light gets too close to the wall. I have to remember to ask Robin take a look at it on a later date, it is good enough for now. We have more important things to implement first, like collisions 🙂

Standard

Leave a comment