Skip to content

Project File Structure V2.0

Thomas Lu edited this page Jan 9, 2025 · 2 revisions

Class Diagramm UML

image

File Structure Overview

This file structure organizes the project’s classes by responsibility and hierarchy. Here’s a quick breakdown:

  1. Main Entry Point

    • Main: Where the game starts. This class (or method) serves as the main entry point and typically initializes the game.
  2. character Package

    • Actor: A base or parent class for all in-game characters.
    • Player, NPC, and Gegner all extend Actor:
      • Player: The controllable player character.
      • NPC: Non-player characters (possibly friendly or neutral).
      • Gegner: German for “enemy”—these are hostile characters.
  3. classes Package

    • Archer, Assassin, Defender, Healer, Mage, Paladin, ...
      All these classes extend Player, which means they inherit player attributes and add specialized features (e.g. a Mage might have spells, an Archer might have ranged attacks, etc.).
  4. item Package

    • Item: A generic item class that represents objects that can be picked up or used.
    • Apple: A specific item (e.g., might restore health).
  5. util Package

    • DataObjects: Contains data structure classes like PlayerData used to receive/send data to the server (DTOs).
    • Overlay: Contains UI-related classes like UI_Layer that handle on-screen overlays or HUD elements.
    • Other utility classes:
      • GameRenderer: Responsible for rendering game entities.
      • MapCreator, Perlin: May be used for procedural map generation.
      • ItemFactory, PlayerFactory: Factory classes to create items or players.
      • ServerConnection: Manages the socket connection, synchronizing data between client and server.
  6. MainGameScreen, StartScreen

    • Represent different stages or screens in the game, such as the title screen and the main gameplay screen.

Platforms

  • core: Main module with the application logic shared by all platforms.
  • lwjgl3: Primary desktop platform using LWJGL3; was called 'desktop' in older docs.

Clone this wiki locally