https://github.com/mallory-scotton/arcade
đšī¸ Retro gaming platform with dynamic library loading for games and graphics. Built as a 2nd-year EPITECH project
https://github.com/mallory-scotton/arcade
arcade audio-processing cpp epitech games joystick libcaca ncurses nibbler opengl pacman retrogaming sdl2 sfml shared-library wiimote
Last synced: about 1 month ago
JSON representation
đšī¸ Retro gaming platform with dynamic library loading for games and graphics. Built as a 2nd-year EPITECH project
- Host: GitHub
- URL: https://github.com/mallory-scotton/arcade
- Owner: mallory-scotton
- License: mit
- Created: 2025-06-03T13:30:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-03T14:18:50.000Z (about 1 year ago)
- Last Synced: 2025-06-22T01:02:44.431Z (12 months ago)
- Topics: arcade, audio-processing, cpp, epitech, games, joystick, libcaca, ncurses, nibbler, opengl, pacman, retrogaming, sdl2, sfml, shared-library, wiimote
- Language: C
- Homepage:
- Size: 80.8 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Authors: AUTHORS.md
Awesome Lists containing this project
README
# đšī¸ ARCADE - A Retro Gaming Platform
[](LICENSE.md)
[]()
[]()
A modular retro gaming platform that lets users choose games to play and keeps track of player scores. Built with a dynamic library architecture for maximum extensibility.
## đ Project Overview
Arcade is a sophisticated gaming platform designed with modularity and extensibility at its core. The platform dynamically loads graphics libraries and games at runtime, allowing for seamless integration of new content without recompilation. This architecture ensures that the main program remains independent of specific graphics implementations while providing a rich gaming experience.
### Key Characteristics
- **Dynamic Library Architecture**: Games and graphics backends are loaded as shared libraries (.so files)
- **Runtime Flexibility**: Switch between different graphics backends and games without restarting
- **Score Management**: Persistent tracking of player scores across sessions
- **Cross-Platform Support**: Multiple graphics backends for different environments
- **Retro Gaming Focus**: Classic games like Pac-Man, Snake, and Nibbler
## ⨠Features
### đŽ Gaming Experience
- Multiple classic arcade games (Pac-Man, Snake, Nibbler)
- Real-time score tracking and leaderboards
- Smooth gameplay with consistent frame rates
- Audio support with game-specific sound effects
- Joystick and gamepad support (including Wii Remote)
### đĨī¸ Graphics Backends
- **SFML**: High-performance 2D graphics with audio
- **SDL2**: Cross-platform multimedia library
- **OpenGL**: Hardware-accelerated 3D graphics
- **NCurses**: Terminal-based interface
- **LibCaca**: ASCII art graphics library
### đī¸ Architecture
- Plugin-based architecture with dynamic loading
- Event-driven communication system
- Modular design for easy extension
- Memory-safe library management
- Robust error handling and recovery
## đŧī¸ Gallery







