Giter Club home page Giter Club logo

libgdx's Introduction

libGDX Logo

GitHub Actions Build Status

Latest Version Snapshots

Discord Chat

Cross-platform Game Development Framework

libGDX is a cross-platform Java game development framework based on OpenGL (ES), designed for Windows, Linux, macOS, Android, web browsers, and iOS. It provides a robust and well-established environment for rapid prototyping and iterative development. Unlike other frameworks, libGDX does not impose a specific design or coding style, allowing you the freedom to create games according to your preferences.

Open Source, Feature Packed, and Fostering a Large Third-Party Ecosystem

libGDX is released under the Apache 2.0 License, offering unrestricted usage in both commercial and non-commercial projects. While not mandatory, we appreciate any credit given to libGDX when you release a game or app using it. Check out our showcase for a selection of popular libGDX-powered games. With libGDX, you gain access to a comprehensive set of tools and features to develop multi-platform 2D and 3D games using Java.

Moreover, libGDX boasts a vibrant third-party ecosystem, with numerous tools and libraries that streamline development tasks. Explore the awesome-libgdx repository for a curated list of libGDX-centered libraries, serving as an excellent starting point for newcomers in the libGDX community.

An example game created with libGDX: Pathway by Robotality. Discover more captivating games in our Showcase.

Getting Started with libGDX / Documentation

Thanks to Gradle, you can easily set up libGDX without the need to download the framework itself. Your favorite build tool can handle everything for you. Additionally, we offer a convenient setup tool that automates project creation and downloads all the necessary components. Check out our website for instructions on getting started or refer to our comprehensive wiki.

We provide the libGDX javadocs online for easy reference. Additionally, the javadocs are bundled with every libGDX distribution, ensuring smooth integration with your preferred IDE.

Community & Contribution

Stay up to date with the latest libGDX news by following our blog. For engaging discussions and support, join our official libGDX Discord.

Reporting Issues

Use the Issue Tracker here on GitHub to report any issues you encounter. Before submitting, please read our Getting Help guide, which walks you through the process of reporting an issue effectively.

Contributing to the Codebase

libGDX benefits greatly from contributions made by our dedicated developer community. We appreciate any assistance in making libGDX even better. Check out the CONTRIBUTING.md file for details on how to contribute. Note that contributing involves working directly with libGDX's source code, a process that regular users do not typically undertake. Refer to the Working with the Source article for guidance.

You can also support our infrastructure (build server, web server, test devices) by contributing financially through our Patreon!

libgdx's People

Contributors

acoppes avatar badlogic avatar berstanio avatar code-disaster avatar crykn avatar cypherdare avatar davebaol avatar dsaltares avatar frosty-j avatar hneuer avatar intrigus avatar johnnyapol avatar jrenner avatar manuelbua avatar mgsx-dev avatar mobidevelop avatar mrstahlfelge avatar nathansweet avatar noblemaster avatar nooone avatar obigu avatar pokemmo avatar realitix avatar semtiko avatar simonit avatar tom-ski avatar tommyettinger avatar ttencate avatar xoppa avatar yuripourre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libgdx's Issues

Library 'libhgl.so' not found

From [email protected] on July 21, 2010 21:38:12

I used the helloworld project and added the project on the android 1.6 emulator. During the logs I saw the following entry:

07-21 19:31:20.213: ERROR/libEGL(211): couldn't load <libhgl.so> library (Cannot load library: load_library[984]: Library 'libhgl.so' not found)

Everything works as expected, but wondering if this could cause harm on real devices.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=30

standard void main() causes Verify error on 1.5 and 1.6 devices

From [email protected] on June 22, 2010 22:38:05

This is per the discussion we had earlier. I read that the verify error is suppose to list exactly the who/what/when/where/how right above it in logcat, but I saw nothing. This is the error

