A text-based RPG game supporting both GUI & Console gameplay.
Swingy was built with MVC separation. The business logic of the app is independent from the view layer. As a result, the game can be played seamlessly either in the console or via the GUI, without affecting core gameplay.
- JDK in version 21 or higher
- Maven
- SQLite3 (handled automatically via JDBC)
- Keyboard with ARROW KEYS (fr)
Build the .jar file:
mvn clean packageOR
Simply, use the spring-boot Maven plugin to run the game:
bash:
mvn spring-boot:run -Dspring-boot.run.arguments=gui powershell:
mvn spring-boot:run -D'spring-boot.run.arguments=gui' Run the game with a command-line argument specifying the starting viewport:
- gui for gui
- console for console
- Hero creation with persistence and saving
- Progressive levels
- Items that affect hero statistics
- Hero stats system
- Enemy scaling based on level
- Random-infused, level-based combat
- Dynamic viewport switching (GUI ↔ Console)
Reach the border of the map to win the game :)
- The map increases in size with each level
- After leveling up, the hero’s position is reset to the center of the map
- The console prompts you for input, type and smash ENTER.
- GUI menus require the use of ARROW_KEYS
All commands are case-insensitive.
- N|S|W|E - move around
- FIGHT/RUN - combat decisions
- SAVE - save the current hero
- WINDOW to switch the viewport to GUI or console (gameplay only, cannot be used in combat)
- Annotation-based input validation with hibernate
- SQLite3 for managing saves
- Game logs are stored in the ./log directory
- Built as part of the 42 Advanced Core in 42 Warsaw :)
- Project built under MIT license


