Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
LibGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, iOS and your WebGL enabled browser.
0
votes
Accepted
Scaling a single scalar using OrthographicCamera
Turns out this was pretty easy. You know the width of the screen, you know the width (and zoom) of the camera's viewport...just math it up:
fun Float.metersToPixels(cam: OrthographicCamera): Float {
…
0
votes
1
answer
45
views
Scaling a single scalar using OrthographicCamera
I'm trying to convert a length (well, a radius) from world coordinates to screen coordinates using an OrthographicCamera. However, the only method I've figured out so far is to do a projection, with s …
2
votes
1
answer
535
views
Framerate-independent game loops and discrete tasks
When writing good framerate-independent game code, you take some sort of deltaTime parameter in your main render() function and then scale your calculations based on that -- this is essential for thin …
0
votes
0
answers
394
views
LibGDX Scene2D and updating labels inside a table
I have a (Scene2d) Table containing a Label, both added to a Stage, and I'm properly calling stage.act(float) and stage.draw(). However, if I modify the text of the Label (using setText()) to be wider …
1
vote
3
answers
861
views
Incrementally processing large number of entitites in an entity-component system
LibGDX/Ashley has a class IntervalIteratingSystem that allows you to process all entities in a particular family every X milliseconds. …
1
vote
Incrementally processing large number of entitites in an entity-component system
I ended up implementing #4 above (in Kotlin). Seems to work alright.
import com.badlogic.ashley.core.Engine
import com.badlogic.ashley.core.Entity
import com.badlogic.ashley.core.EntityListener
imp …
0
votes
1
answer
727
views
Wavy effect/shader in LibGDX
Usage (search for FlxWaveEffect)
How does one go about creating a similar effect in LibGDX? …
1
vote
What component should hold the bool attack and vector target?
Not sure if this exactly meets your needs, but you could also create a separate POJO that encapsulates attack and target and use this inside {Player|Police|Criminal}Component (composition!). You'd sti …
3
votes
LibGDX - Image width is not set to resetting to zero when full width
I haven't personally used ProgressBar yet, but it looks like the right way to set the current percentage is using setValue(float), not setWidth(float). I'd start with that.
Also, saving your GameMa …
1
vote
How to access entites from scripts in an entity-framework?
, you'll end up implementing things in a very non-LibGDX/Ashley way and just creating more work for yourself. … While Unity3d forces every piece of executable logic to be attached to an entity, LibGDX/Ashley doesn't. …
1
vote
Box2d Fixed Timestep and Interpolation
The LibGDX docs recommend either 1/45f or 1/300f for that argument. I've personally been using 1/300f and it works fine. …