libgdx

UnsatisfiedLinkError Libgdx Desktop

◇◆丶佛笑我妖孽 提交于 2019-12-19 19:04:17
问题 I am running into issues with LibGDX on Desktop. I keep getting the following error when trying to launch the application: Exception in thread "main" java.lang.UnsatisfiedLinkError: com.badlogic.gdx.utils.BufferUtils.newDisposableByteBuffer(I)Ljava/nio/ByteBuffer; at com.badlogic.gdx.utils.BufferUtils.newDisposableByteBuffer(Native Method) at com.badlogic.gdx.utils.BufferUtils.newUnsafeByteBuffer(BufferUtils.java:288) at com.badlogic.gdx.graphics.glutils.VertexArray.<init>(VertexArray.java:62

Importing gradle project, android error

我只是一个虾纸丫 提交于 2019-12-19 17:45:11
问题 I am trying to import a libgdx project (desktop, ios and android) to eclipse on my mac, which I have in my local git repository. When I try to import my project to eclipse ( Import >> Gradle >> Gradle Project, and then add my Root Folder for the whole libgdx project), I try to "Build Model", but then I get an error saying: "SDK location not Found. Define location with sdk.dir in the local.properties file or with and ANDROID_HOME environment variable" I have already set my ANDROID_HOME with

Google Play Game Service failing to sign in

我的梦境 提交于 2019-12-19 12:51:06
问题 I have been banging my head against the wall over this for a number of days now. Despite reading many posts describing numerous problems/solutions to GPS sign-in failure I have been unable to find a solution to my problem. In short, I am developing a game in Android Studio using the LibGDX framework and have added BaseGameUtils as a library and added all the necessary dependencies etc. Problem Statement: When the game starts, it attempts to connect to GPGS but always responds with a 'Failed

Font size in textfield libgdx

允我心安 提交于 2019-12-19 12:02:33
问题 How can I change the size of textfield font in libgdx? UserNameTextField = new TextField("", GlobalSKin); UserNameTextField. ??? 回答1: There are various builtin methods you can call to set size. If you just want to set the size of textfield you can call UserNameTextField.setWidth(float width) Or UserNameTextField.setHeight(float width) or UserNameTextField.setMaxLength(maxLength) And if you only want to set size of font then do it like ` TextField.TextFieldStyle textFieldStyle = skin.get

Trouble batching cubes in libgdx

試著忘記壹切 提交于 2019-12-19 12:00:09
问题 I am trying to develop a game where I am rendering up to 300 cubes on screen. The performance of modelBatch when creating new modelInstance for each cube is terrible. There is no 3d batch that batches all the cubes to one draw call as far as I know. So I am desperately trying to batch them somehow. This question is directly related to this one: LibGDX 3D increase perfomance The answer posted batches all the cubes successfully but when environment is added to get some lighting it appears that

Libgdx Animation not working

倖福魔咒の 提交于 2019-12-19 11:55:29
问题 I have been reading about libgdx and I have been stuck on this animation problem. I have reading about animation in libgdx from their github and when I run my app on my phone, the app crashes after the loading screen. Here is my player Actor that extends from Actor. I create the player actor in my menu screen class and add it to the stage. It is suppose to appear flying up and down in the menu screen but the app crashes. I know it is my player actor because when I comment out the player actor

Black out everything outside a polygon

二次信任 提交于 2019-12-19 11:43:00
问题 I have a map, for simplicity let's say it's just a single texture. On top of this map, I have a polygon which indicates the route that the user must follow. What I want is to draw everything outside the polygon black. Or, of course to only draw things inside the polygon. To explain it better I made a picture. The blue lines define the polygon, with each corner being a point in the polygon. The red with yellow lines is the part I want to black out of the picture, and only leave the red with

Black out everything outside a polygon

北战南征 提交于 2019-12-19 11:42:31
问题 I have a map, for simplicity let's say it's just a single texture. On top of this map, I have a polygon which indicates the route that the user must follow. What I want is to draw everything outside the polygon black. Or, of course to only draw things inside the polygon. To explain it better I made a picture. The blue lines define the polygon, with each corner being a point in the polygon. The red with yellow lines is the part I want to black out of the picture, and only leave the red with

How to display a Interstitial Ad in a LibGDX project?

末鹿安然 提交于 2019-12-19 10:58:14
问题 I found a Flappy Bird GitHub project and changed it a little bit. I successfully implemented the AdMob Banner. But now I also want a Interstitial Ad which pops up when the Game is over (not every time of course) so here is my GitHub project: https://github.com/DaFaack/FlappyBibi Please explain me how to do it because I can't find a good explanation on the internet. I want to display the ad in the run() method. You can find it in the core package -> GameplayScreen.java File -> renderPlaying()

Repeating Textures on a Model

感情迁移 提交于 2019-12-19 10:23:02
问题 I am creating a little game, where you are in a maze. The maze is organized in a 2D Array , describing the x and z position and the block type . So it is Tile-based . Lets say every block is 1 m³ . Now my character is 2m tall and the maze should be 4m tall. Therefore i add 4 blocks over eachother if there is a wall on that tile. Of course this is a huge performance impact in a 100 * 100 meter/tile maze, even with Viewfrustum- and backface culling . As this is my first 3D game i want to keep