Skip to content

franpts2/whack-a-diglett

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whack'a Diglett

A Minix-based implementation of a whack-a-mole style game featuring Diglett Pokémon characters. This project was developed as part of the LCOM (Laboratory of Computers) course at FEUP.

📋 Table of Contents

Video Demo

video demo

Project Overview

Whack'a Diglett is a 2D game built from scratch for the Minix operating system, featuring real-time graphics, user input handling, and smooth animations. The game challenges players to whack appearing Diglett characters within a time limit to achieve the highest score possible.

Game Features

  • Multiple Game Modes: Menu, gameplay, pause, instructions, and game over screens
  • Dual Input Support: You can use either keyboard or mouse controls
  • Real-time Progress Tracking: Dynamic time bar and score counter
  • Smooth Animations: Triple buffering for flicker-free animation transitions
  • Randomized Gameplay: Unpredictable Diglett appearances for engaging replay value

Report

report

System Architecture

Core Architecture Diagram

uml

Key Components

Hardware Interaction Layer

  • Timer Controller: Manages game timing, animation frames, and game duration (60Hz)
  • Keyboard Controller: Processes player input for menu navigation and gameplay
  • Mouse Controller: Provides alternative input method with real-time cursor tracking
  • Video Controller: Handles drawing operations and buffer management

Game Logic Layer

  • Game Core: Controls main loop and state machine
  • Mode Managers: Handle specific behaviors for different game states
  • Diglett System: Manages individual timing and state transitions for each Diglett

Visual Components

  • Sprites: Both static and animated visual elements
  • Buffer Management: Multi-buffer system for smooth rendering
  • UI Elements: Score display, time bar, menus, and cursor

Project Structure

proj/
├── src/
│   ├── main.c                 # Program entry point
│   ├── controllers/           # Hardware abstraction layer
│   │   ├── kbdmouse/         # Keyboard and mouse controllers
│   │   ├── timer/            # Timer controller
│   │   └── video/            # Video controller
│   ├── game/
│   │   ├── game.c/h          # Main game loop and state machine
│   │   ├── background.c/h    # Background management
│   │   ├── cursor/           # Cursor implementation
│   │   ├── modes/            # Game modes (menu, playing, etc.)
│   │   └── sprites/          # Sprite management
│   └── fonts/                # Text rendering
└── doc/                      # Documentation

Building and Running the Project

Prerequisites

  • Minix 3.1.8
  • LCOM development environment

Compilation

$ cd labs/proj/src/
$ make clean && make

Running

$ lcom_run proj

Development Team

Acknowledgments

  • LCOM teaching staff at FEUP
  • Minix operating system developers
  • Pokémon franchise for the Diglett character inspiration

About

Whack-a-Mole inspired game in Minix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •