C Programming Project Suggestions and Guidelines
In the past, the traditional project for this course has centered around a "maze" videogame. The project is broken down over 3-4 weeks, traditionally. We will be doing a preliminary part of it as a worksheet on week 4. On week 5 we will have some exercises in class, but week 6 will be dedicated to your projects.
The Maze Project
The maze is a 2d-character array through which your protagonist must navigate.
- The game operates in a loop as you enter "w" to go up, "s" to go down, "a" to go left, and "d" to go right.
- The protagonist, represented as the "@" character, is prevented from moving in any direction in which there is a wall, or closed door 'D'.
- A switch mechanism '/' <-> '\' can be added to the game to flip all open doors '.' to closed 'D' and all closed doors to open.
- Monsters 'M' can be added to the game. They will walk in either left-to-right patterns or up-to-down patterns, turning around when they hit an obstacle. If they touch the player or if the player steps on them, the player will lose.
- Upon finding the flag 'F' in a maze, the player is promoted to the next maze.
- A player will have "health". Instead of dying immediately when it runs into a monster, it will lose a health point. Similarly, spikes: "^" will cost health points to walk across, and some kind of token will restore health.
- Pressing 'x' instead of 'w', 's', 'a', or 'd', will take the player one step closer to the goal. Consider implementing depth first search.
Ideas that are too simple:
- Reversing string input.
- A linked list (or things we have done in class).
- Newton's method / some math.
Ideas that are about right:
- Go fish the card game. See wikipedia.
- Mortgage calculator.
- 2048 game.
- A postfix calculator: "8 9 + 2 /" is equivalent to (8+9)/2, which is 8.5.
Ideas that are much harder:
- Sudoku solver.
- Lisp Interpreter.
- Poker the card game.
- A math calculator: (8+9)/2.