Skip to main content

FastJ Logo

Windows Build Status Ubuntu Build Status Mac OS Build Status

Javadoc Maven Central jitpack.io SonarCloud Code Coverage Discord Server

What is FastJ?#

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.

Disclaimer#

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. Feel free to help us out by contributing to the project!

Projected Feature List#

FeatureDescriptionSupport
2D RenderingRendering of 2D Polygons, Models, Lightingโœ”
Scene SystemScene-based Rendering, Scene Switchingโœ”
Scriptable BehaviorsControl GameObject stateโœ…
Desktop SupportFull Compatibility on Windows, Linux, and macOSโœ…
Audio EngineLoading, Playing, and Controlling .wav, .au, .aiff filesโœ”
Image SupportImage rendering, Sprite Animationโœ”
Animation SupportInterpolation, Tweening Frameworkโญ•
UI SystemFlexible UI System to replace Swing UIโญ•
Particle EngineConfigurable and Customizable Particle Managementโญ•
Physics EngineCustom 2D Physics Engine.โŒ
Asset ManagerLoad, Unload, and Hot Reload Game Assetsโญ•
FastJ Model CreatorCreate & Export 2D Modelsโญ•
FastJ EditorView, Run, Build, and Export FastJ programs from an editorโŒ
Web SupportRun FastJ Programs in a Web BrowserโŒ

โœ… is complete and satisfactory.

โœ” is implemented and usable, but is missing certain features.

โญ• is in progress.

โŒ is not yet implemented.

Get Started#

There are many different ways to learn FastJ -- check them out!

Template Projects#

Use a template project! It's the fastest way to jump into using FastJ.

Choose a programming language from the ones below. We suggest Java, as it has the most support:

However, Kotlin and Groovy are reasonable options as well:

Tutorials#

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!

Code Examples#

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.

API Documentation#

Check out FastJ's documentation to get a better understanding of the code FastJ provides to improve your game-making experience.

I'll add the dependency myself!#

Ok, ok, I hear ya. Just follow through with these instructions below.

Dependency Management#

This library can be found in the following places:

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.6.0.

A few common dependencies are provided below:

  • Gradle Build Script

    • 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]")
  • Maven POM

    <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>

You'll also want to make sure you add a dependency for a logging framework from SLF4J, since FastJ uses it for all its logging purposes. Take your pick!

Hello World Code (Java)#

import tech.fastj.engine.FastJEngine;import tech.fastj.graphics.display.FastJCanvas;import tech.fastj.systems.control.SimpleManager;
public class HelloFastJ extends SimpleManager {
    @Override    public void init(FastJCanvas canvas) {}
    @Override    public void update(FastJCanvas canvas) {}
    public static void main(String[] args) {        // Creates an empty window titled "Hello, FastJ!"        FastJEngine.init("Hello, FastJ!", new Main());        FastJEngine.run();    }}

External Dependencies#

Contributing#

Plan on contributing to the repository? Awesome! We're glad to have you โค๏ธ

Please be sure to read over the contribution guidelines so that you can get started.

Community#

FastJ's community of developers is growing day by day!

  • Join the FastJ Discord Server to get early-access to planned ideas and features, as well as join a welcoming community!

License#

This repository is licensed under the MIT License.