As a user of the libGDX, I learned so much about OpenGL, I have to share a bit of that experience with you.
Lately, I’ve been working a lot on my first game release Timbertales again, which was written completely in libGDX. On previous games, I used to work with Godot Engine, so I have the perfect setup for talking a bit about the pros and cons of developing with the help of a Framework compared to a game engine. Let’s get started.
Why I decided to go with libGDX?
I have a strong backend developer background. In my first company I was one of the backend developers of a browser game. That means I had actually quite zero experience with game engines and I was used to write everything by myself. I also had the mindset that I want to learn everything and if I use Frameworks, engines etc there would be too much knowledge missing for me. In general I always like to know how a Framework or engine works in the background.
That was the reason why I started with java native openGL development first 😀
After a while I realized how much effort it takes to simply draw something. A friend of mine recommended the use of the libGDX Framework, since it has already a lot abstraction from native openGL and it is much easier to use. I switched to libGDX and got used to it very fast. Today, after using Godot Engine for quite a while I know how much work I still had to put into the code even with libGDX, but the control you have is awesome. Also I have to admit that I learned so much about openGL etc. which I would miss today if I had used Godot in first place.
What are the advantages of libGDX?
As I already said you have a lot of control with libGDX you can handle the draw cycles by yourself and react to any input at the base level. There aren’t actually much requirements for your code you can design your game code as you want. In Timbertales I most likely wrote my own hex tile engine together with my own map editor. I had to write mostly everything by myself how to place the tiles, z-indexes and converting map coords to mouse coords etc. In Godot you could just import your tiles place them in a GUI editor and have fun 😀 I had to write everything by code or create an editor for it to make this happen. This comes with another advantage of the libGDX Framework – It is really slim and you don’t have much overhead or much space used for your game. Another advantage for me was to write the code in Java, since I was very used to it.
This section completely depends on what you are trying to achieve. If you want to make a game I would highly recommend to go with a game engine today! But if you would like to write your own game engine you need to stick other tools and software may be libGDX. I had a hard time to create all tools such as map editor by myself and with libGDX I had to do a lot of extra work to get small things happen, but as I said if you want to write your own tools for your engine / game then this is may be the right way. You can see – It always depends on your need. Today I can say for me a game engine would have better fitten than libGDX for Timbertales. A bigger problem you can have with libGDX it is based on java this means you need a JVM to run your game this makes it quite hard to impossible to port your game to consoles. If you would like to publish your game on consoles you should keep this in mind.
The most important thing is your Engine or Framework needs to fit your needs. There are a lot of different tools out there for game development and you need to find the best fitting for yourself. Most of them have their reason for being. I really love how much I could learn while developing with libGDX, but for releasing or just producing a game Godot Engine or other game engines may be are the better choices.