3 ms·
Great work, you have inspired me to go and write some code. Could you explain a bit further how you structured your game? I'm using LibGDX too but find the Act
by dysoco 13y ago
Great work, you have inspired me to go and write some code.
Could you explain a bit further how you structured your game? I'm using LibGDX too but find the Actors, Scenes, etc. a bit confusing, are you using any of these?
How did you learn LibGDX? With the official documentation and wiki, it seems very complete, but not sure if there's a better resource.
Thanks, and I hope you keep making games!
- babuskov 13y agoInitially, I also got confused by Actors, Scenes, etc. and did not use it. I figured it out later, but a lot of code was written already. In my code I have a lot of arrays and objects that represent the objects in the game. For example, I have an array named Fleet that keeps track of all aliens. The I have an array named Bullets, and one named Particles and one named FloatingTexts, etc. Now, all these would be Actors and you would place them in Scene instead of having a lot of separate array. I also used Sprites for some stuff, but I also have a lot of pure batch.draw() calls for one-off copying directly from texture. When you use the Sceen model, you use Actors instead of Sprites. I used to make games using SDL, so I'm used to blitting the graphics purely by coordinates and just build my own stuff over it, but Scene-Actor stuff is very well done, I will use it for my next game for sure. It also comes with some nice UI elements, which I also had to invent myself in mine code. The best resource was asking questions at Stack Overflow. You can also google for some stuff, but beware, some of the code out there is suboptimal as you can see in my post about making screenshots.