Questions tagged [libgdx]
The libgdx project is an open-source cross-platform game development library written in Java. It abstracts away the differences between writing OpenGL-based games on various platforms.
40 questions
0
votes
1
answer
101
views
Refactor Main Class of LibGDX Breakout Game
I started learning basic game dev with Java's LibGDX. For my first project I decided to code a Breakout clone so I can learn the basics. Currently the game fully works - the player can destroy all ...
5
votes
1
answer
191
views
Drawing a grid-based particle system
For some time now, I've been working on a game which is superficially similar in appearance to this one. A world is filled with particles that move and change state frequently (per frame, often). ...
1
vote
1
answer
79
views
Path Following Algorithm for Entity
Within my game there are many entities, where each entity has a path (Array<Vector2>) assigned to it. No path to follow (indicating that the entity should ...
5
votes
1
answer
118
views
Draw the tiles of the islands that are within bounds, using LibGDX
I am new person regarding LibGDX. I have written the below render method. I have a randomly generations oceans (where there are islands at random positions). Within the below code, ...
4
votes
2
answers
144
views
GameOfLife on GDX
I would like to know if I did everything right and if there a way to do it more simple and\or better?
GameOfLife - main
...
2
votes
0
answers
96
views
Don't Update Every AI Every Tick
In my game there are AI characters that try to either steal your gold or destroy the walls of your castle. Previously I simply updated them all every second, but with a large number of characters on ...
3
votes
0
answers
295
views
Drawing in libgdx
I have made a Java clone of the popular 2048 game. It works, but I drew the UI in the correct way.
Images so you know what we're discussing:
I'm basically not sure how to do this, whether I should ...
4
votes
1
answer
678
views
2048 clone in libgdx, handling assets, and OOP overkill?
I have created a 2048 clone, I wanted to take on a simple project since I have never actually finished anything. Now I have, though I'm not a hundred percent happy with the result.
Images so you know ...
3
votes
0
answers
135
views
Loading image/texture sprites on GameScreen in LibGDX
I'm new to this framework, LibGdx. I need advice/suggestion for my game. Is it okay if I load my images in a single class? I'm a beginner and started learning LibGdx. I already coded my game screen ...
5
votes
1
answer
139
views
Teaching an Old AI New Magic Tricks
Recently I wanted to teach the AI of my castle game how to use the spells that I have added to the game. You can try out the game here: Castleparts
Initially I thought that I would have to add ...
9
votes
1
answer
708
views
Creating and playing animations for a game using LibGDX
It feels like there's quite a lot of code involved in order to manually build up an animation using the libGDX framework. In my specific case, I am creating a number of animations for a portrait view ...
5
votes
3
answers
416
views
Finding and moving the next obstacle in a player's path
This code finds the next obstacle in the player's path, then moves it. I am trying to make it more efficient, because this code runs for each frame, and it lags a bit. It does work though.
There are ...
1
vote
1
answer
161
views
Organizing Blockers and Ingots
What are the best practices to writing clean, expandable game code? I always end up getting overwhelmed with my games because the code gets very unorderly. I use OOP (java), but I still feel like my ...
10
votes
1
answer
271
views
Game Tutorial in Java
I’ve been working on a Rampart inspired multiplayer game for a few weeks now, and it is finally in a playable state. The big thing left to do before going alpha was to add a tutorial to the game.
I ...
2
votes
0
answers
85
views
Alternative to clicklistener inside an anonymous class
For a trivial word game, I wrote the following code for the player to choose one of the two choices of words that in turn were read from a sentence.
My question lies in first in the click-listener of ...