E/AndroidRuntime( 666): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 666): java.lang.VerifyError: com.dasa.wastedspace.WastedSpace
E/AndroidRuntime( 666): at com.dasa.wastedspace.Game.onCreate(Game.java:26)
E/AndroidRuntime( 666): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
E/AndroidRuntime( 666): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303)
E/AndroidRuntime( 666): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2371)
E/AndroidRuntime( 666): at android.app.ActivityThread.access$1800(ActivityThread.java:118)
E/AndroidRuntime( 666): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1759)
E/AndroidRuntime( 666): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 666): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 666): at android.app.ActivityThread.main(ActivityThread.java:4077)
E/AndroidRuntime( 666): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 666): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 666): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 666): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
E/AndroidRuntime( 666): at dalvik.system.NativeStart.main(Native Method)

I basically just commented this section out of the desktop portion of the app

/*
public static void main(String[] argv) {
JoglApplication app = new JoglApplication("Wasted Space", 480, 320, false);
app.getGraphics().setRenderListener(new WastedSpace());
}
*/

and all is fine. I'll try and get some more useful information on this error as soon as I can to amend this issue (like a bare minimum test bed to reproduce the error)

Original issue: http://code.google.com/p/libgdx/issues/detail?id=21

Matrix.getValues() returns OpenGL incompatible floats

From [email protected] on October 14, 2010 12:03:40

What steps will reproduce the problem? 1. Set a matrix using Matrix.setToWorld with sensible position, direction and up vectors
e.g. mWorldMatrix.setToWorld(mWorldPos, mWorldDir, new Vector3(0, 1.f, 0));
2. Send the matrix to openGL for a modelview transform, e.g.
gl.glLoadMatrixf(mWorldMatrix.getValues(), 0);
3. Do a render What is the expected output? What do you see instead? Expected output: the model renders according to the transform as if you used glTranslateF and glRotateF with the individual vectors

Output: stretchy matrix gone wrong! What version of the product are you using? On what operating system? 0.61 Please provide any additional information below. The problem is Matrix.getValues returns the floats in a column order incompatible with OpenGL. OpenGL expects matrices to be serialized in "major column order". The following code demonstrates a hack to fix it:

    float[] vals = new float[16];
    vals = mWorldMatrix.getValues();
    vals[12] = vals[3]; vals[3] = 0;
    vals[13] = vals[7]; vals[7] = 0;
    vals[14] = vals[11]; vals[11] = 0;
    g.glLoadMatrixf(vals, 0);

If I've done something stupid let me know - it's been years since I've done any OpenGL and I'm still remembering how everything works!

Original issue: http://code.google.com/p/libgdx/issues/detail?id=48

ContactListener Contact arg contains same Fixture for getFixtureA and getFixtureB

From [email protected] on June 09, 2010 05:16:01

What steps will reproduce the problem? 1. Implement custom ContactListener from svn
2. Inspect getFixtureA and getFixtureB, they are the same object What is the expected output? What do you see instead? A and B are different objects What version of the product are you using? On what operating system? libgdx svn Please provide any additional information below. I filed this earlier but its not showing up anymore, not sure what happened to it, but this is much more concise about the problem.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=7

Seperate OriginX and OriginY from SpriteBatch.draw

From [email protected] on June 17, 2010 05:23:46

Another feature request. OriginX and OriginY are currently set in the draw method of SpriteBatch . I get mostly unexpected results as what I pass in is dependent on other factors like scale. I have yet to get a rotation on the origin point to work correctly (my own shortcoming im sure).

Another library I used for opengl was pyglet, and when creating a Texture, you would set the origin point on the texture object. This was via an anchor_x and anchor_y which maybe is not the same concept as origin?. But in this case, it would make sense to be able to set an origin/anchor on the Texture object and this would be referenced for calculations like rotation.

The benefit to this is one calculates the origin of the texture simply based on its pixel size, so if i have a 32x32 texture and i set the origin to (16, 16) then its pretty obvious what should happen when applying various transformations during draw.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=10

jMonkey on the lookout for Android developers and affiliates

From [email protected] on April 27, 2010 20:09:08

Hello,

(@badlogicgames: you might have noticed me posting on the gl2-android
project as well)