*Note: Screenshots and visual gallery can be found in the `screenshots/` directory*
## đ Installation
### Prerequisites
- **Compiler**: GCC 9.0+ or Clang 10.0+ with C++17 support
- **Build System**: Make
- **Graphics Libraries**:
- SFML 2.5+
- SDL2 2.0+
- OpenGL 3.3+
- NCurses 6.0+
- LibCaca 0.99+
### Ubuntu/Debian
```bash
sudo apt update
sudo apt install build-essential libsfml-dev libsdl2-dev libgl1-mesa-dev libncurses5-dev libcaca-dev
```
### Fedora/CentOS
```bash
sudo dnf install gcc-c++ make SFML-devel SDL2-devel mesa-libGL-devel ncurses-devel libcaca-devel
```
### Arch Linux
```bash
sudo pacman -S gcc make sfml sdl2 mesa ncurses libcaca
```
## đ§ Build Instructions
### Quick Build
```bash
# Clone the repository
git clone
cd arcade
# Build everything (core + all libraries)
make
# Clean build artifacts
make clean
# Full clean (including libraries)
make fclean
# Rebuild everything
make re
```
### Advanced Build Options
```bash
# Build only the core arcade binary
make arcade
# Build specific graphics backend
make lib/arcade_sfml.so
# Build specific game
make lib/arcade_pacman.so
# Build with debug symbols
make DEBUG=1
# Build with verbose output
make VERBOSE=1
```
### Build Output
After successful compilation, you'll find:
- `arcade`: Main executable in the root directory
- `lib/*.so`: Shared libraries for games and graphics backends
- `build/`: Compiled object files and intermediate artifacts
## đ¯ Usage
### Basic Usage
```bash
# Start with default graphics library
./arcade lib/arcade_sfml.so
# Start with specific graphics backend
./arcade lib/arcade_sdl2.so
# Display help
./arcade --help
```
### In-Game Controls
- **Arrow Keys**: Navigation and movement
- **Space**: Select/Action
- **Escape**: Return to menu/Exit
- **Enter**: Confirm selection
- **R**: Restart game
- **Tab**: Switch graphics backend (runtime)
### Game Selection
1. Launch the arcade with your preferred graphics backend
2. Use arrow keys to navigate the game menu
3. Press Space or Enter to select a game
4. Enjoy playing! Scores are automatically tracked
## đī¸ Architecture
### Core Components
```
âââââââââââââââââââ ââââââââââââââââââââ âââââââââââââââââââ
â Main.cpp â â Core.hpp â â Library.hpp â
â Entry Point ââââââ Game Loop & ââââââ Dynamic Loader â
â â â State Mgmt â â â
âââââââââââââââââââ ââââââââââââââââââââ âââââââââââââââââââ
â â â
âââââââââââââââââââââââââŧââââââââââââââââââââââââ
â
âââââââââââââââââââââââââŧââââââââââââââââââââââââ
â â â
âââââââââââââââââââ ââââââââââââââââââââ âââââââââââââââââââ
â IGameModule â â API.hpp â â IGraphicsModule â
â Interface â â Event System â â Interface â
â â â â â â
âââââââââââââââââââ ââââââââââââââââââââ âââââââââââââââââââ
```
### Dynamic Library System
The platform uses a sophisticated library loading mechanism:
1. **Library Discovery**: Automatic detection of available `.so` files
2. **Symbol Resolution**: Dynamic binding of `CreateArcadeObject` functions
3. **Type Safety**: Template-based object creation with proper typing
4. **Memory Management**: RAII-based cleanup with `std::shared_ptr`
5. **Error Handling**: Comprehensive error reporting with `DLError` exceptions
### Event System
- **Channel-based Events**: Separate channels for Core, Graphics, and Game events
- **Type-safe Communication**: Strongly typed event parameters
- **Asynchronous Processing**: Non-blocking event handling
- **Event Filtering**: Selective event subscription based on channels
## đĻ Dependencies
### Core Dependencies
| Library | Version | Purpose |
|---------|---------|---------|
| **Standard C++** | C++17+ | Core language features |
| **POSIX** | - | Dynamic library loading (`dlopen`, `dlsym`) |
### Graphics Backend Dependencies
| Backend | Dependencies | Description |
|---------|-------------|-------------|
| **SFML** | libsfml-dev 2.5+ | Simple and Fast Multimedia Library |
| **SDL2** | libsdl2-dev 2.0+ | Cross-platform multimedia library |
| **OpenGL** | libgl1-mesa-dev | Hardware-accelerated graphics |
| **NCurses** | libncurses5-dev | Terminal-based interface |
| **LibCaca** | libcaca-dev | ASCII art graphics |
### Audio Dependencies
| Component | Library | Purpose |
|-----------|---------|---------|
| **Audio Engine** | miniaudio | Cross-platform audio playback |
| **Sound Effects** | Built-in | Game-specific audio assets |
### Optional Dependencies
- **Joystick Support**: Linux input subsystem
- **Wii Remote**: Bluetooth libraries for gamepad support
## đ¤ Contributing
We welcome contributions! Please read our [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
### Development Setup
1. Fork the repository
2. Create a feature branch: `git checkout -b feature/amazing-feature`
3. Follow our coding conventions (see `doc/documentation.md`)
4. Test your changes thoroughly
5. Submit a pull request
### Adding New Games
See the detailed guide in our [documentation](doc/documentation.md#adding-a-new-game) for implementing new games that follow the `IGameModule` interface.
### Adding Graphics Backends
Instructions for implementing new graphics backends can be found in our [documentation](doc/documentation.md#adding-a-new-graphical-backend).
## đ License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
## đĨ Authors
- **Mallory SCOTTON** - Core Architecture & Game Development
- **Hugo CATHELAIN** - Graphics Backends & Audio System
- **Nathan FIEVET** - Library Management & Platform Integration
See [AUTHORS.md](AUTHORS.md) for detailed contribution information.
## đ Additional Resources
- đ **[Complete Documentation](doc/documentation.pdf)** - Comprehensive technical documentation
## đĢ Contact
For questions or feedback, reach out at: `mscotton.pro@gmail.com`
---
*Built with â¤ī¸ for retro gaming enthusiasts*