Fantastic news-after a struggle to the thirteenth hour last night, I finally got the compressor and decompressor working just fine and submitted the project.
Onto prototyping! I placed a (currently static enemy) in the game for now and went along with the design idea that color can be used to represent enemy health. The enemies and player all interpolate their color to a much darker hue (currently halfway to black with linear interpolation).
As for the main course, the missiles are finally implemented. I had to work a bit on inheritance in classes (bullets and health, mainly) and the missiles are a bit tricky. The way that they work is that upon a long enough swipe by the player, four missiles are fired (one after the other in a specific coroutine) and as long as that swipe is held down, the missiles will follow the finger.
The branching got a bit tricky, as I had to detect not only specific touch phases, but the moment that a missile was firing and when the finger was let go to make the missiles guidance-free. Combine that with acceleration over time and the same reaction to movement in water, and the missiles are fully usable (and quite fun!)
Before bed, I'll tackle slowing the player's vertical movement in water- thanks to the tricky accelerometer position change, it won't be easy.
No comments:
Post a Comment