Setting up the Window with LWJGL | Coding a 2D Game Engine in Java #1 @GamesWithGabe
Setting up the Window with LWJGL | Coding a 2D Game Engine in Java #1  @GamesWithGabe
Uploaded March 2020 | Updated September 2026, 2 weeks ago
Join the Discord: discord.gg/4tHeAkxNg7

In this tutorial I go over how to create a Window class that will create and handle the window resources using GLFW and OpenGL. I explain LWJGL's startup guide which also creates a window. I also modify it a bit so that the window is a singleton that will be able to be accessed anywhere in your codebase.

LWJGL: lwjgl.org/download
Code for this tutorial: github.com/codingminecraft/MarioYoutube/tree/3303271a99c747c1d2d83bf9357d94bdef5f0bd9
Completed Game Code: github.com/codingminecraft/Mario

---------------------------------------------------------------------
Website: ambrosiogabe.github.io
Github: github.com/ambrosiogabe

Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)

My Recommended Game Engine Books:
Game Engine Architecture: gameenginebook.com
Game Physics Cookbook (Read this before the next physics book): amazon.com/Game-Physics-Cookbook-Gabor-Szauer/dp/1787123669
Game Physics (Ian Millington): amazon.com/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768
Game Programming Patterns (Free): gameprogrammingpatterns.com

My Recommended Beginning Game Programming Books:
JavaScript Game Design: apress.com/gp/book/9781430247166

My Recommended Java Books:
Data Structures/Algorithms: amazon.com/Data-Structures-Algorithms-Java-6th-ebook/dp/B00JDRQF8C
LWJGL (Free, but I haven't read this thoroughly): lwjglgamedev.gitbooks.io/3d-game-development-with-lwjgl/content

Outro Music: bensound.com/royalty-free-music
Setting up the Window with LWJGL | Coding a 2D Game Engine in Java #1References | C++ For Java Devs Ep. 10Drag N Drop Level Editor | Coding a 2D Game Engine in Java #23Even More Bug Fixing | Coding a 2D Game Engine in Java #44Broadphase Collision Detection | Coding Geometry Dash in Java #23Dirty Flags in Rendering | Coding a 2D Game Engine in Java #15Circle vs Shape Collision Detection | Coding a 2D Physics Engine in Java #10Converting Screen Coords to World Coords | Coding a 2D Game Engine in Java #22Structures and Namespaces  | C++ For Java Devs Ep. 7Sounds with OpenAL | Coding a 2D Game Engine in Java #46The State Manager | Java Snake Part 2Rotating Points in 2D Space | Coding a 2D Physics Engine in Java #5
GamesWithGabe |

Setting up the Window with LWJGL | Coding a 2D Game Engine in Java #1

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER