Arcade is a versatile gaming platform made in C++ where users can choose from a variety of games and keep track of player scores. It is designed to support dynamic libraries for both graphics and games, allowing for seamless integration of new features and enhancements.
Arcade follows strict guidelines for the implementation of dynamic libraries. It leverages the dlopen
, dlclose
, dlsym
, and dlerror
functions from the libdl
C library to manage dynamic libraries at runtime. Additionally, special compilation flags, such as -fno-gnu-unique
, are utilized to ensure proper unloading of libraries.
Arcade supports multiple graphics libraries, including:
- nCurses (arcade_ncurses.so)
- SDL2 (arcade_sdl2.so)
- SFML (arcade_sfml.so)
Arcade offers a selection of games libraries, including:
- Snake (arcade_snake.so)
- Nibbler (arcade_nibbler.so)
- SolarFox (arcade_solarfox.so)
To use Arcade, follow these steps:
- Install SDL2, SFML & Ncurses
- Compile the Arcade program and its dynamic libraries with
make
. - Start the Arcade program by specifying the graphics library to use initially:
Replace
./arcade [lib]
[lib]
with the desired graphics library (e.g.,arcade_ncurses.so
). - Upon starting, the program will display the available game and graphics libraries, along with scores and a field for users to enter their names.
- Use the following commands while running the program:
p
: Go backx
: Exit the program or the username boxg
: Change the game to the next onei
: Change the graphical library to the next one
- Use the
-h
or--help
flag to display usage information
SolarFox made by gredzy