Warring Kingdoms is a 2D RPG game built with Java using the Slick2D and LWJGL libraries. Choose your kingdom—Rogues, Mages, Barbarians, or Monks—and conquer all others to rule the land.
Note: This game is not ARM architecture compatible and will not run on M-series Macs due to dependencies on older native libraries (LWJGL 2).
- Requirements
- Setup & Installation
- How to Run
- Controls & Gameplay
- Project Structure
- Build Scripts
- Cheats
- License
- Java Development Kit (JDK): Version 11 is required (as specified in
build.gradle). - Operating System: Windows, Linux, or Intel-based Mac OS X.
- Gradle: The project uses the Gradle wrapper, so a local installation is not strictly necessary.
-
Clone the repository:
git clone <repository-url> cd warring-kingdoms
-
Native Libraries: The project includes native libraries for Windows, Linux, and macOS in the
lib/nativesdirectory. These are automatically configured when running via Gradle.
Windows:
.\gradlew.bat build runLinux and macOS (Intel):
chmod +x gradlew
./gradlew build run- Movement: Use
W,A,S,Dor Arrow Keys. - Combat: Standard RPG battle mechanics (turn-based).
- Goal: Defeat all other factions to control all four kingdoms.
src/: Java source code.game/: Main game logic and entry point (Game.java).game/audio/: Sound handling.game/character/: Hero stats and character logic.game/enemy/: Enemy AI and factory patterns.game/screen/: Different game states (Menu, Map, Battle, etc.).
res/: Game assets including images (.png,.psd), music (.ogg,.wav), and tilemaps (.tmx).lib/: Native library dependencies for LWJGL.gradle/: Gradle wrapper files.
build.gradle: Main build configuration.- Sets Java 11 compatibility.
- Manages dependencies for Slick2D and LWJGL.
- Configures
jvmArgsto point to the correct native libraries based on the OS.
gradlew/gradlew.bat: Scripts to execute Gradle tasks without pre-installed Gradle.
No specific environment variables are required. The project uses system properties (set automatically by the Gradle run task) to locate native libraries:
java.library.path: Points tolib/natives/<os>/.
TODO: No automated tests (Unit/Integration) were found in the project. Manual testing is recommended.
The following cheats are available for development and testing:
- Max Stats: Enter the name
qwertyduring character creation. - Easter Egg: Enter the name
Tomduring character creation. - Insta-kill: Press
0during combat to instantly kill the enemy.
TODO: Add license information.