Batch Rendering in LWJGL3 | Coding a 2D Game Engine in Java #11

Channel:
Subscribers:
59,500
Published on ● Video Link: https://www.youtube.com/watch?v=oDh80Hmv7jM



Duration: 44:04
17,313 views
0


Join the Discord: https://discord.gg/4tHeAkxNg7

I apologize in advance for this lengthy tutorial, unfortunately there is no easy way to create a batched renderer in 20 mintues, so this one is a bit long :)

In this tutorial, I go over how to create a 2D batched renderer, that is able to render thousands of sprites at 60 FPS. This will increase framerates from 1 FPS, to 60 FPS. What I go over, is how to use the game objects transform to create a set of vertices for every single quad inside the batch renderer, and then upload that vertex buffer to the GPU every frame.

Then, I go over how to create a Renderer class that finds a RenderBatch that has room for a quad, or creates a new RenderBatch if there is none, and then adds the quad to that RenderBatch. The renderer will also sort the batches and render them to the screen.

Source Code: https://github.com/codingminecraft/MarioYoutube/tree/6f9ab380ffdb0617a3e265cac59ed7184a8580ac

Supplemental videos
===================
* https://www.youtube.com/watch?v=Th4huqR77rI
* https://www.youtube.com/watch?v=kBjlNxPRt1g
* https://www.youtube.com/watch?v=bw6JsLnx5Jg

---------------------------------------------------------------------
Website: https://ambrosiogabe.github.io/
Github: https://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: https://www.gameenginebook.com/
Game Physics Cookbook (Read this before the next physics book): https://www.amazon.com/Game-Physics-Cookbook-Gabor-Szauer/dp/1787123669
Game Physics (Ian Millington): https://www.amazon.com/Game-Physics-Engine-Development-Commercial-Grade/dp/0123819768
Game Programming Patterns (Free): https://gameprogrammingpatterns.com/

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

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

Outro Music: https://www.bensound.com/royalty-free-music







Tags:
gameswithgabe
games with gabe
lwjgl3
how to code game in lwjgl
batch rendering
how to create a batch renderer
2d batch rendering
batching in lwjgl
batch rendering in lwjg
batching in java
how to code a batch renderer
rendering lwjgl
java rendering
coding a game in lwjgl
how to code a game in lwjgl
how to code a game in java
lwjgl3 tutorial
lwjgl tutorial
java game tutorials
tutorials
lwjgl
java
game development
how to