libgdx

Understanding libgdx

自作多情 提交于 2020-01-20 02:26:05
问题 I understand that it is a framework; even more an open-source cross-platform game development library. I went to the libgdx homepage and followed the instruction on the video tutorial. After properly setting up my project I was able to run the default my-gdx-game project on the multiple supported platforms. Great, fine and dandy...now what? I have been scouring the forums, wikis, javadocs, and many many more sites looking for decent straightforward how-to's. Unfortunately I couldn't find any,

Is there an upper limit on velocity when using box2d?

坚强是说给别人听的谎言 提交于 2020-01-19 15:40:53
问题 I'm using box2d for physics simulation. I'm moving a circle using arrow keys by applying impulse on the body when ever a key is pressed. Unfortunately, the circle moves excruciatingly slow and doesn't seem to accelerate like a true physical body is supposed to. My world's dimensions are 400x800 pixels. The radius of the circle body is 20f. According to this, the problem can be solved by scaling the circle radius down when creating it and scaling up after getting the body position during

Having problems with the layout widget 'Container' in LibGdx

浪尽此生 提交于 2020-01-17 06:15:41
问题 I'm building a menu for my game and I'm stuck. When I position a Container with it's setPosition function and add a Button to the container with setFillParent set to true the button's position isn't set to the same position as the container. The button size matches the size of the Container but its position is wrong. When I don't set setFillParent to true the position of the button within the container is right but the size is wrong. Here is the code, pretty simple: Container container = new

Admob live ads not appearing in libgdx application - Failed to load ad: 0

扶醉桌前 提交于 2020-01-17 06:10:09
问题 I'm currently working on a libgdx andriod app using eclipse luna and attempting to display a banner ad through admob. My app is running fine and displaying the test banner ads with no issues. When I remove my phone as a test device to receive live ads I get this error in logcat: There was a problem getting an ad response. ErrorCode: 0 Failed to load ad: 0 I've tested my app on a Galaxy Note 4 and a Samsung S5 both running android version 6.0.1. There are no custom ROMs or ad blockers on

Admob live ads not appearing in libgdx application - Failed to load ad: 0

北慕城南 提交于 2020-01-17 06:10:06
问题 I'm currently working on a libgdx andriod app using eclipse luna and attempting to display a banner ad through admob. My app is running fine and displaying the test banner ads with no issues. When I remove my phone as a test device to receive live ads I get this error in logcat: There was a problem getting an ad response. ErrorCode: 0 Failed to load ad: 0 I've tested my app on a Galaxy Note 4 and a Samsung S5 both running android version 6.0.1. There are no custom ROMs or ad blockers on

How to build LibGDX from source?

六眼飞鱼酱① 提交于 2020-01-17 04:32:12
问题 I am trying hard to build LibGDX from sources (with ANT). I have some minor changes in the native code. I only need compilation for Android. Theoretically, I've finally managed to compile my C++ files, by switching to Ubuntu (on Windows ANT did not even try to compile). I made some minor changes in .java files. I then ran main Build.xml - the one that builds the jar s, and open resultant gdx-setup.jar . Everything installed fine, new projects for eclipse were created. But my changes were not

Infinite loop in my loading class when debugging/compiling for HTML5 (test_project available)

浪尽此生 提交于 2020-01-17 03:51:25
问题 Recently I added a loading class to my libgdx games (libgdx version 1.3.1). It works fine for the projects android, desktop and IOS. However, for HTML5 my game never runs and only shows a black screen. Then I found out there is constant(if not infinite) call to .setScreen (new Test(game)) in the code below in my Loading class when I debug it: @Override public void render(float delta) { // Clear the screen Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); if (game.manager.update() && timeLoading < 0)

SpriteBatch draw all

我的梦境 提交于 2020-01-16 20:11:13
问题 I have a question regarding the Libgdx SpriteBatch : When I call SpriteBatch#draw() , will Libgdx take care about the Camera s frustum or will it draw it, even if it is outside the frustum? I was allready looking at the SpriteBatch s code, but I did not find anything, so I was wondering, if Libgdx does something internally. Or do I have to implement frstum culling myself e.g. like this: if(camera.frustum.boundsInFrustum(250, 32, 0, 100, 100 ,0)) { tempEnemy.draw (batch); } Where tempEnemy is

SpriteBatch draw all

百般思念 提交于 2020-01-16 20:10:41
问题 I have a question regarding the Libgdx SpriteBatch : When I call SpriteBatch#draw() , will Libgdx take care about the Camera s frustum or will it draw it, even if it is outside the frustum? I was allready looking at the SpriteBatch s code, but I did not find anything, so I was wondering, if Libgdx does something internally. Or do I have to implement frstum culling myself e.g. like this: if(camera.frustum.boundsInFrustum(250, 32, 0, 100, 100 ,0)) { tempEnemy.draw (batch); } Where tempEnemy is

App not correctly configured to use Google Play services with a libgdx game

人盡茶涼 提交于 2020-01-16 18:49:12
问题 We develop a game using Libgdx which I'm trying to integrate with Google Play services. I'm interested in adding google multiplayer service. This is what I've done: MainActivity extends BaseGameActivity, and I've imported the BaseGameUtils project and the google-play-services_lib projects. I've added them both as Library projects of the game. I've created two client IDs in Google Developers console for both my product and my debug keys. I added my email as a tester in the Google Play