I am not a robot, but I suppose for the purpose of this visit I might as
well be. I just wanted to drop by real quick to check if you are at all
familiar with the jMonkeyEngine project. It seems our projects might have a
thing or two in common. http://jmonkeyengine.com/blog/blog/2010/02/10/android-support-confirmed- for-jme3/ http://www.jmonkeyengine.com/forum/index.php?topic=13176.0 http://www.jmonkeyengine.com/forum/index.php?topic=13217.0 We are on the lookout for an Android developer to help us bring jME3's
preliminary Android implementation to a mature, fully functional state. http://docs.google.com/View?id=dhkt6vsf_251c54bg9hp Maybe you could be that developer? or, maybe you know someone who might be.
Naturally we'd also appreciate having more testers or plain Android-savvy
people around in our community. Any reason at all for you to contact us,
feel free! Contact information can be found in the docs link above.

Thanks for your time,

~ Erlend Sogge Heggen

Original issue: http://code.google.com/p/libgdx/issues/detail?id=2

GDXInvaders crash when we try to run it on Android Emulator

From [email protected] on September 22, 2010 02:24:51

What steps will reproduce the problem? 1. Extract the GDXInvaders.zip and import projects in Eclipse (Android development environment)
2. Build the project and try to run it as Android application on Android Emulator(AVD)
3. You will see some logs in the LogCat, then it just crash What is the expected output? What do you see instead? It just crash while launching the application on Android Emulator.
Expected Behavior : It should run in same manner as the desktop version run. What version of the product are you using? On what operating system? gdxinvaders.zip uploaded on Sept 12 Please provide any additional information below. Log from the LogCat
09-22 10:16:16.103: DEBUG/AndroidRuntime(367): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
09-22 10:16:16.103: DEBUG/AndroidRuntime(367): CheckJNI is ON
09-22 10:16:16.682: DEBUG/AndroidRuntime(367): --- registering native functions ---
09-22 10:16:18.203: DEBUG/AndroidRuntime(367): Shutting down VM
09-22 10:16:18.232: DEBUG/dalvikvm(367): Debugger has detached; object registry had 1 entries
09-22 10:16:18.252: INFO/AndroidRuntime(367): NOTE: attach of thread 'Binder Thread #3' failed
09-22 10:16:19.403: DEBUG/AndroidRuntime(375): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
09-22 10:16:19.403: DEBUG/AndroidRuntime(375): CheckJNI is ON
09-22 10:16:19.892: DEBUG/AndroidRuntime(375): --- registering native functions ---
09-22 10:16:21.313: INFO/ActivityManager(72): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.badlogic.gdxinvaders/.GdxInvadersAndroid }
09-22 10:16:21.442: DEBUG/AndroidRuntime(375): Shutting down VM
09-22 10:16:21.473: DEBUG/dalvikvm(375): Debugger has detached; object registry had 0 entries
09-22 10:16:21.533: INFO/AndroidRuntime(375): NOTE: attach of thread 'Binder Thread #3' failed
09-22 10:16:21.613: INFO/ActivityManager(72): Start proc com.badlogic.gdxinvaders for activity com.badlogic.gdxinvaders/.GdxInvadersAndroid: pid=382 uid=10035 gids={}
09-22 10:16:23.463: DEBUG/dalvikvm(382): Trying to load lib /data/data/com.badlogic.gdxinvaders/lib/libgdx.so 0x43dc1410
09-22 10:16:23.502: DEBUG/dalvikvm(382): Added shared lib /data/data/com.badlogic.gdxinvaders/lib/libgdx.so 0x43dc1410
09-22 10:16:23.502: DEBUG/dalvikvm(382): No JNI_OnLoad found in /data/data/com.badlogic.gdxinvaders/lib/libgdx.so 0x43dc1410, skipping init
09-22 10:16:23.652: DEBUG/qemud(38): fdhandler_accept_event: accepting on fd 10
09-22 10:16:23.652: DEBUG/qemud(38): created client 0x64768 listening on fd 15
09-22 10:16:23.676: DEBUG/qemud(38): client_fd_receive: attempting registration for service 'sensors'
09-22 10:16:23.676: DEBUG/qemud(38): client_fd_receive: -> received channel id 9
09-22 10:16:23.682: DEBUG/qemud(38): client_registration: registration succeeded for client 9
09-22 10:16:23.713: DEBUG/qemud(38): fdhandler_event: disconnect on fd 15
09-22 10:16:24.322: DEBUG/libEGL(382): egl.cfg not found, using default config
09-22 10:16:24.353: DEBUG/libEGL(382): loaded /system/lib/egl/libGLES_android.so
09-22 10:16:24.703: DEBUG/dalvikvm(382): GC_FOR_MALLOC freed 1237 objects / 91720 bytes in 237ms
09-22 10:16:24.763: INFO/dalvikvm-heap(382): Grow heap (frag case) to 3.723MB for 960016-byte allocation
09-22 10:16:24.922: DEBUG/dalvikvm(382): GC_FOR_MALLOC freed 60 objects / 3344 bytes in 155ms
09-22 10:16:25.093: DEBUG/dalvikvm(382): GC_EXTERNAL_ALLOC freed 54 objects / 2632 bytes in 147ms
09-22 10:16:25.232: DEBUG/texture(382): creating texture mipmaps: 512, 512
09-22 10:16:25.452: DEBUG/texture(382): creating texture mipmaps: 512, 512
09-22 10:16:26.042: DEBUG/dalvikvm(382): GC_EXTERNAL_ALLOC freed 198 objects / 11032 bytes in 141ms
09-22 10:16:26.122: DEBUG/texture(382): creating texture mipmaps: 512, 512
09-22 10:16:26.323: DEBUG/AudioSink(34): bufferCount (4) is too small and increased to 12
09-22 10:16:26.603: WARN/dalvikvm(382): JNI WARNING: threadid=7 using JNI after critical get
09-22 10:16:26.622: WARN/dalvikvm(382): in Lcom/badlogic/gdx/utils/BufferUtils;.copyJni ([FLjava/nio/Buffer;II)V (GetDirectBufferAddress)
09-22 10:16:26.653: INFO/dalvikvm(382): "GLThread 8" prio=5 tid=7 NATIVE
09-22 10:16:26.653: INFO/dalvikvm(382): | group="main" sCount=0 dsCount=0 s=N obj=0x43dca6d8 self=0x209fe8
09-22 10:16:26.663: INFO/dalvikvm(382): | sysTid=388 nice=0 sched=0/0 cgrp=default handle=2138408
09-22 10:16:26.702: INFO/dalvikvm(382): at com.badlogic.gdx.utils.BufferUtils.copyJni(Native Method)
09-22 10:16:26.702: INFO/dalvikvm(382): at com.badlogic.gdx.utils.BufferUtils.copy((null):-1)
09-22 10:16:26.732: INFO/dalvikvm(382): at com.badlogic.gdx.graphics.Mesh.setVertices((null):-1)
09-22 10:16:26.732: INFO/dalvikvm(382): at com.badlogic.gdx.graphics. SpriteBatch .renderMesh((null):-1)
09-22 10:16:26.742: INFO/dalvikvm(382): at com.badlogic.gdx.graphics. SpriteBatch .enableBlending((null):-1)
09-22 10:16:26.762: INFO/dalvikvm(382): at com.badlogic.gdxinvaders.screens.MainMenu.render(MainMenu.java:76)
09-22 10:16:26.772: INFO/dalvikvm(382): at com.badlogic.gdxinvaders.GdxInvaders.render(GdxInvaders.java:48)
09-22 10:16:26.782: INFO/dalvikvm(382): at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame((null):-1)
09-22 10:16:26.782: INFO/dalvikvm(382): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1332)
09-22 10:16:26.782: INFO/dalvikvm(382): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
09-22 10:16:26.804: ERROR/dalvikvm(382): VM aborting
09-22 10:16:26.942: INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-22 10:16:26.942: INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF42/36942:eng/test-keys'
09-22 10:16:26.963: INFO/DEBUG(31): pid: 382, tid: 388 >>> com.badlogic.gdxinvaders <<<
09-22 10:16:26.963: INFO/DEBUG(31): signal 11 (SIGSEGV), fault addr deadd00d
09-22 10:16:26.963: INFO/DEBUG(31): r0 00000374 r1 0000000c r2 0000000c r3 deadd00d
09-22 10:16:26.963: INFO/DEBUG(31): r4 00000026 r5 80887fc4 r6 00000001 r7 00000000
09-22 10:16:26.982: INFO/DEBUG(31): r8 45c30d50 r9 428bfe10 10 428bfdfc fp 00209fe8
09-22 10:16:26.982: INFO/DEBUG(31): ip 808881ec sp 45c30cd8 lr afd154c5 pc 8083b162 cpsr 20000030
09-22 10:16:27.352: INFO/DEBUG(31): #00 pc 0003b162 /system/lib/libdvm.so
09-22 10:16:27.352: INFO/DEBUG(31): #1 pc 0002cff4 /system/lib/libdvm.so
09-22 10:16:27.372: INFO/DEBUG(31): #2 pc 0002d11a /system/lib/libdvm.so
09-22 10:16:27.392: INFO/DEBUG(31): #3 pc 0002e108 /system/lib/libdvm.so
09-22 10:16:27.392: INFO/DEBUG(31): #4 pc 0002f2ec /data/data/com.badlogic.gdxinvaders/lib/libgdx.so
09-22 10:16:27.422: INFO/DEBUG(31): #5 pc 00013974 /system/lib/libdvm.so
09-22 10:16:27.432: INFO/DEBUG(31): code around pc:
09-22 10:16:27.452: INFO/DEBUG(31): 8083b140 1861447c 200...

