Is there a difference in these two ways of rendering sprites?
I use an OrthogonalTiledMapRenderer: renderer = new OrthogonalTiledMapRenderer(world.getMap()); and I wonder if there is a differnce between this call: renderer.getSpriteBatch().draw(sprite,...
View ArticleWhich input event is suitable for this game?
I am trying to clone this game: http://www.ferryhalim.com/orisinal/g3/bells.htm As i am using libgdx, so the game is both for Android and PC. I was wondering which input event would fit in nicely. SA...
View ArticleLoading TextureRegion with filter diff from that of texture it came from
I am using libgdx . While packing my texture atlas I have set the filter for mag and min to Nearest . But for just one region I wish to draw it with linear filter . Is it possible to have different...
View ArticleHow does super.render() call this method?
Today I was experimenting with adding different screens with Scene2d in libgdx and while doing so I became confused how super.render() in my render() method from my starter class (MyGdxGame) called...
View ArticleLibGDX how to change animations
I have a Player Class and i have 3 different Animations for it. I can render them perfectly but i don’t know how to change from one animation to another. For exmaple i have 3 animations, one for...
View Articleget View from LibGDX for Android
I am making a LibGDX app, and I need to get the view to put to an Android app. Here is the code to get the view: package jangkoo.game.shadowfiend.android; import...
View ArticleHow do I find the shape of Tiled's circles or ellipses in libGDX?
I created a level in the ‘Tiled Map Editor’ and loaded it into my libGDX game. I can easily transform almost all objects into Box2D objects (although this problem is not Box2D specific), but I have...
View Articlebox2D and libgdx: Attach ParticleEffect to Body
Hello I am a newbie with libgdx, my question is: how could I add a Particleeffect to a Body that is moving? I searched about the matter and I didnt find anything related to it. I have the following...
View ArticleJBox2D Objects moving slowly (pixel to meter conversion) (SOLVED) [closed]
This problem is solved When trying to program a game using Box2D, I ran into a problem with Box2D. I filled in pixel numbers for the lengths of the the textures and sprites to create a box around it....
View ArticleRandom undirected graph generation
I would like to generate graphs randomly, like this: I have found that Box2d maybe can do it to me. But I do not know, how to use it, so how can I generate bobies after world initialization?
View ArticleLibgdx 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....
View Articlelibgdx universal tween engine how to control the tweening speed?
How can i control the speed of a tweening sprite? Here is the code: in create () /*try tween*/ w = Gdx.graphics.getWidth(); h = Gdx.graphics.getHeight(); texture = new...
View Articlerevolutejoint doesn't seem to rotate
I have a revolute joint set up as such in libgdx + box2d: RevoluteJointDef rjd = new RevoluteJointDef(); rjd.initialize(body1, body2, arm.getWorldCenter()); rjd.motorSpeed = 100.0f; rjd.enableLimit =...
View ArticleMouse coordinate conversion Libgdx
I have a camera: //Map is a my object that wrapper of TiledMap class In the create method: this.renderer=new OrthogonalTiledMapRenderer(this.map.getMap(); this.camera=new OrthographicCamera();...
View ArticleLibgdx/Box2D PolygonShape has no position… well, what now?
As my prototype works perfectly fine I want to advance to more fun areas of the project and add a more complex player-character body. So for Box2D I figured I’d need multiple fixtures, like one for the...
View ArticleYet another libGDX resolution independance question
I am developping a Android smartphone game in LibGDX, and I am encountering issues about resolution managing. Most notably, I have no clue how to handle that in LibGDX. For now, I am developping based...
View ArticleImplementing Mouse Lasso
I am toying around with a Boogaloopers clone (http://www.youtube.com/watch?v=zuaRi_fhdlQ). I have a small problem with the lassoing. Here’s my current naive algorithm. The problem with this is that the...
View ArticleEnemy spawning problem [closed]
I’ve been trying to get my characters to spawn at random points through out the map. I have a camera which is following my main character (2D RPG Style) around the screen, but I want these “enemies” to...
View ArticleHow would you declare a Texture object in the libgdx skin json file, using a...
I have a texture atlas that is linked to my skin.json file. The atlas contains a region named “game-title”. I would like to declare a com.badlogic.gdx.graphics.Texture object in the json file, to...
View ArticleBox2D object wont move until tons of force is used
Im making a game for android im using LibGDX and Jbox2D it is a space flying exploration game controlled with the accelerometer. so I have set the world to no have no gravity. the objects in Box2D...
View Article