Skip to content

๐ŸŽฏ A remake of the classic Duck Hunt game with CSFML, created as a first-year project at Epitech

License

Notifications You must be signed in to change notification settings

mallory-scotton/hunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฆ† MyHunter

MyHunter Logo

A faithful recreation of the classic Duck Hunt game using CSFML

Language CSFML Platform License


๐Ÿ“‹ Project Overview

MyHunter is a modern C implementation of the classic Nintendo Duck Hunt game, built using the CSFML (Simple and Fast Multimedia Library for C). The project recreates the nostalgic gameplay experience with enhanced features including controller support, multiple game modes, and smooth animations.

This project was developed as part of an EPITECH assignment, demonstrating proficiency in C programming, game development fundamentals, event handling, and multimedia programming with CSFML.

๐ŸŽฏ Key Objectives

  • Recreate the core mechanics of Duck Hunt
  • Implement smooth sprite animations and game physics
  • Support multiple input methods (mouse, keyboard, controller)
  • Create an intuitive menu system
  • Maintain 60 FPS performance

โœจ Features

๐ŸŽฎ Game Modes

  • Single Player: Classic duck hunting experience
  • Two Player: Cooperative gameplay (in development)
  • Menu System: Interactive sprite-based navigation

๐ŸŽจ Graphics & Animation

  • High-quality sprite sheets and animations
  • Smooth duck flight patterns with realistic physics
  • Dynamic crosshair system with multiple weapon types
  • Parallax scrolling backgrounds
  • Real-time HUD with score and ammunition display

๐Ÿ•น๏ธ Input Support

  • Mouse & Keyboard: Traditional PC controls
  • Game Controller: Full joystick support with configurable sensitivity
  • Hybrid Controls: Seamless switching between input methods

๐ŸŽต Audio System

  • Background music and sound effects
  • Gunshot and duck interaction sounds
  • Menu navigation audio feedback
  • (Note: Currently experiencing hardware compatibility issues)

๐Ÿ“Š Game Mechanics

  • Ammunition System: Limited shots per round
  • Scoring System: Point-based progression
  • Difficulty Scaling: Adaptive challenge levels
  • Duck AI: Random movement patterns and behaviors

๐Ÿ–ผ๏ธ Gallery

Demo GIF

MyHunter gameplay demonstration

๐Ÿ”ง Installation

Prerequisites

Ensure you have the following dependencies installed on your system:

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install libcsfml-dev gcc make

# Arch Linux
sudo pacman -S csfml gcc make

# Fedora
sudo dnf install CSFML-devel gcc make

Building from Source

  1. Clone the repository:

    git clone https://github.com/mallory-scotton/hunter.git
    cd hunter
  2. Compile the project:

    make
  3. Run the game:

    ./my_hunter

๐ŸŽฎ Usage

Controls

Mouse & Keyboard

  • Mouse Movement: Aim crosshair
  • Left Click: Shoot
  • Arrow Keys: Navigate menus
  • Enter: Select menu option
  • Escape: Return to menu/Exit game

Controller (if connected)

  • Left Stick: Aim and navigate
  • Right Trigger: Shoot
  • D-Pad: Menu navigation
  • A Button: Select

Command Line Options

./my_hunter -h    # Display help information

๐Ÿ—๏ธ Build Instructions

Development Build

make                 # Standard build
make clean          # Remove object files
make fclean         # Remove all generated files
make re             # Clean rebuild

Project Structure

hunter/
โ”œโ”€โ”€ src/                    # Source code
โ”‚   โ”œโ”€โ”€ main.c             # Application entry point
โ”‚   โ”œโ”€โ”€ init.c             # Game initialization
โ”‚   โ”œโ”€โ”€ loop.c             # Main game loop
โ”‚   โ”œโ”€โ”€ window.c           # Window management
โ”‚   โ”œโ”€โ”€ hud.c              # HUD rendering
โ”‚   โ”œโ”€โ”€ events/            # Event handling system
โ”‚   โ”œโ”€โ”€ functions/         # Game mechanics
โ”‚   โ”œโ”€โ”€ gamemode/          # Game mode implementations
โ”‚   โ””โ”€โ”€ util/              # Utility functions
โ”œโ”€โ”€ include/               # Header files
โ”‚   โ”œโ”€โ”€ engine.h           # Main engine header
โ”‚   โ”œโ”€โ”€ types.h            # Type definitions
โ”‚   โ”œโ”€โ”€ config.h           # Game configuration
โ”‚   โ””โ”€โ”€ defs.h             # Game constants
โ”œโ”€โ”€ assets/                # Game assets
โ”‚   โ”œโ”€โ”€ *.png             # Sprite sheets and textures
โ”‚   โ”œโ”€โ”€ audio/            # Sound effects and music
โ”‚   โ””โ”€โ”€ crosshair/        # Crosshair variants
โ””โ”€โ”€ Makefile              # Build configuration

Compilation Details

  • Compiler: GCC with debugging flags (-g3)
  • Libraries: CSFML (graphics, system, window, audio)
  • Standards: C99 compatible
  • Platform: Linux (tested on Ubuntu, Arch, Fedora)

๐Ÿ”— Dependencies

Library Version Purpose
CSFML-Graphics 2.5+ Rendering and sprites
CSFML-System 2.5+ System utilities
CSFML-Window 2.5+ Window management
CSFML-Audio 2.5+ Sound system
libc Standard Memory management
libm Standard Mathematical functions

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE.md file for details.

MIT License
Copyright (c) 2024 Tekyo Drift

๐Ÿค Contributing

We welcome contributions! Please read our Contributing Guidelines before submitting pull requests.

Development Process

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Standards

  • Follow the existing code style
  • Comment complex algorithms
  • Ensure compatibility with CSFML 2.5+
  • Test on multiple Linux distributions

๐Ÿ“ง Contact

Mallory Scotton
๐Ÿ“ง Email: [email protected]
๐Ÿ™ GitHub: @mallory-scotton

๐ŸŽŠ Acknowledgments

  • Development: Mallory Scotton
  • Testing: MS, NF, HC, OM, RO
  • Assets: Custom sprites and Nintendo-inspired sounds
  • Framework: CSFML Library
  • Institution: EPITECH

๐ŸŽฏ Coded with โค๏ธ and precision targeting
ยฉ 2024 MyHunter Project - Happy Hunting!

About

๐ŸŽฏ A remake of the classic Duck Hunt game with CSFML, created as a first-year project at Epitech

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published