Original issue: http://code.google.com/p/libgdx/issues/detail?id=40

Make mesh load lazily

From [email protected] on July 13, 2010 18:38:21

The way I have my game set up is that sometimes I allocate dynamic Mesh objects on the game thread but ultimately pass these objects to my rendering thread to do the actual drawing. However, in the constructor of Mesh, it calls the createBuffers( ) function , which must happen on the GL thread. But I see no reason why this cannot happen lazily right before drawing (since it does get called by checkManagedAndDirty() anyways. I made a simple modification so that it does this.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=25

Missing method localposition / localrotation / getPosition

From [email protected] on July 22, 2010 02:27:00

What steps will reproduce the problem? 1.Try to build the same sample with compound forms as http://www.jbox2d.org/demos/compoundshapes.html The interesting part of the code in Jbox2D is:
BoxDef sd1 = new BoxDef();
sd1.extents = new Vec2(0.25f, 0.5f);
sd1.density = 1.0f;

 BoxDef sd2 = new BoxDef();
 sd2.extents = new Vec2(0.25f, 0.5f);
 sd2.localPosition = new Vec2(0.0f, -0.5f);  // <---- MISSING METHOD
 sd2.localRotation = (float) (0.5f * Math.PI); //Missing also.
 sd2.density = 1.0f;

 BodyDef bd = new BodyDef();
 bd.addShape(sd1);
 bd.addShape(sd2);
  1. The equivalent methods to localPosition in JBox2D are missing in the JNI wrapper. I think they should be in PolygonShape or CircleShape. In the CircleShape there is a method called setPosition that seems to be OK, but there is no equivalent method in PolygonShape.
  2. In the same scope, there is a missing method also in the Fixture class to be able to read his position in the case of a body with many shapes.

I.e: lets say we have an compound body with 2 shapes or fixtures. Using the method getFixtureList I can have access to all the fixtures in the body, but not to their positions. I just can have access to the position of the body where they belongs, but not the Fixture position, hence I can not render them.

for(Fixture f: myBody.getFixtureList())
{
f.getBody().getPosition(); // position of the body, but it
//is not what I need right now
// I just need the position of the
// shape/fixture
} What is the expected output? What do you see instead? I expect the same output as in the JBox2d example http://www.jbox2d.org/demos/compoundshapes.html What version of the product are you using? On what operating system? Android 2.1 Please provide any additional information below. Thank you very much. I hope I didnt miss something and Im clear enough.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=31

.obj loader does not handle multiple spaces in a line correctly

From [email protected] on October 07, 2010 03:27:49

What steps will reproduce the problem? 1. modify the ship.obj from the space invaders sample:
change
"v -0.46604296 -4.6098739e-2 6.1004010e-2"
to:
"v -0.46604296 -4.6098739e-2 6.1004010e-2"
2. start the project What is the expected output? What do you see instead? the model should load normally
instead an exception is thrown:
java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1012)
at java.lang.Float.parseFloat(Float.java:439)
at com.badlogic.gdx.graphics.loaders.ObjLoader.loadObjFromString(Unknown Source)
at com.badlogic.gdx.graphics.loaders.ObjLoader.loadObj(Unknown Source)
at com.badlogic.gdx.graphics.ModelLoader.loadObj(Unknown Source)
at com.badlogic.gdxinvaders.Renderer.(Renderer.java:102 +- some lines 'shipMesh = ModelLoader.loadObj( app.getGraphics(), in, true, true );')
.... What version of the product are you using? On what operating system? tested on windows and linux, gdx-invaders.zip (Sep 12) Please provide any additional information below. svn/trunk/gdx/src/com/badlogic/gdx/graphics/loaders/ObjLoader.java:100
String[] tokens = line.split( " " );
replace with
String[] tokens = line.split( "[ ]+" );

