Function Lab Programming Example

Game - Console Game

There is no work to do here. It is just something fun for brave Windows programmers to explore. It uses C++ that you have already learned, plus some new Windows-only features included from windows.h to control where the the next cout statement will start writing and from conio.h to read characters without waiting for enter to be pressed.

To play the game, use Visual Studio 2015 on Windows. Use the w, a, s, and d keys to move the omega (Ω) symbol around. Try to reach the box shaped gate. The game tracks how many time you press a key as "steps", and how many times you reach a gate as "level".

The program also has examples of all three function types taught in this week's lab. The game is incomplete since detecting collisions would require a way to remember the position of obstacles or enemies in the game - arrays - which will be taught later in the semester.

Get the game here: ConsoleGame.cpp

Ideas: