A faithful recreation of the classic Duck Hunt game using CSFML
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.
- 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
- Single Player: Classic duck hunting experience
- Two Player: Cooperative gameplay (in development)
- Menu System: Interactive sprite-based navigation
- 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
- Mouse & Keyboard: Traditional PC controls
- Game Controller: Full joystick support with configurable sensitivity
- Hybrid Controls: Seamless switching between input methods
- Background music and sound effects
- Gunshot and duck interaction sounds
- Menu navigation audio feedback
- (Note: Currently experiencing hardware compatibility issues)
- Ammunition System: Limited shots per round
- Scoring System: Point-based progression
- Difficulty Scaling: Adaptive challenge levels
- Duck AI: Random movement patterns and behaviors
MyHunter gameplay demonstration
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-
Clone the repository:
git clone https://github.com/mallory-scotton/hunter.git cd hunter -
Compile the project:
make
-
Run the game:
./my_hunter
- Mouse Movement: Aim crosshair
- Left Click: Shoot
- Arrow Keys: Navigate menus
- Enter: Select menu option
- Escape: Return to menu/Exit game
- Left Stick: Aim and navigate
- Right Trigger: Shoot
- D-Pad: Menu navigation
- A Button: Select
./my_hunter -h # Display help informationmake # Standard build
make clean # Remove object files
make fclean # Remove all generated files
make re # Clean rebuildhunter/
โโโ 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
- Compiler: GCC with debugging flags (
-g3) - Libraries: CSFML (graphics, system, window, audio)
- Standards: C99 compatible
- Platform: Linux (tested on Ubuntu, Arch, Fedora)
| 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 |
This project is licensed under the MIT License - see the LICENSE.md file for details.
MIT License
Copyright (c) 2024 Tekyo Drift
We welcome contributions! Please read our Contributing Guidelines before submitting pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Comment complex algorithms
- Ensure compatibility with CSFML 2.5+
- Test on multiple Linux distributions
Mallory Scotton
๐ง Email: [email protected]
๐ GitHub: @mallory-scotton
- 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!

