Skip to main content

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.

0 votes
1 answer
64 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 ...
ViceroyFaust's user avatar
5 votes
1 answer
151 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). ...
paleto-fuera-de-madrid's user avatar
1 vote
1 answer
59 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 ...
Mario Ishac's user avatar
5 votes
1 answer
100 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, ...
Mario Ishac's user avatar
4 votes
2 answers
98 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 ...
Eugene Shymko's user avatar
2 votes
0 answers
82 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 ...
bazola's user avatar
  • 8,569
3 votes
0 answers
274 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 ...
The Coding Wombat's user avatar
4 votes
1 answer
630 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 ...
The Coding Wombat's user avatar
3 votes
0 answers
116 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 ...
zarawayun's user avatar
5 votes
1 answer
106 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 ...
bazola's user avatar
  • 8,569
9 votes
1 answer
670 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 ...
bazola's user avatar
  • 8,569
5 votes
3 answers
372 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 ...
Wyatt's user avatar
  • 61
1 vote
1 answer
131 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 ...
Wyatt's user avatar
  • 131
10 votes
1 answer
243 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 ...
bazola's user avatar
  • 8,569
2 votes
0 answers
66 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 ...
Josef Young's user avatar

15 30 50 per page