7 December 2015

making a platformer game in xcode - part 2 movement

7 December 2015 · 8:52

Space play/pause · J/L seek 10s · [ ] previous/next

Summary

Adds left and right buttons to the platformer, each using start/stop actions and repeating NSTimers to move the character. Links touch-down to movement and touch-up to timer invalidation; left/right movement and jumping work in testing. Fixes runaway movement when dragging off a button by connecting touch-up-outside to both stop actions.

Insight

The prototype advances from jumping alone to responsive directional controls through iterative debugging of touch-state edge cases.