FFFF GitHub - Anik-tB/FinalBTG: Beyond The Galaxy: space RPG in JavaFX with game modes, multiplayer PvP, character progression and a marketplace. 1st place, AOOP showcase. ยท GitHub
[go: up one dir, main page]

Skip to content
Anik-tBPublic

About

Beyond The Galaxy: space RPG in JavaFX with game modes, multiplayer PvP, character progression and a marketplace. 1st place, AOOP showcase.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

13 Commits

Folders and files

Repository files navigation

Beyond The Galaxy ๐Ÿš€

A JavaFX-based space-themed RPG game featuring multiple game modes, multiplayer PvP battles, character progression, and an in-game marketplace.

๐Ÿ“‹ Table of Contents

๐ŸŽฎ Overview

Beyond The Galaxy is an immersive space adventure game where players navigate through various levels, battle monsters, collect resources, upgrade their characters, and compete against other players in real-time PvP combat. The game features a comprehensive progression system with weapons, shields, special cards, and a player-driven marketplace.

๐ŸŽฌ Gameplay Demo

โ–ถ๏ธ Watch Full Gameplay Demo on YouTube

Click the link above to watch the complete gameplay demonstration showcasing all features in action!

๐Ÿ“ธ Screenshots

โœจ Features

Game Modes

  • Guest Mode: Play without creating an account - explore the game world freely
  • Story Mode: Progress through 3 main levels (Level 1, 2, 3) with increasing difficulty
  • Phase Mode: Additional 3 phases with unique challenges
  • PvP Mode: Real-time multiplayer battles against other players

Core Systems

  • Account System: Create and manage player accounts with secure login
  • Character Progression:
    • Collect and upgrade weapons
    • Enhance shields for better defense
    • Acquire special cards with unique powers (6 different cards)
    • Track total character power
  • Resource Management: Collect 3 types of resources to build your spaceship
  • Gem Economy: Earn and spend gems throughout the game
  • Shop Marketplace:
    • Buy special cards from other players
    • Sell your own cards at custom prices
    • Real-time marketplace updates
  • Global Chat: Communicate with other online players
  • Leaderboard: Track top players and rankings
  • Sound System: Background music and sound effects with mute controls

Combat Features

  • Projectile-based Combat: Shoot projectiles in all directions (standard 4 directions, with 8-directional and 16-directional spell patterns for card upgrades)
  • Active Card Combat System: Cast powerful combat spells by pressing E based on your highest owned Special Card (includes glassmorphism card slot, cooldown overlay, circular particle bursts, pulsing shields, chronos time warp time-dilation, vampiric heal, and giga laser!)
  • Instant-Action Enemy Relocation: Relocated initial monsters along the main path to provide instant gameplay engagement right at the starting area, and extended their player detection triggers to cover your initial spawn coordinates.
  • Monster AI: Intelligent enemies that track and attack the player
  • Health & Oxygen Systems: Manage your character's vitals
  • Monster Respawning: Dynamic enemy respawn mechanics
  • Explosion Effects: Visual feedback for combat

๐Ÿ› ๏ธ Technology Stack

  • Language: Java 23 / 25
  • UI Framework: JavaFX 17.0.6
  • Game Engine: FXGL 17.3
  • Build Tool: Maven
  • Additional Libraries:
    • ControlsFX 11.1.2
    • FormsFX 11.6.0
    • BootstrapFX 0.4.0
  • Testing: JUnit 5.10.0

๐Ÿ“ฆ Prerequisites

  • Java Development Kit (JDK): Version 23 / 25 or higher
  • Maven: Version 3.6 or higher
  • JavaFX: Included via Maven dependencies

๐Ÿ”ง Installation

  1. Clone the repository (or download the project):

    git clone <repository-url>
    cd FinalBTG
  2. Verify Java installation:

    java -version

    Ensure you have JDK 23 or higher installed.

  3. Verify Maven installation:

    mvn -version
  4. Install dependencies:

    mvn clean install

๐Ÿš€ How to Run

Using Maven

Run the game using the JavaFX Maven plugin:

mvn clean javafx:run

Using IDE (IntelliJ IDEA / Eclipse)

  1. Import the project as a Maven project
  2. Wait for Maven to download all dependencies
  3. Locate the main class: com.example.finalbtg.MainGame
  4. Run the MainGame class

Building Executable

To create a distributable package:

mvn clean package

๐ŸŽฏ Game Mechanics

Getting Started

  1. Launch the Game: Start from the home page
  2. Choose Mode:
    • Guest: Play immediately without account
    • Login: Access full features with an account

Account Creation

  • Click "Sign up" on the login page
  • Enter a unique username and password
  • New accounts start with:
    • 0 gems
    • 0 resources
    • Basic weapon and shield
    • No special cards

Gameplay

Controls

  • Arrow Keys / WASD: Move character
  • Mouse Click: Shoot projectiles in the direction of the cursor
  • F Key: Shoot projectile in current facing direction
  • E Key: Cast equipped Special Card active combat spell
  • SPACE: Activate speed boost (when picked up)

