#0 Creating a Game Engine in Java and OpenGL – Eclipse Workspace Setup

Game



Welcome to the OpenGL 3D Game Engine Programming Series with Java and LWJGL 3.
The tutorial series provides a guide for developing a high-end Open World Game Engine and all it’s necessary GLSL-shaders with starting point at a simple black GLFW window.

This video introduces the programming series and demonstrates the Eclipse workspace setup with the engine starting code template.
The starting code contains functioning GLFW Window and Input. Further it already implements the Game Loop, 3D Algebra classes, Camera, Shader Program template and Resource-Loader (glsl-file, texture, obj-model).

The sarting code template is available at:

or here:

A new git-tag will be created after every video of the programming guide, so that everyone has also the possibility to download the code related to the specific part of the series. Tags for each epsiode are available here:

Derived from Oreon Engine:

Nguồn: https://rugbyintexas.com/

Xem thêm bài viết khác: https://rugbyintexas.com/game/

49 thoughts on “#0 Creating a Game Engine in Java and OpenGL – Eclipse Workspace Setup

  1. i just have a question,is it possible to make a normal 3d game with this? like a level based game,wich has loadings for example, level 1 to level 2

  2. Thank you so much. I'm now highly motivated to learn understanding all the code there is in your engine. The very best base for my own games. Thanks

  3. Hello, i have a problem "WGL: The driver doesn't appear to support OpenGL"

    But when i check, there is openGL version 3 on my device

  4. hey man! awesome video series you have here!!! Wondering tho if there is any chance you have or know of any tutorials/guides that also show and/or explain how to create everything you allready had in the template starter code? Did you write it yourself or did it come from LWJGL3 and GLFW? Thank you sooo much dude! I hope i'll hear back from you 🙂

  5. In a world filled with free high end game engines that already have pretty much everything you need to make any kind of game..
    Do you really need to start coding your own engine?? Maybe.. on zero budget?..

  6. What does this mean:
    Exception in thread "main" java.lang.ExceptionInInitializerError

    at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1517)

    at core.kernel.Window.create(Window.java:61)

    at core.kernel.CoreEngine.createWindow(CoreEngine.java:41)

    at core.Main.main(Main.java:8)

    Caused by: java.lang.IllegalStateException: GLFW windows may only be created on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. For offscreen rendering, make sure another window toolkit (e.g. AWT or JavaFX) is initialized before GLFW.

    at org.lwjgl.glfw.EventLoop$OffScreen.<clinit>(EventLoop.java:37)

    … 4 more

  7. please help me when I compile I get this

    Scanning for projects…

    ————————————————————————
    Building engine 1.0.0
    ————————————————————————

    — exec-maven-plugin:1.2.1:exec (default-cli) @ engine —
    [LWJGL] GLFW_VERSION_UNAVAILABLE error
    Description : WGL: Driver does not support OpenGL version 4.3
    Stacktrace :
    org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1361)
    org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1521)
    core.kernel.Window.create(Window.java:61)
    core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    core.Main.main(Main.java:10)
    Exception in thread "main" java.lang.RuntimeException: Failed to create window
    at core.kernel.Window.create(Window.java:64)
    at core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    at core.Main.main(Main.java:10)
    ————————————————————————
    BUILD FAILURE
    ————————————————————————
    Total time: 2.711s
    Finished at: Thu Oct 25 16:49:01 CEST 2018
    Final Memory: 5M/77M
    ————————————————————————
    Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project engine: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

    To see the full stack trace of the errors, re-run Maven with the -e switch.
    Re-run Maven using the -X switch to enable full debug logging.

    For more information about the errors and possible solutions, please read the following articles:
    [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

    I'm developping with netBeans

  8. WGL: Driver does not support OpenGL version 4.3 – My Open GL supports upto 4.0 over that it has a shader error. Any way to change this?

  9. For all the people, getting [LWJGL] GLFW_VERSION_UNAVAILABLE error:
    Check the opengl version your system supports (by installing openGL extension viewer or whatever),
    then go to window.class and choose the correct version for your system
    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);

  10. oh man!! what does this mean:

    at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1517)
    at core.kernel.Window.create(Window.java:61)
    at core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    at core.Main.main(Main.java:10)
    Caused by: java.lang.IllegalStateException: GLFW windows may only be created on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. For offscreen rendering, make sure another window toolkit (e.g. AWT or JavaFX) is initialized before GLFW.
    at org.lwjgl.glfw.EventLoop$OffScreen.<clinit>(EventLoop.java:37)
    … 4 more

  11. I get this error: [LWJGL] GLFW_VERSION_UNAVAILABLE error
    Description : WGL: Failed to create OpenGL context
    Stacktrace :
    org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1361)
    org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1521)
    core.kernel.Window.create(Window.java:61)
    core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    core.Main.main(Main.java:9)
    Exception in thread "main" java.lang.RuntimeException: Failed to create window
    at core.kernel.Window.create(Window.java:64)
    at core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    at core.Main.main(Main.java:9)

  12. I am working on Mac, and I followed the tutorial. It works but my window only shows red flickering. 🙁

  13. I really love all those peoples creating free contents to teach something to other people, I will did my own videos about OS programming when my first prototype will be advanced enough (so not tomorrow, I am creating an emulator first + I have to finish my studies) but you and all the other one are really inspiring for my, love you all <3

  14. When i make the Main.java , It gives me an error at the core.kernel import and the Game g = new Game();

  15. Hey, can you help out, I'm getting the Error:
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1517)
    at core.kernel.Window.create(Window.java:61)
    at core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    at core.Main.main(Main.java:10)
    Caused by: java.lang.IllegalStateException: GLFW windows may only be created on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. For offscreen rendering, make sure another window toolkit (e.g. AWT or JavaFX) is initialized before GLFW.
    at org.lwjgl.glfw.EventLoop$OffScreen.<clinit>(EventLoop.java:37)
    … 4 more
    Thanks in advance

  16. Hi, I'd like to start your tutorial. But when I run the program it immediately crashes and I get the following output:

    no material in polygon of: Dome
    obj loading time : 16ms
    OpenGL version: 4.3.0 – Build 20.19.15.4463 bytes
    Max Geometry Uniform Blocks: 35372 bytes
    Max Geometry Shader Invocations: 36442 bytes
    Max Uniform Buffer Bindings: 35375 bytes
    Max Uniform Block Size: 35376 bytes
    Max SSBO Block Size: 37086 bytes
    modules.gpgpu.NormalMapShader Validation Error: A sampler points to a texture unit used by fixed function with an incompatible target.

    Please help! Thank you very much!

    Process finished with exit code 1

  17. Hey, könntst du ein video machen indem du durch den start code gehst. Auch wenn man ein gutes verstehen von lwjgl hat ist es dann einfacher zu folgen, wenn man die base engine kennt.

  18. more videos plz..👨‍💻 ,I'm making small game with opengl ,hope to pass my uni test so I will have time to follow this tutorials too…very interesting.

  19. i tried to run it but it crashed. can you please help me?
    this is my error: [LWJGL] GLFW_VERSION_UNAVAILABLE error
    Description : WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable
    Stacktrace :
    org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1361)
    org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1521)
    core.kernel.Window.create(Window.java:61)
    core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    core.Main.main(Main.java:9)
    Exception in thread "main" java.lang.RuntimeException: Failed to create window
    at core.kernel.Window.create(Window.java:64)
    at core.kernel.CoreEngine.createWindow(CoreEngine.java:41)
    at core.Main.main(Main.java:9)

  20. This might be the first time that I got THIS excited for a YouTube series. When I was looking at what I could do with Java, I always ended up looking at your 3D engine trailers. It's just so beautiful and I can't wait to follow along with it!

  21. Your scenes look amazing. I would love to finaly see a completed series on openGL in java. A lot of older tutorials are great but most of them are realy old. If I could help with anything, don't hesitate to contact me.

  22. Will it also include more detailed explanation of the displacement maps? I mean not just theories, but also visually seeing writing the code?

  23. Awesome man, I was waiting for someone to start doing something like this; Benny did a good series, but I always felt like he was missing some extra features, hdr, bloom etc.

    How far will you be taking this series?

  24. Sorry for the Ad, I forgot to check the music's copyright… Next time I will choose the right music again

Leave a Reply

Your email address will not be published. Required fields are marked *