Check the position and type of the touch event to determine
whether acceleration is being applied.
The only issue with this is that if a touch moves from the right
of the screen to the left, if a touchend event occurs in the left
side of the screen, it won't stop the acceleration. But it's a
better solution than counting the number of touches.
Also added a check on touch move events, so that only moves which
occur on the left of the screen are counted as turns. The reason
for this is that in some cases, the touch identifier was being
incorrectly applied: so a touch which started on the left of
the screen could accidentally be continued by a touchmove
occurring on the right of the screen, resulting in a violent right
turn. (It appears as though the touch ID can mistakenly
transfer between touches with different fingers.)
By testing where the touchmove occurs, the violent turn effect
can be removed, as only a finger on the left-hand side of the
screen can cause moves.
Added another quality setting (VERY HIGH) and mapped all
combinations of platform + the old quality value to the new
4 value quality option, as follows:
desktop + mid/high quality => 3
mobile + high quality => 2
mobile + mid quality, desktop + low quality => 1
mobile + low quality => 0
All choice points in the code which enabled/disabled
graphics features, based on platform + quality,
were mapped onto a table. This showed which features were
disabled or enabled depending on the platform/quality
combination.
It turned out that mid and high quality resulted in the same
settings on desktop, so they could be captured in a single
value (3).
The only change made to the decision points was that desktop +
low quality previously turned off the booster lighting effect,
whereas that effect is now on for desktop + low quality. This was
done so that mobile + mid quality was equivalent to
desktop + low quality.
By doing this, the "mobile" property can be removed. I also
removed the "half" property, and set it based on quality in the
HexGL class (basically, it's enabled for mobile + low quality,
which is new quality value 0).
Remove the mobile property and set it locally in each location
where it is used (preparation for iterating the different
platform+quality combinations which affect the graphics).
Mark each point where a decision is made based on platform+quality
with a plain English version of the combinations which take
effect and when.
Add an explicit hud property which is set from the start screen
and which is independent of the platform.