Quantcast
Channel: Question and Answer » libgdx
Browsing all 434 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Rotating, moving and scaling a mask in a shader

I want to rotate, move or scale a mask in a shader. But I have no clue to how perform these actions. My code: @Override public void create() { batch = new SpriteBatch(); background = new...

View Article


score displaying system without using bitmap

how to make a score displaying system without using bitmap in libgdx. I making a fluppy bird remake somone can explaim me in details?

View Article


2D LibGDX Collision Avoidance [duplicate]

This question already has an answer here: How does A* pathfinding work? 11 answers

View Article

Image may be NSFW.
Clik here to view.

Is there an optimal method to implement moving background?

I am trying to develop a little game using libGDX. We have a hero who jumps and world consist of dynamically created moving platforms in an auto side-scrolling manner. I wanted background to scroll at...

View Article

error after changing the app name

I have made a game in Libgdx(eclipse).I changed the name of the app inside the string.xml file.Now I have an error in AndroidManifest.xml. in this line: android:label=”@string/app_name”‬ (line 12). its...

View Article


Image may be NSFW.
Clik here to view.

Get a body from TiledMap via MapBodyBuilder and draw a sprite on it in LibGDX?

I use a various of MapBodyBuilder in my Libgdx project. I created a body from map.tmx via my MapBodyBuilder and in my SpriteBuilder buildSprite method i created its sprite: sprite = new...

View Article

Rotate sprite along the angle between two objects

Im trying to make flames follow my object, I set the direction for my moving object using the points between it and another object (using static destination for testing). No matter what I do I cannot...

View Article

libgdx tiledmap rendering optimazation

I’m new to game development can anyone show me how to render tiles which were only seen by the camera I cant seem to find straight answer in google. The game is in 2D and im using tiled

View Article


Scene2D: How to use Image.setDrawable()

I’m trying to change the texture of an Image actor on my Scene2D stage, however I can’t seem to get it working. It seems like setDrawable() doesn’t really do anything. For example, this will make the...

View Article


Changing the direction of a particle in libgdx java

I have a particle the explodes upwards. This would work the way I want if the particle always hit the ground. However I want the particle to explode at a -90 degree angle if it hits a wall from the...

View Article

UE4 or Unity or Libgdx for VR project using Oculus rift and Novint falcon

I’ve to make a multiplayer game Air Hcokey using 2 Oculus rift and 2 novint falcon controllers , I know that these 3 engines support the Oculus Rift but have no Idea if they do support the Novint...

View Article

Shaperenderer circle line width

Is there any way to increase the width of the line that makes up the shaperenderers circle? shape.begin(ShapeRenderer.ShapeType.Line); shape.setProjectionMatrix(batch.getProjectionMatrix());...

View Article

Libgdx : surround sound

in libgdx there is a lot of audio classes but i haven’t seem to of found anything relating to balancing sound in one speaker and or the other to get surround sound say you check if an object is more to...

View Article


libgdx drawn a projectile trajectory cannot render

I am looking to draw a projectile trajectory . I found a lot of code such as : http://blog.gemserk.com/2012/07/03/drawing-a-projectile-trajectory-like-angry-birds-using-libgdx/ The code I editor; if I...

View Article

Libgdx – Viewport for Tetris-style game [duplicate]

This question already has an answer here: building a game for different resolution phones 3 answers

View Article


Image may be NSFW.
Clik here to view.

How to draw a BitmapFont every user click

Im starting learning the libgdx framework and I want to “clone” some games. I know how to handle touch with if(Gdx.input.isTouched()) But how do I render new fonts every time user clicks on the screen?...

View Article

LibGDX: Box2d hovering, rotating body

Hello I am working on a hovering triangle (equilateral triangle). The triangle should allways rotate at a constant speed and hover over the ground. The problem is if I setAngularVelocity it does rise...

View Article


libgdx Vector.cpy question

Why do people use this: public void set(Vector2 v) { this.vector2 = v.cpy(); } insted of just using: public void set(Vector2 v) { this.vector2 = v; } What I don’t know that I should know?

View Article

Fading in and fading out animations

This is how I’m creating my player. Is there any way to start fading in and fading out for an amount of time when I get hit? private Texture tex = Game.res.getTexture("player"); public Player(Body...

View Article

Call touchUp() programattically for sprite in LibGDX

I’m trying to call touchUp() for a sprite i’ve created in my app. i’m getting success but the co-ordinates do not match while i call it manually. final int x = (int)mySprite.getX() + 10; final int y =...

View Article
Browsing all 434 articles
Browse latest View live