continue for other occurrences

Original issue: http://code.google.com/p/libgdx/issues/detail?id=44

[box2d] groupIndex on fixtureDef.filter not functioning correctly

From [email protected] on June 08, 2010 06:19:24

What steps will reproduce the problem? 1. Create two seperate bodies
2. Create fixtureDef's and set .filter.groupIndex = -8
3. createFixture's on each body
4. Watch them still collide What is the expected output? What do you see instead? setting the fixture's groupIndex for two bodies to the same negative number is suppose to prevent the bodies from colliding. Setting it for this jni wrapper appears to do nothing. What version of the product are you using? On what operating system? libgdx0.5

Original issue: http://code.google.com/p/libgdx/issues/detail?id=6

Camera.getPickRay() With BoundingBox Using Intersector

From [email protected] on October 09, 2010 01:59:51

What steps will reproduce the problem? The attached Eclipse project (adapted from a larger program) displays a grid of four squares where touching one indicates at the bottom which square is being touched by using Intersector.intersectRayBoundsFast(...). What is the expected output? What do you see instead? Clicking on any of the squares should display the corresponding color in text at the bottom of the screen.

Clicking near the top of the red or green square indicates that no bounding box is being intersected, but the red or green square should be indicated. What version of the product are you using? On what operating system? 0.61 on Ubuntu Linux 10.04.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=45

