I’ve restarted development on the Shellphone idea, now fueled by a better and easier to use sensor plugin for Unity, as well as a one-script class for handling vibration feedback on Android. I believe all of the technical info I need for the game idea is ready, so it’s time to tie things together.

Basically, the shell will create a coral garden if left alone for long enough. If it is interrupted / taken out of the shell for too long, all the coral garden dies, and the player can only see the final, faded, result. How the coral garden will grow and live depends on where it is is left, how much light it sees, how much it is moved, what is its battery status, and other factors. All these get translated into forms of feedback that are immediate (in showing something matters to the shell) and longer term.

2019-01-31 work session

In this work session, I tried out using the magnetic field readings for changing the coral growth direction. This proved to be slightly cumbersome for testing (too many intermediate steps). So, I moved into using the gravity vector for that. I had stop halfway due to time constraints, but I’ll continue tomorrow.

2019-02-01 work session

Haptic feedback

After doing some corrections on the gravity-based growth of the corals, I’ve started doing some work on controlling the haptic feedback in the game. For that, I need to find ways to make the on/off binary controls of the Android vibration API into something more expressive. My plan so far is to use short patterns, with different proportions of on/off time. The choice of pattern would be controlled by an AnimationCurve, so it can be fine-tuned and drawn.

The idea is to generate 3 patterns of equal length, one for each intensity. The AnimationCurve evaluates which pattern should be activated at each point in time,as soon as the earlier pattern is finished. With shorter patterns you get a quicker response to changes in the curve. It did work fine, and seems like a good way to control vibration patterns.

As I experimented and tested the code out, I had an idea on how to implement a “live” vibration controller, that would give more granularity instead of the tri-band version I had going. So, I created a new ScriptableObject which I could use to refer to how the duration of the base effect would be, as well as other configurations (minimum durations for silence/vibration). It worker better than I hoped! I put a slider to control it in testing, but it could easily be just an AnimationCurve or some other variable. I think I’ll be using this system often in the project.

After some refactoring and clean-up, I managed to get a pattern/curve effect that can be used as a loop or as one-shot feedback. Sounds like a good state to have it right now. I think I’ll start wiring it up to different moments of the game.