FastJ is an open-source, Java-based 2D game engine and framework. Originally named the FastJ Engine, it aims to provide an easy-to-use, 2D game-making library.
This project is still under heavy development. There is a very good chance bugs are still prevalent and untracked, as the engine is not fully covered by unit tests. Documentation is readily available, but may change over time. If you would like to help out, all help is appreciated!
Feature | Description | Support |
---|---|---|
2D Rendering | Rendering of 2D Polygons, Models, Lighting | ✔ |
Scene System | Scene-based Rendering, Scene Switching | ✔ |
Scriptable Behaviors | Control game object states through behaviors. | ✅ |
Desktop Support | Full Compatibility on Windows, Linux, and macOS. | ✅ |
Audio Engine | Play sounds of several different formats at any given time. | ✔ |
Image Support | Image rendering, transformations, and sprite animation. | ❌ |
Animation Support | Interpolation and tweening framework. | ❌ |
UI System | Flexible UI system to replace the need for Swing UI. | ⭕ |
FastJ Model Creator | Create & Export 2D Models quickly and easily. | ❌ |
FastJ Editor | View, Run, Build, and Export FastJ games from an editor. | ❌ |
Web Support | Compile FastJ games to run in a browser. | ❌ |
✅ is complete and satisfactory.
✔ is implemented and usable, but is missing certain features.
⭕ is in progress.
❌ is not yet implemented.
This library can be found in the following places:
- jitpack.io, as a dependency.
- Maven Central, as a dependency or as a jarfile.
- The Releases section of this repository.
When adding the dependency, make sure to replace [latest version here]
with the actual version (you'll find this in the jitpack.io or Maven Central link up above). The current latest version is 1.5.0.
A few common dependencies are provided below:
- Gradle
- Groovy:
repositories.maven { url('https://jitpack.io') } dependencies.implementation('com.github.fastjengine:FastJ:[latest version here]')
- Kotlin:
repositories.maven { setUrl("https://jitpack.io") } dependencies.implementation("com.github.fastjengine:FastJ:[latest version here]")
- Groovy:
- Maven
<repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> <dependency> <groupId>com.github.fastjengine</groupId> <artifactId>FastJ</artifactId> <version>[latest version here]</version> </dependency>
There are many different ways to learn FastJ -- namely the API documentation, the examples, and the tutorials on the main website.
Check out these template projects for FastJ! They're the fastest way to jump right into using FastJ.
- Java: https://github.com/lucasstarsz/fastj-java-template
- Kotlin: https://github.com/lucasstarsz/fastj-kotlin-template
- Groovy: https://github.com/lucasstarsz/fastj-groovy-template
FastJ provides article tutorials on its website to accommodate as many types of developers as possible. From beginners to experts, the website tutorials are written to give enough information to satisfy anyone willing to learn!
Explore FastJ's code examples to see the different ways FastJ can be used, and all of its features. These come with in-example explanations and easy plug-and-playability to give you the best chance at understanding how FastJ works.
Check out FastJ's documentation to get a better understanding of the code FastJ provides to improve your game-making experience.
Plan on contributing to the repository? Great! Be sure to read over the contribution guidelines, and read on to discover how to get started.
You'll need a few things in order to work on the repository:
- Git
- Java 11
- (optional, but highly recommended!) A decent understanding of how to use Gradle.
Installation of Gradle is not required -- the project supplies the Gradle tools already.
- For reference, this project currently makes use of Gradle 7.1.1.
Once you have what you need, follow these simple steps:
- Clone the FastJ repository.
git clone https://github.com/fastjengine/FastJ.git
- Ensure that the FastJ project works on your device.
Having trouble using
./gradlew check
gradlew
? Read this.
This repository is licensed under the MIT License.