SilverTiger Development

Java Game Development

Last Part of the LWJGL3 Tutorial Is Done!

| Comments

The final part of my LWJGL3 tutorial is done, this time it is about adding game logic and handling collision detection.
You can take a look at it here.

It is a pretty short tutorial, but for a more in-depth guide on collision detection there are some links at the bottom of the tutorial.
The tutorial contains following contents:

  • Updating Entity Position
    • Euler integration
  • Checking for collision
    • Axis-Aligned Bounding Boxes (AABB)

I hope the tutorial helped you getting started with the new version of the Java Lightweight Game Library.
And thanks for reading the tutorials.

LWJGL 3.0.0a Released!

| Comments

Finally the first official release of the Lightweight Java Game Library is done, with Version 3.0.0a there where a few changes.

One of the important changes are the type postfixes of some functions, it will break some older code, but it can be easily fixed.

So what comes next? It seems like LWJGL3 is going to get support for Gradle and a binding to AMD’s Mantle, so that you can practice for the upcoming Vulkan API of Khronos because it is based on Mantle.

For more information on this release have a look at the official blog post.
You can get the release version in the download section of lwjgl.org or directly by clicking here.

In the next few days I will update the tutorial for LWJGL3 and will upload the last part of it.

Handling Input With LWJGL3

| Comments

A new part of my LWJGL3 tutorial is done! It is long overdue because I had not much free time because of my thesis.
But here comes the part for handling input!

In this part you will see the following contents:

  • Processing events
  • Keyboard input
    • Key input
    • Text input
    • Clipboard input and output
  • Mouse input
    • Cursor modes
    • Button input
    • Cursor position
    • Cursor enter and leave events
    • Scroll input
    • Path dropping
    • Cursor objects
  • Controller input
    • Button states
    • Axis states
    • Controlle name

The next part will presumably be the last one, and it will be about game logic like creating a simple AI and collision detection.

LWJGL3 Tutorial - Batch Rendering

| Comments

The next part of the LWJGL3 Tutorial is out! In this part we are looking into batch rendering.
With batch rendering you can dynamically fill your buffer, but most important you will have less state changes, so you get more performance out of it. Batching is great, even if you want to use legacy OpenGL with immediate mode.

The tutorial isn’t as long as the last parts, so here’s the list what it contains:

  • Initializing a batch
    • Different usage hints for buffers
  • Filling and drawing with a batch
    • Buffer mapping

Feel free to comment if there are issues or something.
In the next part we will take a look into input handling!

Textures and Fonts Tutorial for LWJGL3 Is Available

| Comments

Another new tutorials is finally available at GitHub! In this part we look into using textures with shaders.
In an sub-part of the tutorial it is explained how to use textures to do font rendering in OpenGL!

Now a quick overview what to learn in the new tutorials:

Texture tutorial

  • Creating textures
    • Wrapping
    • Filtering
    • Uploading the pixel data to the GPU
  • Using the texture in shaders

Font tutorial

  • Creating a texture atlas
    • Loading TrueType Fonts
    • Determine width and height for the texture
    • Generating the texture and draw font glyphs on it
  • Rendering the text

That font rendering part is already using batch rendering, so the next tutorial will be about how to create a batch!

New Tutorial for LWJGL3 Available: Rendering With Shaders

| Comments

It has been some time but a new part of my tutorial series is done! The new part of the tutorial is about rendering with shaders!
For that tutorial OpenGL 3.2 core profile was used, but for the older computers there is also described how to do the rendering with OpenGL 2.1.

Like always the following list will show you what the tutorial contains.

  • Creating an OpenGL context
  • Vertex Array Objects
  • Vertex Buffer Objects
  • Shaders
    • Vertex shaders
    • Fragment shaders
  • Shader Programs
  • Rendering
    • Interpolation

That’s all for this tutorial, in the next part we will take a look into textures and how to use them for text rendering.
Until then stay tuned and happy rendering!

Game Loop Tutorial for LWJGL3

| Comments

The next part of the LWJGL3 Tutorial is done. This time it is about game loops and contains a sub part for timing calculations.

The game loop tutorial as well as the timing sub tutorial will cover the following parts:

  • Variable timestep loop
  • Fixed timestep loop
  • Getting the system time
  • Calculating delta time
  • FPS and UPS calculation

The next part of the tutorial will be about rendering with shaders.

Introduction to the LWJGL3 Tutorial

| Comments

Finally the first part of the Lightweight Java Game Library 3 Tutorial is done! You can access it here.
In this part you get a quick overview about the creation of a simple application including how to setup your IDE.

The Introduction will cover the following parts:

  • Setting up LWJGL3
  • Initializing GLFW3 and callbacks
  • Creating OpenGL context
  • A simple update and rendering loop
  • Ending an application

Feel free to comment the tutorial or write me a message for feedback.

For the next tutorial I plan to write about game loops.

Welcome to My Blog!

| Comments

First I have to thank Octopress for a great blogging framework and GitHub for providing this page!

‘So what is this blog about?’ you may ask. I will use this blog to show you game development with Java and OpenGL.
When you hear OpenGL and Java you will probably also hear about these two libraries:

  • JOGL is a part of JogAmp, which provides you with bindings to OpenGL, OpenCL, OpenAL and OpenMAX.
  • LWJGL stands for Lightweight Java Game Library and provides you also with bindings to OpenGL, OpenCL and OpenAL.

So it is up to you which to use, they are both great libraries for high-performant computer graphics programming with Java. Personally I use the LWJGL for graphics programming.

About me

I’m a computer science student from Germany and in a few weeks I will start my bachelor’s thesis about computer graphics.
During my course of studies I learned programming with Scheme, Java, C# and C++. Well I also learned PHP and JavaScript but that were merely the basics in my opinion.

In my free time I am a gamer and a programmer, or just lurking around in the Internet, for example you could find me on JGO which is a small community of Java game programmers, so if you like Java game development you should check it out!

Next Steps

Soon I will start a tutorial for the new LWJGL3 in which I will show you how to use the that library to create a simple game! I’m looking forward for it!