Yesterday I implemented both the proximity warning and the light sensor coral color and mood change interactions. Today I’ll continue adding some of the other planned interactions.

Health system

The health system can be changed both by accelerometer events and battery charge. The battery charge will basically change the rate in which the health replenishes or drains and accelerometer events always drain health immediately.

I created a threshold detection to activate events based on the acceleration magnitude. Each time this event is triggered, the health is diminished a fixed amount and the phone vibrates to indicate that. I also added an option to the vibration player to play a sound and modulate its volume as per the vibration amplitude curve. It worked ok for indicating this “damage” event.

Now that the health value changes both through regeneration and per player action, it is time to make that value have implications for the game world. Some of the effects I’m planning are:

  • Kill a few corals anytime a damage event is triggered;
  • Change the health change rate of corals based on sea health: they last shorter periods;
  • If health reaches 0, kill all corals and stop the game, start a timer and quits the game;

Some time passes.

Ok, I’ve finished implementing the death of the sea and corals. It is working quite interestingly now, it creates layers of living and dead structures and it does change with the health.

Frame feedback

An important idea on making the feedback more interesting is to have a frame around the borders of screen that animates with color, to create pulsating patterns and flicking lights. This would be a more ambient way to create effects through the translucent case idea.

An example of the kind of pulsating effect I'm looking for.

The sketch version above was made just by animating the color of two rectangles. Now I’ll start work on making it an actual ring. I’ll try to keep it somewhat simple and just use the Unity animation system to create a series of animation clips with a standardized duration. I’ll try to mostly change scale, so that I can play with color and speed via animation parameters and the Animator timescale. Here is a sketch of what each animation style and duration could mean.

Animation Fast Mid Slow
Shadow stripes joining to the center     Sleepy growth (at times)
Alternating halves Proximity warning    
Circling shadow Gravity changes   Chirpy growth (at times)
Quick blinking Damage warning   Afterdeath
Pulsing whole   Default growth (at times)