Skip to content

TheBeast4Ever/training-pacman-javafx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A JavaFX UI (2D + 3D) for Pac-Man and Ms. Pac-Man

ℹ️ Online version available

Both games (2D) can now also be played online:

This has been made possible thanks to the WebFX transpiler technology (:+1: to Bruno Salmon).

Video

Pac-Man 3D Video

About this project

JavaFX user interfaces for my UI-agnostic/faceless Pac-Man and Ms. Pac-Man games. There is a 2D-only user interface and a full version where the play scene can be switched between 2D and 3D, even during the gameplay (key combination Alt+3).

How to run

In the release folder you find executable jar files and installers for Windows and Linux (not tested by me). If you have a Java runtime installed you can also start the game(s) by double-clicking the "fat" jar file. Otherwise run the installer and double-click the new desktop icon(s).

How to build locally

You need to have a JDK 17 installed and ensure that this version is used by the following build steps.

Clone repositories (only first time)

  • cd <repository-root>
  • git clone https://github.com/armin-reichert/pacman-basic.git
  • git clone https://github.com/armin-reichert/pacman-javafx.git

Build all Windows executables in one step

  • cd <repository-root>\pacman-javafx
  • build.bat

or build separately:

Build core game (model and logic)

  • cd <repository-root>\pacman-basic\pacman-core
  • mvn clean install (builds game model and logic and runs unit tests)

Build JavaFX user interface variants

  • cd <repository-root>\pacman-javafx\pacman-ui-fx-2d
  • mvn install -Djavafx.platform=win or mvn install -P build-for-windows (builds Windows executables of 2D game)
  • mvn install -Djavafx.platform=linux or mvn install -P build-for-linux (builds Linux executables of 2D game)
  • cd <repository-root>\pacman-javafx\pacman-ui-fx-3d
  • mvn install -Djavafx.platform=win or mvn install -P build-for-windows (builds Windows executables of 2D+3D game)
  • mvn install -Djavafx.platform=linux or mvn install -P build-for-linux (builds Linux executables of 2D+3D game)

To be able to create these executables you need to first install the following tools

as described in the JavaPackager guide (:+1: to Francisco Vargas Ruiz).

I also had