World-Scrolling Games
2015/03/22


Overview

This week I tackled two additional Micro-Games, Jumper and Locate Your Homies. Unknowingly, both required the implementation and testing of an additional feature, the Camera class. Jumper represents a game in which the player tilts the device to horizontally move a character, thus allowing them to vertically ascend by jumping off of platforms. Locate Your Homies is a search game, requiring the player to scroll around a world and select the proper character within a mix. Evidently, both games required additional play-space beyond the screen limitations, so I was required to spend some time implementing and adjusting some of the Camera features to fit the Micro-Games. Due to previous ventures with a Camera construct, this mostly involved creating the development flow for enabling the Camera within any Micro-Game.

Jumper

Jumper could have easily become a rather complicated game to make if I did not sketch out its boundaries at the start of its creation. The game needed to recreate the vertical jumper experience, without taking a lot of time to implement collisions and physics. In that regard, I was able to set up the Player with a simple process for managing velocity, applying a constant gravity acceleration and checking collision with the ground. Whenever a collision occurs, the character is first offset, and then given an additional velocity. This additional velocity, known as the bounce, is a large burst of velocity that ensures that with every collision, the player is sent jumping upwards again. Aside from left and right bounds, this means that collisions are simple, only because they merely serve to launch the player upwards.

There are a few additional checks, such as only applying collision checks if the player is falling, but this easily created a simple system of platforms that the player could ascend on. The game begins by building an initial placement of random offsets for platforms. Then, every time the player extends beyond the range of the lowest, it is removed and replaced with an additional one offset near the top. This would essentially allow for an infinite ascend, if the game lasted that long.

However, the game is limited by three factors. First, if time runs out, the player loses the Micro-Game. Second, if the player falls too far, they also lose. This is visually portrayed by a loss bar that appears if the player falls enough. Essentially, right below the lowest possible bar after the player progresses for a bit is the area where the player can lose. Finally, the player wins by reaching a finish line that is always at a certain Y position above the platform maze.

Locate Your Homies

This game actually wound up being relatively simple to create, since it mainly relied on properly generating the grid of images for the Homies. It took a bit of work to effectively implement the Camera and its bounds, but eventually I was able to simply apply the Swipe / Scroll amounts to the Camera AdjustPosition function in order to easily allow the player to view the entire area.

Next, the game needed to start by removing a certain type of frame from the available list of frames, and then populate the grid with the remaining possible frames. This process was relatively simple, as extracting the image frame that would be the search Homie was not difficult. What actually took some time involved properly generating and placing the Homies based on the world size. This required taking into account the world size, HUD offsets, Homie sizes, and spacing in order to figure out the exact rows and columns that would fit the entire play area.

Once this was complete, the entire space was populate with images. Then, a random image could be given the search frame. If the proper image and frame were selected during gameplay, the player would win the Micro-Game. Otherwise, this simply triggers a loss state. I also tested the performance, due to the amount of images, and so far it seems to actually portray quite well on the mobile devices.

Conclusion

That essentially concludes this overview of Micro-Game progress. Going forward, I'll likely be focusing on another batch of Micro-Games. In the near future, I'll likely also be revisiting some systems to polish, as well as begin implementing the achievements once the Micro-Game list is finalized. Once the Micro-Games are set, an achievement list can be created, and then the programmers should be able to spend a week adding all possible achievements into the game.