0
votes
1answer
22 views

LibGDX - Textures rendering at wrong position

Update 2: Let me further explain my problem since I think that i didn't make it clear enough: The Y-coordinates on the bottom of my screen should be 0. Instead it is the height of my screen. That ...
0
votes
0answers
23 views

vertical lines on texture in libgdx

i am getting vertical lines on my texture even though i tried implementing texture filters,both linear and nearest and still i get the lines.how do i get rid of it? here is the code: package ...
-1
votes
1answer
47 views

Libgdx change color of Texture at runtime [closed]

i allready asked this on Stackoverflow, but i think this question may belong here. In a Libgdx game i have some Animations for my Player. All the Frames for this Animation are inside a TextureAtlas. ...
1
vote
0answers
30 views

libgdx - Image artifacts when downscaling image

Why does this border appear around the edges when I downscale a bitmap and how do I avoid it? I tried every filter I know, the results go from bad to worse. Here's the original bitmap:
1
vote
1answer
206 views

How do I combine images into a single entity in libgdx?

I've googled this but can't seem to find anything on "concatenating" two images, especially with libgdx. Any ideas?
2
votes
1answer
145 views

How do I split a texture into differently shaped pieces with libgdx?

I want to split a texture into variously shaped pieces with libgdx, like the pieces of a puzzle game. TextureRegion.split() is not an option, as it splits into equally sized rectangular texture ...
0
votes
0answers
56 views

Slowdown in sliding background with Libgdx

I´m new with libgx and i have a basic question. I want an background like an image that repeats indefinetely, and moves down. I did with 2 images and it worked, but the problem is that is very slow. I ...
1
vote
0answers
136 views

LibGDX render sprites in tiled-map format ( convert texture to sprite )

I am creating a game in which till now I have used textures to create A 2D tiled game. I have created a matrix which converts the touch co-ordinates into a array index number and according to that ...
0
votes
3answers
218 views

Why is my texture drawn in a different place when in fullscreen?

I'm trying to draw a texture (with a crescent moon) in the middle of the y-axis: public void draw(SpriteBatch batch) { batch.draw(lune, 0, Gdx.graphics.getHeight() / 2); } It renders this when ...
5
votes
2answers
152 views

How to make part of the Texture not to be scaled.?

I am new to LibGdx, i was doing one example for my learning and struck with this question, i had searched in google but i am not able to find the answer for this. 1) How to make part of the Texture ...
2
votes
2answers
144 views

Replicating no. of sprites without letting the app to slow down and crash

Is it possible that if I'm making a a simple drag-n-drop game, does making a new sprite via constructor with texture as a parameter makes the game slower and depletes more memory until it crashes or ...
0
votes
1answer
93 views

Is it possible to display no white images/sprites when using the latest Android OS?

Was it okay to use Texture.setEnforcePotImages(false) in order to disable conditional width and height pixel size that requires power of 2? I'm planning to sell the game app at Google Play. I want to ...
8
votes
2answers
349 views

How can I implement a scanline effect?

I am working on an old-school platformer in libgdx and I want it to have a "scanline" effect, like this: My first attempt was to make a little texture and draw it on a full-screen quad. I used two ...
4
votes
2answers
896 views

LibGDX stretching 2d graphics

I have a problem with stretching sprites in LibGDX. I have one png file for the sky in the game (1 x 1000px) and I want to render it 1000 x 1000px sprite.setSize(pixelWidth,pixelHeight); I want to ...
1
vote
1answer
81 views

Images not found in textureregion

Previously I was using simple Texture for sprite based animations, but that did not provide support for images which were not in the power of 2. TexturePacker provides with the ability to load all the ...
1
vote
0answers
211 views

Texture Region drawing issue with LibGDX

I am currently moving my old slick2d project to libgdx. I have created a custom AnimationExt class that extends Animation to which I added a draw method. The Animation's frames are actually ...
1
vote
2answers
645 views

How do I use TextureRegion?

I can't understand how to use texture region. I have a png file which has images (sprite sheet) and I must "extract" every image I want. From here it just says TextureRegion(texture, 20, 20, 50, ...
4
votes
1answer
797 views

Problem Implementing Texture on Libgdx Mesh of Randomized Terrain

I'm having problems understanding how to apply a texture to a non-rectangular object. The following code creates textures such as this: from the debug renderer I think I've got the physical shape ...
0
votes
1answer
545 views

Using compressed(ETC1) textures in LibGDX

I use standard android tool for compressing PNG texture and archiving it with gzip: /android-sdks/tools/etc1tool texture.png --encodeNoHeader gzip texture.pkm Then I try to load it: FileHandle ...
0
votes
1answer
212 views

Devices or Smartphones That Can Run and Displayed Images Properly While Power of 2 Code is Disabled

Before making game apps, I want to have any certain smartphone device brands that runs on OpenGL. I have to make a code for images that doesn't need to required power of 2 images so that I can resize ...
1
vote
1answer
2k views

Repeat texture in a scrolling game

The bottom region of the screen is filled by a repeated texture: grassTexture = new Texture(Gdx.files.internal("images/grass.png")); grassTexture.setWrap(TextureWrap.Repeat, TextureWrap.Repeat); ...
3
votes
1answer
1k views

How do I generate mipmap .png and model .obj files for LibGDX?

I'm playing a bit with LibGDX (OpenGL ES 2.0 wrapper for Android). I found some sample code which used prepared files to load models and mipmap textures for them, e.g., at ...
6
votes
1answer
4k views

Repeat texture in libgdx

How to fill region with repeated texture? Now I'm using next method: spriteBatch.begin(); final int tWidth = texture.getWidth(); final int tHeight = texture.getHeight(); for (int i = 0; i < ...
0
votes
2answers
6k views

How to rotate a sprite on circle in android using Libgdx

Dear Fellow Game Developers i am newbie to Android Game Development,i like to know how we can develop a sprite rotate in circle on android,with help of libgdx, i do have a image in assets ...