libgdx

libgdx multiple pan events

做~自己de王妃 提交于 2019-12-13 02:58:51
问题 In my game the user is supposed to move the player with one finger on the left side of the screen and is able to shoot with the right finger. The problem is that when the shooting, the player can't move anymore. I've found some related questions but none helped me. I tried using 2 different GestureListener classes. One of them checks if the right side of the screen is touched and the other checks the left side, still doesn't work. This is the pan method of the first class public boolean pan

Google play services, sign in succeeded but error on create room

别等时光非礼了梦想. 提交于 2019-12-13 02:56:30
问题 This is very similar to a problem someone else had on here except that the solution that fixed theirs is not my problem. (Note: I am using libgdx to develop this but I'm pretty sure that has nothing to do with this issue since the signing part is working) @Override public void startQuickGame() { boolean signedIn = getSignedIn(); System.out.println(signedIn); // automatch criteria to invite 1 random automatch opponent. // You can also specify more opponents (up to 3). Bundle am = RoomConfig

Texture is not displayed in the application

荒凉一梦 提交于 2019-12-13 02:24:48
问题 In the process of studying the framework libgdx I found a wonderful way to structure the project. And here's my example of loading a texture and displaying it. realizing Singleton pattern of AssetManager public class GameAsssetManager extends AssetManager { private static GameAsssetManager instance; public static GameAsssetManager getInstance(){ if(null == instance) instance = new GameAsssetManager(); return instance; } public void init(){} } loading the picture public class LoadScreen

LibGDX game crashes with “java platform se binary stopped working”

柔情痞子 提交于 2019-12-13 02:20:08
问题 Im having this really weird problem where my LibGDX game, suddently, after a few minutes playing, crashes with no Exceptions thrown, it just freezes and crashes, and I have to force the process down. I have no idea how to debug this kind if error and google searches are not helping with this particular case. I tried to run it on android to see if Logcat would say something about it, and i got this: Any idea what could make the game crash like this, with no errors or exceptions? Or any way of

Move a body to the touched position using libgdx and box2d

时光毁灭记忆、已成空白 提交于 2019-12-13 02:08:01
问题 I am trying to move a body with no gravity to the click or touch position and then stop it. However, depending where I click it moves really fast or really slow because of the coordinates of my Vector3. Also, it behaves like that game asteroids which I do not want. Basically, I just need myBody follows the click of the mouse our touch. Here where I have got so far: @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { camera.unproject(touchPosition.set

OpenGL coloured bitmap font with white outline

孤人 提交于 2019-12-13 01:43:32
问题 I've got a libgdx game where I want to use a bitmap font with an outline. I want to be able to set the font colour using setColor(), however, I always want the outline to remain white. What's the best way for me to achieve this? I'm assuming I should do the required colour manipulation using the fragment shader. I've created a bitmap font as below, with red representing the stroke and green representing the set colour. I'm a little stuck with what I need to do in the fragment shader however.

libGdx platform specific code

北城以北 提交于 2019-12-13 01:31:44
问题 I need to create specific code to access a Derby DB and the FoundationDB SQL parser from a libGdx based project, with a different implementation between the Desktop and the WebGL version of the application. The Desktop application can access the SQL parser and can connect to the DB locally, otherwhise the WebGL version uses the GWT RPC service to access data via a client-server mechanism. Is it possible to implement in a certain way this type of functionality? I would like also to discuss

How do apps save data

核能气质少年 提交于 2019-12-13 01:17:26
问题 This might be a stupid question, and this might also be a duplicate. But, I really do not know and have not been able to find the solution to it, at all. My question is, how do apps save data. I'm making an app with LibGDX and Java for Android devices, and am just stuck pondering on this. How is it that, for example, when I close down Candy Crush and reopen it the day after, it remembers where I'm at even though the app resets? If this does happen to be a duplicate, I would strongly

Libgdx 3D - Point Light shows black box & rect (PointLight not working)

旧时模样 提交于 2019-12-13 00:59:45
问题 I am creating a 3d scene currently a box and rect, and trying to enable lighting. When i create a PointLight and add it to Environment everything turns to black color? all i want to do is create a 3d scene and enable point light, like a sun or rays coming from a point and shading the objects. Code: environment = new Environment(); environment.add(new PointLight().set(1f, 1f, 1f, 0, 0, 20f, 100f)); modelBatch=new ModelBatch(); .. square=new ModelBuilder().createBox(300,300,300,new Material

How to install earlier version of robovm eclipse plugin?

此生再无相见时 提交于 2019-12-13 00:49:32
问题 I have been working on a game project using libgdx. My dev environment is as follows: OS: Mac OSX 10.10.3 IDE: Spring Tool Suite Version: 3.6.4.RELEASE Build Id: 201503100339 Platform: Eclipse Luna SR1 (4.4.2) With Robovm eclipse plugin. ibgdx version: 1.4.1 I have had "auto updates on" through out my development process and it worked well until April 2015 (more or less until robovm 1.2 release I think). I was able to produce ad-hoc releases and get my testers install the app via installrapp