Change SpriteBatch.draw arguments from int to float

From [email protected] on June 17, 2010 05:04:54

This is a feature request. I'm not experienced with java so I dont know if there are any implications to this.

Currently the arguments: x, y, originX, originY are accepted as int. Their immediate use inside of SpriteBatch .draw have them become float. If working in a space smaller then the actual pixel size of the screen, one might want to pass float values instead. Even if working solely with int, it seems java is not partial to an argument being cast as (int) when it requires (float) so it seems like a win-win

Original issue: http://code.google.com/p/libgdx/issues/detail?id=9

UnsatisfiedLinkError: com.badlogic.gdx.physics.box2d.World.newWorld(FFZ)J

From [email protected] on June 05, 2010 22:01:23

What steps will reproduce the problem? 1. Setup basic project as stated in README
2. Setup VM argument to point to lib/
3. add this one line to main() //including needed imports..

World world = new World(new Vector2( 0, -10 ), true); What is the expected output? What do you see instead? I would expect a new World to be created successfully, Instead I get the
following error

Exception in thread "main" java.lang.UnsatisfiedLinkError:
com.badlogic.gdx.physics.box2d.World.newWorld(FFZ)J
at com.badlogic.gdx.physics.box2d.World.newWorld(Native Method)
at com.badlogic.gdx.physics.box2d.World.(World.java:68)
at com.dasa.helloworld. HelloWorld .main( HelloWorld .java:17) What version of the product are you using? On what operating system? gdx0.5 on windows 7 in eclipse Please provide any additional information below. Sorry, im a fuckin noob. I dont even know what this means besides there
being some kind of problem loading the JNI

