Skip to content

Latest commit

 

History

History
123 lines (89 loc) · 5.6 KB

Assignment1Task.org

File metadata and controls

123 lines (89 loc) · 5.6 KB

Assignment 1: Pacman

Introduction

In this assignment each group is going to program a Pacman game in C++ with OpenGL. The core concepts needed to achieve this are:

  • Primitive Drawing with OpenGL.
  • Vertex/Fragment shaders with GLSL.
  • Vertex specification with OpenGL.
  • Transformations with OpenGL and glm.
  • Texturing with OpenGL.
  • Window/Context management with GLFW and GLEW.
  • Project generation / build system (e.g., CMake, Premake).

The game should follow the conventional gameplay principles of character navigation in a maze, collection of pellets along the way and avoiding ghosts.

Evaluation

The deadline for the assignment is October 6th 11:59pm (strict).

This assignment is worth 10% (all the requirements) of the total grade for the course with up to 5% extra points (optional features).

To be considered for its evaluation, the program must configure (if relevant), build and run properly in machines with:

  • Recent compiler (Visual studio 2019 or GCC > 9.0).
  • Recent OpenGL (>= 4.3).
  • If relevant, recent CMake (>= 3.12)
  • Recent GLFW (>= 3.3.2)
  • Recent GLEW (>= 2.1.0)
  • C++ >= 11.

In addition to functionality, we will put considerable weight on the professionalism of your solution.

  • Modularity: Code should be organised by functionality and reusability, and make use of header files to specify the externally available functionality. Be clear about your decisions, especially whenever your code design deviates from the above-mentioned principles (e.g., for performance/memory reasons, etc.).
  • Versioning: Use proper version practice. Commit early and often. You will work in teams, which makes frequent commits important in order to avoid merge conflicts.
  • Code as documentation: Make your code readable and add comments to clarify its function and purpose.

Starting the Assignment

To start the development, fork (not clone) this repository into an own GitLab area and work on that. Please ensure that all members of your group and the teaching team have access to the forked repository. This way, we can easily distribute additional code or modifications if necessary.

Assignment submission

There is no explicit submission. Instead, we will assume that the code basis provided at the given repository URLs is complete at the given deadline. We will assess your code in a dedicated class session, both to let you explain its inner workings to us, as well as to give you direct feedback. Before submission, please ensure:

  • your repository URL is correct (and visible),
  • your group allocations are up to date at the time of submission
  • your code compiles and runs. We will not mark code that does not compile! You should provide instructions on how to run in the README file that is part of the forked repository.

Requirements

Scenario

  • The program must be able to load the scenario provided in the `levels/level0` file of this repository. In this file 1s refer to walls, 0s refer to tunnels and 2 refer to the initial position of Pacman.
  • The program must display the scenario using the maximum possible area of the window allocated for it and respecting the aspect ratio of the map.
  • The program must display the tunnel areas in the same color as the background color (up to the group to choose). The walls areas must have a different color than the background (up to the group to choose).

Pellets

  • The program must place and display pellets (pearls or balls) in tunnel areas. The color of the pellets must be different than the colors of the background and walls. Pellets have all the same size, but the shape needs to be symmetrical (e.g, square, diamond, circle);
  • Pellets dissapear (visually) when Pacman passes over them.

Pacman

  • The program must place and display a Pacman character that moves only inside the tunnel areas (it does not traverse walls). Pacman should be animated using the sprite sheet provided in `assets/pacman.png`.
  • Movement of Pacman can be directed by the player using the arrow keys (up, down, left, right). Pacman cannot move outside the map.

Ghosts

  • The program must place and display Ghosts (number of ghosts decided by the group) characters which move only inside the tunnel areas (Ghosts do not traverse walls). The movement of the Ghosts can be random throughout the game. The Ghosts should be animated using the sprite sheet provided in `assets/pacman.png`. The initial position of the ghosts should be random.

Game mechanics

  • The game ends when (1) there are no more pellets on the screen or (2) when pacman collides with any of the Ghosts. Ending the game will freeze the screen.
  • The application terminates when the user presses the `Escape` key.

Optional Features

  • Beautiful Pellets: represent the pellets as cicles with anti-aliasing.
  • Smart Ghosts: provide the Ghosts with AI to follow Pacman.
  • Scoring System: design a scoring system that will be displayed during the progress game (on the same screen as the scenario, do not use extra windows).
  • Magic Pellets: make some of the pellets magic by visually increasing the size. The number of magic pellets and their positioning in the map is up to the grouop. When Pacman eats any of these pellets will acquire the power to eat ghosts. The ghosts eaten will be removed from the game.
  • Resizable screen: make the screen resizable. The content should adapt to fit the screen. Add an option for full-screen.
  • Be creative: any feature improving the game in terms of experience, usability, look-and-feel can potentially be considered as extra feature (consult first with the teaching team).