Sketch runner is a 2D infinite runner game, and the first released under the name "Sketch Project." Sketch runner features a unique gameplay mechanic, where players draw lines on the screen to guide a character, rather than traditional swipe or button controls.
The theme of the game involves a 2D stick figure doodle, running away from the doodle of a shark, where both characters have been granted animation.
The player touch input is gathered and evaluated every frame, allowing the traced path of the player's finger to be broken down into a collection of line segments. When the touch-up event is recognized, the collection of segments is evaluated against specific constraints. If met, the lines will be replaced with the corresponding entity: A banana peel or a bounce pad, otherwise, the lines are added to the level geometry.
As the player runs through the level, the geometry that the player must navigate becomes more complicated in a random, but constrained, manner. Rather than incrementing the player position while they run, it was decided to instead decrement the level geometry position, as to prevent overflow and rounding errors the longer the player ran. Geometry is generated whenever the last generated geometry reaches just outside of the right edge of the screen.
Each time a part of the level geometry is generated, its type is selected randomly from a set of ever-evolving parameters. These parameters are a collection of probabilities of geometry shapes, where the probability of a shape starts low, and increases every time that shape is not selected. On selection, the probability for that shape drops back to zero, as well as the probabilities of any shapes that, if immediately followed, would trap the player. To facilitate the increase of difficulty, many shapes maintain a probability of zero until the player crosses a certain distance threshold, at which point, they begin to increment. Finally, when all shapes are available, the maximum length of shapes slowly decreases until the maximum reaches the minimum. At this point, the game becomes an endurance run for the player, as the difficulty has capped.
The last part of the level geometry is the collectables. Every so often, pencils will be generated on the tops of shapes, or along the ground. Also controlled independently of the shapes mentioned above, are the generations of ceilings and pits, which become more frequent as the game progresses.
Sketch Runner is built on a fully custom game framework and engine. The game loop, screen management, sprite rendering, sound management, UI, physics, and gameplay all had to be custom built.
Since Sketch Runner was built on top of system APIs instead of a commercial engine, all game physics had to be manually coded. For this game, this included capsule versus line intersections and rectangle overlaps, with gravity simulation. The results of the collisions determine player movement as well as lose conditions.
Being a small team of 2, my responsibilities expanded beyond just the coding. I assisted in design, sprite art and backgrounds, and sound editing.
For release, the game also had to be linked against Google's APIs for leaderboards and achievements.