Skip to main content
2 votes

How to make shake effect on camera in LibGDX?

This is a good example: Create a Rumble class to manage the shaking: ...
Morchul's user avatar
  • 317
2 votes
Accepted

Fixed timestep, updates per second keeps changing?

Having a constant time-step does not mean that you force your client to update exactly 60 times per real-life second, it means that whenever you update your physics the timestep you send to your ...
Applekini's user avatar
  • 8,543
2 votes

Is passing big objects in parameters not performant?

In Kotlin the size of the object passed via parameter does not impacted performance. Here's why: Kotlin is designed to be fully interoperable fully with Java. Java alway uses pass-by-value. In Java ...
Pikalek's user avatar
  • 13.4k
2 votes

Extracting cell center and corner points from rasterized Voronoi diagram

It is better to generate a Voronoi diagram as vectors first, e.g. via Fortune's Sweepline Algorithm, then rasterise. If, however, you are dead set on using the rasterised version as a basis, then you ...
Engineer's user avatar
  • 30.4k
2 votes
Accepted

Conway's game of life algorithm does not work

Your if statements are not correct. Lets assume neightbors = 2 (2 neightbors) and grid[col][row] = true (the cell is alive) The ...
Ferrybig's user avatar
  • 138
2 votes

Access violation when using shaders in LWJGL 3

Switch the statements glfwMakeContextCurrent() and GL.createCapabilities() ...
cozmic's user avatar
  • 477
2 votes
Accepted

How do I implement data persistence?

It largely depends on a game, but generally, it seems like you have a classic RPG/FPS/Arcade composition, where you have: a Game instance (roughly speaking, this is your launched executable), Game ...
Kromster's user avatar
  • 10.7k
1 vote
Accepted

Is it a good idea to detect collisions in 2D game on different thread?

Probably not. In a game, we usually don't want collisions to be processed eventually — we want them processed now. We have hard time constraints: we want to integrate all object motion forward one ...
DMGregory's user avatar
  • 141k
1 vote
Accepted

What rotation needs to be applied to align mesh with expected axis of target?

I converted to using a quarternion to hold the value of the rotation which I could readily create from the normals, so the "fix" was for me to understand how rotations work better. For the ...
Mark Fisher's user avatar
1 vote

What rotation needs to be applied to align mesh with expected axis of target?

3 direction unit vectors contain all the needed information for rotation. So there are 2 solutions: Having calculated the centres and the 3 direction unit vectors you can build a matrix that would ...
Sergio's user avatar
  • 108
1 vote

Android Game - Screen Flickers When an Entity Removed From The List

Apparently removing an item from a list that you are iterating isn't such a good idea. Separating the cleanup/removal process from the render for each loop fixed the issue. ...
DeveloperKurt's user avatar
1 vote

Action never fires

You're passing the result of calling MenuScreen() as your call back. What does that function return? Perhaps you meant simply MenuScreen, which is a function. Other than that I can't tell what's wrong....
BugSquasher's user avatar
1 vote

Missing texture after add new actors

In BaseActor class I was clearing screen with Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT). After removing it, everything works as ...
Alcadur's user avatar
  • 111
1 vote

Getting solid black color when texture is added to GLSL

The OpenGL specification states: If a fragment shader uses a sampler whose associated texture object is not complete ... the texture image unit will return(R,G,B,A)=(0,0,0,1). The first thing to ...
Maximus Minimus's user avatar
1 vote

How to make shake effect on camera in LibGDX?

My approach to this problem is to create a child class of an OrthographicCamera() and add some functionality to its update() ...
Divelix's user avatar
  • 169
1 vote
Accepted

Do I need to dispose Pixmap in Actor?

As other answer stated, in this case it is fine to dispose the Pixmap right after the Texture creation. However, (especially) if you are on Android (but elsewhere too), you should load your Textures ...
Darkyen's user avatar
  • 78
1 vote

Focus scene2d UI actors programmatically in libGDX

I wanted to build something very similar but I didn't love the idea of manipulating the cursor like the other answer as it feels really hacky, though it might work. In my case, I was also looking to ...
myyk's user avatar
  • 111
1 vote

Access violation when using shaders in LWJGL 3

I figured it out. It's throwing an exception because by constructing the StaticShader class when I declare it in my Main class variables, gl functions are being called by StaticShader's constructor ...
Alex's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible