We design and implement several minigames for a primarily educative game aimed at improving English pronunciation for native Chinese speakers through speech recognition. We develop a total of three minigames, one of which is completely worked out and ready to be added to the final product, while the other two are delivered as prototypes.
Although all three mini games are separate from each other, they do use a substantial amount of the same code. For example, all use a very similar game loop to update variables and render the graphics, using the same base game states. The voice recognition is also used in the same fashion. These similarities would make it quite easy to create a new mini game out of the existing code.
We implement the game loop using the event that is fired every time a new frame is rendered, as using a storyboard causes the game loop to stall after some time.
Another issue is the lag that becomes apparent as we use higher resolution images. Noticing a short delay when new images are created, we solve the problem by preloading all needed images, setting them to an invisible state. This causes some loading time when the application is first launched, but it makes the game a lot smoother at runtime.
A final challenge in one of our games is to ensure a correct, synchronous 3D animation in a 2D environment for two objects. Tweaking variables and adding in some calculations, we propose an animation that seems correct to the human eye, and is also physically plausable. We synchronize both objects by simply using the same transformations.
This project was implemented using C# and WPF.