libgdx

Android Libgdx application, failed resolving AndroidApplication

不问归期 提交于 2019-12-24 04:30:13
问题 I'm stuck on an android project using libgdx. My desktop project works perfectly. My android project contains the libs folder containing armeabi and armeabi-v7a and the android gdx backends. Activity is declared in manifest I'm used to using these tools. Everything used to work perfectly and all the sudden I am facing a persistent error (after project fixing, cleaning, restarting, redownloading the libs, trying different api, sdk levels, jdk...). Here is the Log of the error 06-05 03:28:38

Speed in game with libgdx

Deadly 提交于 2019-12-24 04:22:07
问题 I'm making a game using libgdx. For now, every character has a speed, corresponding actually to the number of render the game wait before update the character. For example, if the character has a speed of 15, it will be updated every 15 renders. I'm conscious that this is not how it has to be done. What is the proper way to do this? I really want to make a speed in %, for example a character will have a speed of 85%. 回答1: Use delta . Gdx.graphics.getDeltaTime() method return secods since last

LibGDX Automatically Scaling GWT Window to Monitor Resolution

守給你的承諾、 提交于 2019-12-24 04:02:53
问题 I'm creating an application with LibGDX and deploying exclusively to a GWT HTML5 environment. The below code sets up my environment with a 1280x720 resolution as expected: public class HtmlLauncher extends GwtApplication { @Override public GwtApplicationConfiguration getConfig() { return new GwtApplicationConfiguration(1280, 720); // <-- here is line of code in question } @Override public ApplicationListener getApplicationListener() { return Engine.getInstance(); } } I would like my

Libgx Rotate a Texture Region

假装没事ソ 提交于 2019-12-24 03:59:29
问题 I wonder know how to Rotate a textureRegion in Libgdx. If there is a isue with Pixmap, you can also give it to me. I don't want to use sprites because it's not appropiate for the thing I want do. Thanks you. 回答1: It is actually pretty simple to rotate a textureRegion with multiples of 90°. A textureRegion is a portion of a bigger Texture, defined with two couples of UV coordinates. In order to rotate your textureRegion, you juste have to rotates these UV coordinates. For instance, here is you

Easiest way to generate APK in Android Studio

自古美人都是妖i 提交于 2019-12-24 03:52:22
问题 What is the easiest way to generate APK files in Android Studio? My project's android/build/outputs folder contains two apk files: android-debug , android-debug-unaligned . Should I use these? Which one? 回答1: Read this article Scroll down to the android studio section. By default, the file should be located in your //android directory the default name for your apk is android-release.apk 来源: https://stackoverflow.com/questions/29797803/easiest-way-to-generate-apk-in-android-studio

Easiest way to generate APK in Android Studio

主宰稳场 提交于 2019-12-24 03:52:13
问题 What is the easiest way to generate APK files in Android Studio? My project's android/build/outputs folder contains two apk files: android-debug , android-debug-unaligned . Should I use these? Which one? 回答1: Read this article Scroll down to the android studio section. By default, the file should be located in your //android directory the default name for your apk is android-release.apk 来源: https://stackoverflow.com/questions/29797803/easiest-way-to-generate-apk-in-android-studio

How to load music in Android with libGDX?

左心房为你撑大大i 提交于 2019-12-24 03:42:28
问题 I want load mp3 song in an android app with libgdx library but i don't find the way to works. I don't know how programm this "issue". Assets Manager could be the class for works with mp3 song? I found also this way: Gdx.files.newMusic(file); but in Android don´t work and desktop the same code work. Update: Parse Method public void parse() { JsonReader reader = new JsonReader(); JsonValue rootElem = reader.parse(file); JsonValue songDataElem = rootElem.get("songData"); JsonValue notesDataElem

Draw a sprite onto the map not to the screen

让人想犯罪 __ 提交于 2019-12-24 03:15:01
问题 I'm using libgdx and I have a tiled map which i want to draw the sprite onto. However the sprite is drawn onto the actual window so when I move the camera, the sprite stays in the same place. ?I want to the sprite to move on the map. This is how i currently render my objects @Override public void render(float delta) { translateCamera(); Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); camera.update(); renderer.setView(camera); renderer.render(bgLayers); batch.begin()

Libgdx Coordinates after rotateAround camera

℡╲_俬逩灬. 提交于 2019-12-24 02:18:35
问题 After the camera rotation, the coordinates were confusing to me. I have a camera a character and a map. This player walks only in the directions: north (90 °), south (270 °), east (0 °), west (180 °). After rotating the camera from the position of the player 'camera.rotateAround (..., ..., ...)' the player starts to move in new directions as a result of rotation. Is there a way to reposition the original back to the coordinates without moving the map to the original position? Note: The track

Libgdx game using Google Play Game Services on iOS and Android

一个人想着一个人 提交于 2019-12-24 02:12:08
问题 I am creating a game using Libgdx and would like to integrate player, Leaderboard, high score on both iOS and Android devices. Ideally I would use Google Play Game Services but I could be convinced to use other technologies (like Parse). There are tutorials to use Google Play services for Android devices: (http://theinvader360.blogspot.co.uk/2013/10/google-play-game-services-tutorial-example.html). But as far as I understand, this will not work for iOS devices (according to this:https:/