Skip to content

Setup (Archive)

Stephcraft edited this page Nov 5, 2019 · 1 revision

Introduction

The game is developed with the Eclipse IDE. The java project is the source folder, and the source code of the project is located in source/src.

Why Eclipse ?
Because it is easier to organize source code files by using packages. The processing IDE does not support that feature yet?

What is processing ?
Processing is a simple java library mainly used to create visual art very easily. Here is the Processing website

Steps

1. Download

Download the latest version of eclipse here: https://www.eclipse.org/downloads/
Download the Java 12 jdk here: https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html
Download the javaFX SDK here: https://gluonhq.com/products/javafx/

2. Import the project in eclipse

Navigate toFile > Open Projects from File System...

Click on Directory... and select the location of the Project-16x16/source folder
Then click on Finish to import your project in eclipse

3. Link the required libraries to the project

Hover over your java project and right click, then navigate to Build Path > Configure Build Path...

Here is the list of all the libraries required by the project:

source/libraries/processing/core.jar
source/libraries/processing/gicentreUtil.jar
source/libraries/dm/dm.jar
source/libraries/javafx/javafx-swt.jar
source/libraries/javafx/javafx.base.jar
source/libraries/javafx/javafx.controls.jar
source/libraries/javafx/javafx.fxml.jar
source/libraries/javafx/javafx.graphics.jar
source/libraries/javafx/javafx.media.jar
source/libraries/javafx/javafx.swing.jar
source/libraries/javafx/javafx.web.jar

Click on Classpath in the tree view
Then, add each of the jars by clicking on Add JARs...
Finally, click on Apply and Close

4. JavaFX

  1. Put the downloaded javaFX folder in the same location as your other java installations ("C:\Program Files\Java")
  2. In Eclipse, right click your project and go to properties, and navigate to Java Build Path -> Libraries
  3. Expand Module Path, and expand the JRE System Library
  4. Where it says Native Library, select that and then edit
  5. Choose External Folder, and navigate to where you installed JavaFX, selecting the bin folder within
  6. Apply and close, and you should be set

5. Run the project

The main class of the project is sidescroller/SideScroller.java.
Right click on the file in Package Explorer and navigate to Run As > Java Application

Help

Manage libraries

right click on the project folder > Build Path > Configure Build Path

If you have weird errors try these

Project > Clean...
right click on the project folder > Refresh