How imannil/java-game-engine-pacman works
This repository is a JavaFX Pac-Man game with a separate settings and map-authoring interface. The player launches the game, supplies directional input, and navigates a tile map while collecting dots and avoiding or confronting ghosts; the game renders the resulting state. A settings/map-writer application is also present. The README is empty, and several central files (notably GameScene and PathFinder) were not sampled, so links for those subsystems are limited to relationships evidenced by the available source.
Main entry points: GameScene.java Game scene · Map.java Game map · Pac.java Pac-Man · Ghost.java Ghosts
Components 20
Game runtime
- Game launcher
src/com/jgegroup/pacman/Main.java - Game scene
src/com/jgegroup/pacman/GameScene.java - Key handler
src/com/jgegroup/pacman/KeyHandler.java - Pac-Man
src/com/jgegroup/pacman/objects/characters/Pac.java - Ghosts
src/com/jgegroup/pacman/objects/characters/Ghost.java - Collision checks
src/com/jgegroup/pacman/CollisionChecker.java - Ghost movement
src/com/jgegroup/pacman/objects/characters/GhostMovement.java - Path finder
src/com/jgegroup/pacman/PathFinder.java - Game UI
src/com/jgegroup/pacman/objects/UI.java
World and assets
- Game map
src/com/jgegroup/pacman/objects/Map.java - Tiles and walls
src/com/jgegroup/pacman/objects/immovable/Tile.java - Default map data
res/maps/map1.txt
Settings and editor
- Settings and editor app
src/com/jgegroup/GameConfig/Launch.java - Config builder
src/com/jgegroup/GameConfig/config/ConfigBuilder.java - Game configuration
src/com/jgegroup/GameConfig/config/Config.java - Editable map
src/com/jgegroup/GameConfig/Map.java - Map writer contract
src/com/jgegroup/GameConfig/MapWriter.java - Editor entry point
src/com/jgegroup/mapwriter/Main.java
Legacy code
- Legacy game cycle
src/com/jgegroup/pacman/legacy/GameCycle.java
Other components
- Player
Connections 19
- Player → Key handler: presses keys
- Game launcher → Game scene: creates scene
- Game scene → Key handler: handles input
- Game scene → Pac-Man: updates and renders
- Game scene → Ghosts: updates and renders
- Game scene → Game map: renders map
- Game scene → Game UI: renders UI
- Pac-Man → Collision checks: checks movement
- Ghosts → Collision checks: checks movement
- Ghosts → Ghost movement: chooses direction
- Ghost movement → Path finder: uses paths
- Pac-Man → Game map: reads and updates tiles
- Game map → Default map data: reads map
- Game map → Tiles and walls: creates tiles
- Editor entry point → Settings and editor app: starts
- Settings and editor app → Config builder: builds config
- Config builder → Game configuration: creates
- Settings and editor app → Editable map: creates and saves map
- Editable map → Map writer contract: implements