-
-
Notifications
You must be signed in to change notification settings - Fork 114
Documentation
Version: 1.0.1
Author(s): Dylan Power, Maxime Aldahan, Julien Von Der Marck
Published: April 20th, 2022
License: MIT License
This is the documentation for Dinosaur Exploder, a student-led open source shoot 'em up video game.
Our team cannot be responsible for any issues you may encounter as a result of following the instructions and guides in this document. This document may contain errors. Please use at your own discretion.
This is version 1.0.1 of the Dinosaur Exploder documentation. This matches the current development version of the game.
The most recent version of this document can be found at https://dinosaur-exploder.freecluster.eu/documentation.
Java 17 must be installed on your machine to run our game. Newer versions of Java may work but this has not been tested by our team. If you wish to contribute code changes, please run Java 17. If you want to run the game without making changes, Java 18+ may work but we do not take responsibility in the event it does not work.
For Linux installation, we recommend using the synaptic package manager. If you don't have synaptic installed, open a terminal and run the following:
sudo apt install synaptic
After running this command, open synaptic. You may be prompted to enter a password before opening.
Click search in the upper right corner and type in 'openjdk'.
Scroll down until you find openjdk-17-jdk. Right-click on it and select 'Mark for Installation'. Finally, click 'Apply' near the top.
A 'Summary' window will pop up showing the proposed installation(s). Click 'Apply' to proceed.
Java is now installed on your Linux system. To check, run the following commands in a terminal:
java --version
javac --version
For Windows installation, you'll first have to download and install Java from here: https://www.java.com/download/ie_manual.jsp. Then, navigate to this site and download the OpenJDK 17 windows zip file. Extract the folder to your desired directory. Open the folder, copy everything, create an empty folder on your local disk and paste everything into this folder.
Next, search in control panel for System Environment Variables.
Select 'Edit the system environment variables', then select 'Environment Variables' -> 'New' and put 'JAVA_HOME' in the 'Variable name' field. In the 'Variable value' field, insert the path of the folder where you extracted the contents of the zip file.
Open a command prompt by searching 'cmd'.
To check if Java 17 and OpenJDK have been installed correctly, type the following command:
java -version
Our game is packaged in a .jar file and you will need to have Java set up to run it. After downloading the file from our website, you will first need to edit permissions to allow for execution. Navigate to where the file is stored on your machine, right click and select 'Properties', then select the 'Permissions' tab. Enable 'Allow executing file as program' underneath 'Execute'.
After completing this, open a terminal and navigate to where the file is stored. Input the following command:
java -jar dinosaur-exploder.jar
First, make sure to have Java 17 installed on your system. Download the .jar file from our website. Open a command prompt and navigate to where the file is stored (e.g. downloads). Type the following command:
java -jar dinosaur-exploder.jar
After running the .jar file, the game will take a few seconds to load. You'll then see the spaceship along with the main game environment.
The spaceship is controlled with the following keys:
Left arrow - move left
Right arrow - move right
Up arrow - move up
Down arrow - move down
The ships laser gun can be triggered by pressing the spacebar. Your current score at any given time during gameplay can be seen in the top left corner in green.
Quitting the game can only be done by clicking the 'X' in the top right corner. We hope to develop a proper menu in future versions.
All code by team members is written in the IntelliJ IDEA integrated development environment. You may use a different IDE but incompatibility and errors are a possibility. Due to this, we recommend using IntelliJ IDEA if you're contributing code.
IntelliJ can be downloaded here. Select your operating system and follow installation instructions. We recommend the community edition as it is free and doesn't expire.
JavaFX is a development platform used to create GUI applications. FXGL is a game development library created by Almas Baimagambetov. Both of these platforms are necessary to work on our project.
To setup JavaFX, first navigate to this page - https://gluonhq.com/products/javafx/ and scroll down to the 'Downloads' section near the end of the page. Select the SDK for your operating system.
A .zip file download will start after clicking 'Download'. Navigate to the location of the file and extract it to your desired location.
Open your local copy of Dinosaur Exploder in IntelliJ. Select 'File' -> 'Project Structure' and select 'Libraries' from the new window.
Select '+' in the top left corner, then select 'Java'. In the new window, navigate to where you extracted the SDK files. Select the 'lib' folder. Click 'OK', then 'Apply' in the main window.
The final step is to add VM options. In IntelliJ, go to 'Run' -> 'Edit Configurations'.
Select 'Modify options' in the top right corner and under 'Java', select 'Add VM options'. In the 'Program arguments' field, copy and paste the following:
Windows:
--module-path "\path\to\javafx-sdk-17.0.1\lib" --add-modules javafx.controls,javafx.fxml
Linux/MacOS:
--module-path /path/to/javafx-sdk-17.0.1/lib --add-modules javafx.controls,javafx.fxml
FXGL is easily implemented in IntelliJ. The necessary dependencies should be present in the 'pom.xml' file:
<dependency>
<groupId>com.github.almasb</groupId>
<artifactId>fxgl</artifactId>
<version>17</version>
</dependency>
If this dependency is not present in your local version, copy the above and paste it anywhere between the <dependencies> </dependencies> tags in pom.xml.
There are a few rules you can follow to ensure the code you submit is up to our projects standards.
-
Reference existing variables and functions correctly. Check carefully for any syntax errors prior to submitting a pull request.
-
When declaring new variables and/or functions, make the name meaningful and relevant to the problem you're attempting to solve.
-
Follow Java programming conventions. We recommend familiarizing yourself with the Java code conventions from Oracle.
-
It's a good idea to have some basic knowledge of JavaFX and FXGL so you can tackle issues in a timely manner. There are many resources for JavaFX such as this series from thenewboston. FXGL creator Almas Baimagambetov has many useful tutorials on his YouTube channel, such as this asteroids clone tutorial.
We know that not everyone is a programmer and believe there is a place for all skillsets in our community. Here are some alternative ways to contribute:
-
Documentation - our project is constantly changing and documentation needs to reflect this. You may assigned to fix a spelling error or write a whole new section.
-
Monitoring issues - looking for potential bugs and opening issues when appropriate is essential in maintaining a decent project.
-
Engaging in discussion - our discussions section is a good place to interact with other community members and help generate ideas for the future.















