An awesome Game Engine to jumpstart your game projects!
Explore the docs »
View Demo
·
Report Bug
·
Request Feature

Table of Contents
When creating fun game projects there is a lot of code just to get you going so we created this awsome game engine to let you go directly to the fun of gamemaking.
Here's why:
- Your time should be focused on creating something amazing. A game that is very fun with great features
- You shouldn't be doing the same tasks over and over like creating all the hideous game making code
- You should implement DRY principles to the rest of your life 😄
The com.javagamemaker.javagameengine is built with vanila java 1.8 using the swing framework for the input and drawing aspects
It is very easy to start
Be sure yoy have the jre installed
- check java
If you get some sort of error message please visit https://www.java.com/sv/ and download java
java -version
You can clone this repo and play around with the Testing package where we test the engine and then build the artifact and import the jar to your own project. Or you can download the jar file in the output folder and import the jar to your project.
- Clone the repo
git clone https://github.com/Java-Game-Maker/com.javagamemaker.javagameengine.git
For more examples, please refer to the Documentation
To get started create a main.java file where you extend the com.javagamemaker.javagameengine class In your public static void main(String[] args){} method
init();
start(null);
And a windows named Java Game Engine will appear with a blue background To change the window just create a new JFrame and add the configuration you want to it and pass it in the start method
init();
JFrame frame = new JFrame();
frame.setTitle("My example Title");
start(frame);
REMEMBER that when you do this your frame is a totaly new frame and have to set size and so on
To change the background (skybox), you can access the GAMEWORLD.setBackground(new Color(0,0,0)); GAMEWORLD is the JPanel where we draw everyting to
A example on how to use it
package example;
import javax.swing.*;
import java.awt.*;
public class Main extends JavaGameEngine{
public static Ob parent;
public static Ob child;
public static void main(String[] args)
{
Scene scene = new Scene();
Ob ob1 = new Ob(new Vector2(100,100));
Ob ob2 = new Ob(new Vector2(200,400));
Ob ob3 = new Ob(new Vector2(400,400));
scene.add(ob1);
scene.add(ob2);
scene.add(ob3);
//set the selected scene
setSelectecScene(scene);
start();
}
static class Ob extends GameObject{
public Ob con;
public Ob(Vector2 pos){
setPosition(pos);
}
@Override
public void onMousePressed() {
if(Main.parent==null){
Main.parent = this;
}
else{
Main.parent.con = this;
Main.parent = null;
}
}
@Override
public void onMouseEntered() {
setScale(getScale().multiply(1.1f));
}
@Override
public void onMouseExit() {
setScale(getScale().devide(1.1f));
}
@Override
public void render(Graphics g) {
super.render(g);
if(con!=null){
g.drawLine((int) getPosition().getX(), (int) getPosition().getY(), (int) con.getPosition().getX(), (int) con.getPosition().getY());
}
}
}
}
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Alfred Roos - [email protected]
Project Link: https://github.com/Java-Game-Maker/com.javagamemaker.javagameengine
Thanks to every on who has helped with this project. I want to special thanks to the following