Original issue: http://code.google.com/p/libgdx/issues/detail?id=5

LibGDX linux 64bit native needs -fPIC defined for the C compiler

From [email protected] on August 17, 2010 11:41:55

What steps will reproduce the problem? 1. I tried to build LibGDX for 64bit linux link fails What is the expected output? What do you see instead? To fix i had to change the C compiler (C++ already has it) to have -fPIC

I had to install libmp123 to my system (it is wrong since it introduces a dependency on a so lib that you are not shipping with the JNI, I would expect to build it also as it happens for the Android platform. What version of the product are you using? On what operating system? SVN trunk Please provide any additional information below.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=33

Redundant code in Mesh?

From [email protected] on July 13, 2010 18:32:23

in Mesh.java line

public void render( int primitiveType )
{
if( graphics.isGL20Available() )
throw new IllegalStateException( "can't use this render method with OpenGL ES 2.0" );

            checkManagedAndDirty();
            render( primitiveType, 0, maxIndices > 0? getNumIndices(): getNumVertices() );
    }

simply calls the public void render( int primitiveType, int offset, int count ) on line 451 which does the whole GL20 and checkManagedAndDirty() routine again when it only needs to be checked once in the second function.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=24

Stop using ArrayList in VertexAttributes

From [email protected] on June 18, 2010 01:35:46

I've been doing some profiling with DDMS and trying to kill bottlenecks of my code. I'm a complete noob to java performance, but it seems that ArrayList's cause slowdowns with having to make calls like .get(i)

After changing my ArrayList's to the likes of Object list[] = new Object[15] Im starting to see libgdx take up a larger percentage of the rendering time. A call to VertexAttributes.get(i) in Mesh.render is actually the most time consuming process according to my profile eating up 25% of Mesh.render's processing time.

Would it benefit the speed of Mesh.render to have VertexAttributes stop using ArrayList's?

Line 47 of VertexAttributes reads
ArrayList list = new ArrayList();

But all the information to do this is already there
VertexAttribute list[] = new VertexAttribute[attributes.length];

and change everything else accordingly.

Sorry if this is a stupid recommendation, like I said before I am a complete noob to java performance and am only going by my profiling benchmarks from DDMS.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=17

Intersector.intersectRayBoundsFast Gives False Negative With Flat Bounding Boxes

From [email protected] on October 09, 2010 02:02:28

What steps will reproduce the problem? The JUnit tests in the file attached to http://code.google.com/p/libgdx/issues/detail?id=45 include one with a flat bounding box (one where the y min and y max are both 0). This flat bounding box is not considered to be intersected. What is the expected output? What do you see instead? Flat bounding boxes should still be intersectable by rays that do not parallel the flat plane. I'm not sure if they should be intersectable by parallel rays if that ray at the same y-coordinate (or other flat coordinate). What version of the product are you using? On what operating system? libgdx 0.61 on Ubuntu Linus 10.04

Original issue: http://code.google.com/p/libgdx/issues/detail?id=46

OrthographicCamera API

From [email protected] on July 16, 2010 09:10:16

Been looking over the code in OrthographicCamera and here are some things I notice:

1, the Constructor takes a Graphics Object, but the function setMatrices(Graphics g) takes in a graphics object again although the class instance keeps reference to a graphics object already. Isn't that kind of redundant since the Graphics object is always a singleton in a libgdx game?

2, there is a convenience function: public void getScreenToWorld( float screenX, float screenY, Vector2 world ) besides the usual: public float getScreenToWorldX( float screenX ) and public int getWorldToScreenX( float worldX ). But there isn't a corresponding getWorldToScreen( float screenX, float screenY, Vector2 world )

Original issue: http://code.google.com/p/libgdx/issues/detail?id=28

Eclipse crash with 0.5 libs

From tonyo%[email protected] on June 05, 2010 05:53:12

What steps will reproduce the problem? 1. Create Android project in Eclipse
2. Add the libraries to the project

Eclipse build id: 2010-02-18-1602 What is the expected output? What do you see instead? No output expected. I see the compiler griping: "warning: Ignoring
InnerClasses attribute for an anonymous inner class that doesn't come with
an associated EnclosingMethod attribute. (This class was probably produced
by a broken compiler.)", eating 350MB of RAM and entirely eating one processor. What version of the product are you using? On what operating system? 0.5, Win7, Eclipse build id above. Please provide any additional information below. Nothing in the project was modified but to add the libraries and adding
those to the class path. Please help me understand where I went wrong.

Original issue: http://code.google.com/p/libgdx/issues/detail?id=4

Samsung Galaxy 1.5 - Black screen instead hello world app

From [email protected] on April 19, 2010 13:35:53

Hello,

i'm using Samsung Galaxy with standard Android 1.5 and when i'm running the
hello world (without any modifications) app i see only black screen instead
of the graphic and text. Do you have any idea whan can cause the problem or
do you have any solution for that? On emulator and desktop everything is OK.
I would appreciate any help/guidlines where to look to fix that

best regards
Mariusz

Original issue: http://code.google.com/p/libgdx/issues/detail?id=1

BufferUtils.cpp:16: error: cast from ‘float*’ to ‘int’ loses precision

From [email protected] on September 27, 2010 04:09:01

Compiling latest gdx on linux recieve this error:

Building file: ../jni/BufferUtils.cpp
Invoking: GCC C++ Compiler
g++ -fPIC -DFIXED_POINT -DCHECK_OVERFLOW -I"/usr/lib/jvm/java-6-sun-1.6.0.20//include" -I"/home/mechacthulhu/workspace/gdx/jni" -I"/usr/lib/jvm/java-6-sun-1.6.0.20//include/linux" -O2 -Wall -c -I../jni/ -mfpmath=sse -msse2 -MMD -MP -MF"jni/BufferUtils.d" -MT"jni/BufferUtils.d" -o"jni/BufferUtils.o" "../jni/BufferUtils.cpp"
../jni/BufferUtils.cpp: In function ‘jint Java_com_badlogic_gdx_utils_BufferUtils_copyJni___3FLjava_nio_Buffer_2II(JNIEnv_, jclass, jfloatArray, jobject, jint, jint)’:
../jni/BufferUtils.cpp:16: error: cast from ‘float_’ to ‘int’ loses precision
make: *_* [jni/BufferUtils.o] Error 1

Original issue: http://code.google.com/p/libgdx/issues/detail?id=42

Configurable wait() time for input Listener

From [email protected] on June 19, 2010 07:23:20

Feature Request (hate not being able to select that)

I feel this is an issue since libgdx is pretty much all about the opengl. Touch events can hammer your framerate. In some cases maybe its not noticable, in others its very noticable. I solved this before I rewrote my game to solely use the facilities of libgdx, now coming back to it...

reference this thread for a discussion about it, http://groups.google.com/group/android-developers/browse_thread/thread/39eea4d7f6e6dfca The solution is simple enough but I dont think theres a one-size-fits-all here. For me, in AndroidInput.onTouch for MotionEvent.ACTION_MOVE I added an eventQueue.wait(40L); which seems to suit my own game just fine. The default behaviour makes my game rather unplayable due to its fast nature.

Maybe worth some consideration; providing a mechanism to throttle Listener events

Original issue: http://code.google.com/p/libgdx/issues/detail?id=19

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.