Levels & Phases

  • Level 1-3: Story progression with increasing difficulty
  • Phase 1-3: Additional challenges with unique maps
  • Each level has:
    • Custom map layout (defined in level1map.txt, level2map.txt, etc.)
    • Different monster types and quantities
    • Resource collection opportunities
    • Gate to next level (unlocks when all monsters are defeated)

Combat System

  • Shoot projectiles to damage monsters
  • Monsters shoot back and chase the player
  • Collect gems from defeated monsters
  • Manage health and oxygen levels
  • Avoid obstacles and monster projectiles

Character Progression

  1. Collect Gems: Defeat monsters and complete levels
  2. Gather Resources: Find resources to upgrade spaceship (10 of each type needed)
  3. Acquire Special Cards: Purchase from shop or earn through gameplay
  4. Upgrade Equipment: Improve weapons and shields
  5. Increase Power: Total power = Weapon + Shield + Card Power

Shop System

  • Buy Cards: Browse cards listed by other players
  • Sell Cards: Set your own price and list cards for sale
  • Real-time Updates: See new listings as they appear
  • Requires active server connection

PvP Mode

  • Matchmaking: Wait for an opponent to connect
  • Real-time Combat: Battle against another player
  • Custom Arena: Dedicated PvP map
  • Uses your character's stats (weapon, shield, card power)

Chat System

  • Global Chat: Talk with all online players
  • Auto-connect: Connects when you open chat
  • Persistent: Chat history maintained during session

User Profile

  • View your username
  • Check total gems
  • See collected resources (x/10 for each type)
  • Review character stats:
    • Weapon power
    • Shield power
    • Special card power
    • Total character power
  • View card collection

๐Ÿ“ Project Structure

FinalBTG/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ main/
โ”‚       โ”œโ”€โ”€ java/com/example/finalbtg/
โ”‚       โ”‚   โ”œโ”€โ”€ MainGame.java              # Application entry point
โ”‚       โ”‚   โ”œโ”€โ”€ ButtonHandler.java         # UI controller for all menus
โ”‚       โ”‚   โ”œโ”€โ”€ MainCharacter.java         # Player character class
โ”‚       โ”‚   โ”œโ”€โ”€ AllCharacter.java          # Base character class
โ”‚       โ”‚   โ”œโ”€โ”€ Monster.java               # Monster base class
โ”‚       โ”‚   โ”œโ”€โ”€ loginMonster.java          # Monster for story levels
โ”‚       โ”‚   โ”œโ”€โ”€ Pet.java                   # Pet companion class
โ”‚       โ”‚   โ”œโ”€โ”€ loginPet.java              # Pet for story levels
โ”‚       โ”‚   โ”œโ”€โ”€ Projectile.java            # Projectile mechanics
โ”‚       โ”‚   โ”œโ”€โ”€ CombatUpgradeHelper.java   # Active Special Card HUD slot and custom combat skills
โ”‚       โ”‚   โ”œโ”€โ”€ PvpProjectile.java         # PvP projectile mechanics
โ”‚       โ”‚   โ”œโ”€โ”€ Resource.java              # Resource collection
โ”‚       โ”‚   โ”œโ”€โ”€ Level1Controller.java      # Level 1 UI controller
โ”‚       โ”‚   โ”œโ”€โ”€ Level1Loop.java            # Level 1 game loop
โ”‚       โ”‚   โ”œโ”€โ”€ Level2Controller.java      # Level 2 UI controller
โ”‚       โ”‚   โ”œโ”€โ”€ Level2Loop.java            # Level 2 game loop
โ”‚       โ”‚   โ”œโ”€โ”€ Level3Controller.java      # Level 3 UI controller
โ”‚       โ”‚   โ”œโ”€โ”€ Level3Loop.java            # Level 3 game loop
โ”‚       โ”‚   โ”œโ”€โ”€ Phase1Controller.java      # Phase 1 UI controller
โ”‚       โ”‚   โ”œโ”€โ”€ Phase1Loop.java            # Phase 1 game loop
โ”‚       โ”‚   โ”œโ”€โ”€ Phase2Controller.java      # Phase 2 UI controller
โ”‚       โ”‚   โ”œโ”€โ”€ Phase2Loop.java            # Phase 2 game loop
โ”‚       โ”‚   โ”œโ”€โ”€ Phase3Controller.java      # Phase 3 UI controller
โ”‚       โ”‚   โ”œโ”€โ”€ Phase3Loop.java            # Phase 3 game loop
โ”‚       โ”‚   โ”œโ”€โ”€ GuestGameController.java   # Guest mode controller
โ”‚       โ”‚   โ”œโ”€โ”€ GuestGameLoop.java         # Guest mode game loop
โ”‚       โ”‚   โ”œโ”€โ”€ PvpController.java         # PvP UI controller
โ”‚       โ”‚   โ”œโ”€โ”€ PvpLoop.java               # PvP game loop
โ”‚       โ”‚   โ”œโ”€โ”€ PvpClient.java             # PvP client networking
โ”‚       โ”‚   โ”œโ”€โ”€ PvpClientHandler.java      # PvP client handler
โ”‚       โ”‚   โ”œโ”€โ”€ PvpServer.java             # PvP server
โ”‚       โ”‚   โ”œโ”€โ”€ ChatClient.java            # Chat client
โ”‚       โ”‚   โ”œโ”€โ”€ ChatServer.java            # Chat server
โ”‚       โ”‚   โ”œโ”€โ”€ ShopClient.java            # Shop client
โ”‚       โ”‚   โ””โ”€โ”€ ShopServer.java            # Shop server
โ”‚       โ””โ”€โ”€ resources/
โ”‚           โ”œโ”€โ”€ com/example/finalbtg/
โ”‚           โ”‚   โ”œโ”€โ”€ homePage.fxml          # Home screen
โ”‚           โ”‚   โ”œโ”€โ”€ loginPage.fxml         # Login/signup screen
โ”‚           โ”‚   โ”œโ”€โ”€ loginDashboard.fxml    # Main dashboard
โ”‚           โ”‚   โ”œโ”€โ”€ guestDashboard.fxml    # Guest dashboard
โ”‚           โ”‚   โ”œโ”€โ”€ guestGameWorld.fxml    # Guest game world
โ”‚           โ”‚   โ”œโ”€โ”€ levels.fxml            # Level selection
โ”‚           โ”‚   โ”œโ”€โ”€ level1.fxml            # Level 1 UI
โ”‚           โ”‚   โ”œโ”€โ”€ level2.fxml            # Level 2 UI
โ”‚           โ”‚   โ”œโ”€โ”€ level3.fxml            # Level 3 UI
โ”‚           โ”‚   โ”œโ”€โ”€ phase1.fxml            # Phase 1 UI
โ”‚           โ”‚   โ”œโ”€โ”€ phase2.fxml            # Phase 2 UI
โ”‚           โ”‚   โ”œโ”€โ”€ phase3.fxml            # Phase 3 UI
โ”‚           โ”‚   โ””โ”€โ”€ pvp.fxml               # PvP UI
โ”‚           โ”œโ”€โ”€ image/                     # Game images and sprites
โ”‚           โ””โ”€โ”€ bgm.mp3                    # Background music
โ”œโ”€โ”€ user/                                  # User account data (created at runtime)
โ”œโ”€โ”€ level1map.txt                          # Level 1 map data
โ”œโ”€โ”€ level2map.txt                          # Level 2 map data
โ”œโ”€โ”€ level3map.txt                          # Level 3 map data
โ”œโ”€โ”€ phase1map.txt                          # Phase 1 map data
โ”œโ”€โ”€ phase2map.txt                          # Phase 2 map data
โ”œโ”€โ”€ phase3map.txt                          # Phase 3 map data
โ”œโ”€โ”€ pvpmap.txt                             # PvP map data
โ”œโ”€โ”€ worldmap.txt                           # World map data
โ”œโ”€โ”€ onSale.txt                             # Shop marketplace data
โ”œโ”€โ”€ pom.xml                                # Maven configuration
โ””โ”€โ”€ README.md                              # This file

