CS 3 (Spring 2024) Project 03: Scenes (Demo)

In this project, you will write a version of the game pacman.

Code Correctness

Demo

This week, you will be implementing a “pacman” demo which should look something like the following (the arrow keys on the bottom are an overlay to show you what is being pressed–not part of the scene):

This week’s demo is a pacman-like game in which pacman runs around the screen eating pellets. The novel SDL feature this week is keyboard events. The user should be able to control pacman using the arrow keys. Notably, this means we have updated sdl_wrapper to include keyboard related management. You will need to integrate this with your code.

We expect your demo to contain (at least) the following:

We have given you the implementation to create the pacman shape and pellet bodies.

So far, our demos have had a lot of repeated code. One of the goals this week is to create an abstraction around the demos, specifically where you will be using a scene abstraction and body abstraction into the pacman demo.

Note that you will not be needing to implement body and scene as the game person (the engine person will do it this week). Instead refer to the body.h and the scene.h file to see how you can utilize them in the demo.