Salty Engine is a Java library for making a whole 2D Game with only one single engine. It aims to be a very user-friendly and easy-to-use 2D Game making tool for Java.
It also includes collision detection, physics, several visual effects, over 100 beautiful colors, useful utility classes, hardware acceleration as well as saving with stdf and much more, spread accross more than 230 classes with an average of approximately 90 lines
Minimal tested hardware requirements made possible by JProfiler, a java profiler (for Escape the Junk):
- Intel(R) Celeron(R) CPU N3150 @ 1.60GHz 1.60GHz (dual core)
- no graphics card
- 200MB RAM
NOTE: When you release a game that's made with Salty Engine, feel free to send me an email that I can add it to this section
NOTE 2: The default font (SaltySystem.defaultFont
) is the same on all systems to ensure the same looking graphics on every computer. This font is powered by Google Fonts and is published under the Apache 2 license as well.
Note: When you call Game#start()
, a splashscreen wil appear, saying "Created with Salty Engine". For that, you have five different options using the enum SplashWindow#Splash
and using Game#start(Splash splash)
or Game#start(long fps, Splash splash)
.
You can also disable the Splash using Game.start(SplashWindow.Splash.NO_SPLASH)
(or with the fps in front), but consider using one to support us :)
- simple Display management
- have the game in a panel inside your own window if you want
- easy rendering process with
SaltyGraphics
- GameObjects for the simplest game developing possible
- Scenes for collecting and defining what to render and update
- A huge selection of beautiful colors in
de.edgelord.saltyengine.utils.ColorUtil
- linear Keyframe Animations
- Animations
- Spritesheets
- Resource management (inner as well as outer)
- Music and Sound
- UI with pre-defined elements like Buttons, Labels and TextBoxes
- Components (like extensions to GameObjects)
- Collision detection with hitboxes
- A simple yet working physics engine
- Keyboard and mouse input as simple as possible for the developer
- JavaDoc for unclear/complicated methods, fields and classes
- examples of the basics within the library (package
testing
andexample
)
- the physics are too simple for some games (only rectangular hitboxes, no rotation by the physics...)
- mostly no JavaDoc
- ... (probably missed some points here) ...
To get a usable JAR of this library, you can whether download an existing release here or build one yourself following these instructions:
-
Requirements:
- git has to be installed properly
- Java version 1.8 has to be installed, no newer version works! (When you have more java versions installed, make sure that the environment var JAVA_HOME points to 1.8)
- you have to install the dependencies first, on macOs and linux you can use the script install-dependencies.sh, on windows you have to build sysDepFiles and stdf manually, using the steps 1-3
-
Clone (download) the git repository. To do so, open up the terminal or cmd, go to any directory and type in
git clone https://github.com/edgelord314/salty-engine
https://github.com/edgelord314/stdf
for stdf and
https://github.com/edgelord314/sysDepFiles
for sysDepFiles -
"cd" into the downloaded directory. Type
cd salty-engine
stdf
for stdf and
sysDepFiles
for sysDepFilesinto the cmd or terminal
-
Build the project using the maven wrapper (no installation required). For windows, type the following into the cmd
mvnw clean install
For Linux/macOs type the following into the terminal:
./mvnw clean install
-
You can now whether use maven to get the lib into the build path of your project (recommended) or use the built JAR directly. For maven, add the following to your
pom.xml
:<dependencies> <dependency> <groupId>de.edgelord.salty-engine</groupId> <artifactId>salty-engine</artifactId> <version>[the version you built in step 3]</version> </dependency> </dependencies>
When you build the project as described in step 3, something like this should appear somewhere at the beggining of the output:
[INFO] ---------------< de.edgelord.salty-engine:salty-engine >---------------- [INFO] Building Salty Engine [the version is here ("-SNAPSHOT" is important!)] [INFO] --------------------------------[ jar ]---------------------------------
Or you copy the JAR
target/salty-engine-[version]-jar-with-dependencies.jar
relative to the directory of the cloned project and add it to the buildpath manually using e.g. your IDE.
Made by edgelord314 and LoOoNeliEst for Ludum Dare 42. You can play it here.
Do you want to collaborate? Feel free to open a pull-request (preferably well documentated and only well tested code). Also, feel free to join the official discord server
If you want to get access to the comfortable and heavily used TODO list for this project create a (free) Wunderlist account and send me your username.
For help with how to use, there are three ways:
- read the project wiki
- join the official discord server, where I and other developers can help you personally
- take a look at the package
testing
, where
we test the features of this library