๐Ÿ’พ User Data

User accounts are stored in the user/ directory as text files:

Format: username.txt

Contents:

username,password
resource,amount1,amount2,amount3
gems,totalGems
weapon,weaponPower
shield,shieldPower
cardPower,cardPowerValue
specialcard,cardId1,cardId2,...

Example:

player1,password123
resource,5,7,3
gems,1500
weapon,250
shield,300
cardPower,1200
specialcard,1,3,5

๐Ÿค Contributing

This is an educational project. If you'd like to contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is created for educational purposes.

๐ŸŽฎ Gameplay Tips

  1. Start with Guest Mode to learn the controls
  2. Create an Account to save progress and access all features
  3. Collect Resources early - you need 10 of each type
  4. Save Gems for purchasing powerful special cards in the shop
  5. Upgrade Strategically - balance weapon, shield, and card power
  6. Use Chat to coordinate with other players or get tips
  7. Practice in Story Mode before trying PvP
  8. Check the Leaderboard to see how you rank against others

๐Ÿ› Troubleshooting

Game won't start

  • Verify JDK 23 is installed: java -version
  • Ensure Maven dependencies are installed: mvn clean install

Black screen or missing graphics

  • Check that the resources/image/ directory contains all required images
  • Verify JavaFX is properly configured

Multiplayer features not working

  • Ensure the server components start automatically
  • Check firewall settings if connecting across networks
  • Multiple players need to be online for PvP and chat

Audio not playing

  • Verify bgm.mp3 exists in resources/
  • Check system audio settings
  • Use the in-game mute toggle

Enjoy your journey Beyond The Galaxy! ๐ŸŒŒ

About

Beyond The Galaxy: space RPG in JavaFX with game modes, multiplayer PvP, character progression and a marketplace. 1st place, AOOP showcase.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0