https://github.com/theow03/jnebula
  
  
    JNebula, is a modern Component based Graphics/Game engine for Java.  
    https://github.com/theow03/jnebula
  
engine graphics-programming java opengl
        Last synced: 28 days ago 
        JSON representation
    
JNebula, is a modern Component based Graphics/Game engine for Java.
- Host: GitHub
 - URL: https://github.com/theow03/jnebula
 - Owner: TheoW03
 - License: lgpl-2.1
 - Created: 2023-02-20T00:52:21.000Z (over 2 years ago)
 - Default Branch: master
 - Last Pushed: 2024-09-07T20:35:47.000Z (about 1 year ago)
 - Last Synced: 2025-06-04T14:51:37.847Z (5 months ago)
 - Topics: engine, graphics-programming, java, opengl
 - Language: Java
 - Homepage:
 - Size: 971 KB
 - Stars: 6
 - Watchers: 1
 - Forks: 1
 - Open Issues: 0
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE
 
 
Awesome Lists containing this project
README
          # JNebula v1.0.0 In-Dev
a component based graphics engine
coded in java 
coded by: TheoW03 
# Getting Started
No JSON editor
main
```JAVA
import org.JNebula.GameObjects.GameRenderer;
public class Main {
    public static void main(String[] args) throws IOException {
        GameRenderer starterCode = new StarterCode(); //for step 3 if you get a not defined error then
        Window.InitWindow(640, 480, "example window", starterCode,"");
    }
}
```
---
your renderer class
```JAVA
public class StarterCode extends GameRenderer {
    //runs 1st frame. 
    //dt: delta time
    //GL2: OpenGL context
    @Override
    public void start(float dt, GL2 gl){
        GameObject obj = new GameObject("starterObj"); // you can name it what you want
        obj.AddComponent(new CameraComponent(new Vector3(0,0,0))); //not required if you dont add it will default to 0,0
        obj.AddComponent(new SpriteComponents("sprite.png","png",null)); //the null is a color
        obj.AddComponent(new TransformComponent(new Vector3(0,0,0)));
        Scene.InstantiateObject(obj);
    }
    //runs 1st frame. 
    //dt: delta time
    //GL2: OpenGL context
    @Override
    public void update(float dt, GL2 gl){
        GameObject render1Instance = InitObjects.Find("render1");
    }
}
```
 
 JSON editor
warning: The JSON editor isn't fully functional and may have some bugs. or some specific test cases where 
its unusable. 
```JSON
[
  {
    "name": "render1",
    "isActive": true,
    "components": [
      {
        "component_name": "org.JNebula.Components.DifferentComponents.TransformComponent",
        "location": {
          "x": 100,
          "y": 100,
          "z": 0
        }
      },
      {
        "component_name": "org.JNebula.Components.DifferentComponents.SpriteComponent",
        "file": "${path to image}",
        "type": "jpg"
      }
    ]
  }
]
```
```JAVA
import org.JNebula.GameObjects.GameRenderer;
public class Main {
    public static void main(String[] args) throws IOException {
        GameRenderer starterCode = new StarterCode(); //for step 3 if you get a not defined error then
        Window.InitWindow(640, 480, "example window", starterCode, "${PATH TO JSON}");
    }
}
```
```JAVA
public class StarterCode extends GameRenderer {
    //runs 1st frame. 
    //dt: delta time
    //GL2: OpenGL context
    @Override
    public void start(float dt, GL2 gl){       
    }
    //runs every frame. 
    // dt: delta time
    //GL2: OpenGL context
    @Override
    public void update(float dt, GL2 gl){
        GameObject render1Instance = InitObjects.Find("render1");
    }
}
```
# Documentation
# Demo 
# Contributors
T-A-B
June
---
I encourage you all to leave feedback in the issue page, or discussion, greatly appreciated.  
https://github.com/TheoW03/JNebula/issues
https://github.com/TheoW03/JNebula/discussions