Skip to content

bobbyskywalker/swingy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧙‍♂️ Swingy

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.

📋 Requirements

  • JDK in version 21 or higher
  • Maven
  • SQLite3 (handled automatically via JDBC)
  • Keyboard with ARROW KEYS (fr)

🎲 The game

Run

Build the .jar file:

mvn clean package

OR

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

Gameplay features

  • 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)

🎯 Aim

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

🎮 Controls

  • The console prompts you for input, type and smash ENTER.
  • GUI menus require the use of ARROW_KEYS

⚔️ In-game commands:

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)

🛠️ Technicalities

  • Annotation-based input validation with hibernate
  • SQLite3 for managing saves
  • Game logs are stored in the ./log directory

Preview

GUI gameplay GUI hero select Console gameplay

🧠 Notes

  • Built as part of the 42 Advanced Core in 42 Warsaw :)
  • Project built under MIT license

About

A GUI & console text-based RPG

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages