LibGDX - cool framework for Android

Hi guys!



I found such a cool thing… possibly it will be helpful for our engine…



http://libgdx.badlogicgames.com/features.php

http://code.google.com/p/libgdx/

Yeah, we tried to get in contact with the guy but he seems easily excitable… First he was outraged by erlends approach on how to contact him and later he proclaimed that Lars stole code from him in SpiderMonkey (but I really don’t know how a serializer class could look any different ;)). So because of aversions on his side working together will probably not happen and we definitely don’t want to use his code as reference, he might claim he wrote half of jME :wink:

1 Like

I get you. Thanks for such an answer. Ahh… It’s so complicated… I mean relations between people.

normen said:
Yeah, we tried to get in contact with the guy but he seems easily excitable.. First he was outraged by erlends approach on how to contact him and later he proclaimed that Lars stole code from him in SpiderMonkey (but I really don't know how a serializer class could look any different ;)). So because of aversions on his side working together will probably not happen and we definitely don't want to use his code as reference, he might claim he wrote half of jME ;)

HAHAHAHA. I love that person, just by reading normens post!

Well we might not start any flaming topic.

Let’s say we had disagreements with him, and it’s better for both teams to not get in contact.

My ‘ordeal’ was with someone else than Lars’, who was another member of the LibGDX team, and that’s all I have to say about that. It’s in the past; I think we all put it behind us a long time ago.

I’ve been following the LibGDX blog and I gotta commend them for the level of activity and transparency they’re keeping. It seems they’ve pretty much knocked out the competition as far as open source Android-specific engines go.

They’re ramping up their 3D support, so no doubt we’ll be butting heads as the jME3 Android renderer matures, but I for one think there could be room for some joint efforts still. Hopefully the game development industry will start to see more open standards emerging, creation possibility for competition-friendly collaboration the same way several browsers and web frameworks today have a great deal of libraries and other technologies in common.

Lastly I want to add that @normen should be careful about scaring people away from anything LibGDX ^^ Frankly, I think any serious Android developer ought to keep an eye on the LibGDX project, at the very least the blog. A published book on Android game development ought to count for something…

Was just talking about the relation libgdx-jme here, its in fact a very nice library.

Actually libgdx has a nice atlastexture creation inside, (the reason I kinda integrated a ripped down version of it in my current project)

I am using libgdx at the moment and it is ,like jME, a very cool project. Mario, the one who started libgdx, is actually a really nice guy and very helpful! just for info! :smiley: (eventhough I can remember the time when there was the ‘conflict’. Actually that got libGDX in my focus :smiley: )



BTW: kev glass ported his slick2d-engine to android using libgdx but as you already pointed out the jME3-Android-Renderer matures so maybe there is no need for a libgdx-renderer.

Sorry for reviving old post, but I have noticed that LibGDX has some cool features that this engine doesn’t have yet.
Is it possible to take those features from their engine and add them to jme3 ecosystem? What are the opensource limitations regarding copying certain features?
I am maybe missing Box2D integration (although there is bullet and another physics engine being integrated? but I don’t know how they compare to each other), Spine integration, TiledMap integration and most importantly iOS integration. :slight_smile:
Anyhow, I enjoy jme3 much more than LibGDX. I really like that the OpenGL layer is hidden from the user in jme3 and I really hate that in LibGDX you access everything through public static fields of a class.
So kudos on software architecture. :slight_smile:

Well…at some point we could grab things from libGDX and put them in JME, I guess the licensing allows us to do it.
But that’s usually not as straight forward as “grabbing things and putting them into JME”.

About physics, bullet (native) works pretty well on android.
Also I know @H tried a box2d integration and finally chose Dyn4j see related posts
http://hub.jmonkeyengine.org/forum/topic/jbox2d-plugin-for-jme-integration-jbox2d/
http://hub.jmonkeyengine.org/forum/topic/dyn4j-integration/

What are Spine and TiledMap? I mean I know the words but I guess they relate to products, right?

iOS is on its way. We’re opting for a slight different route as Mario, because we use Avian to compile java code.
see related post : http://hub.jmonkeyengine.org/forum/topic/initial-renderer-for-ios/

In the end it’s all up to time and availability to integrate a new feature into JME :stuck_out_tongue:

1 Like

TileMap is a tool to build maps both tiled and not , see here is pretty known in the 2d world. Spine is a really cool tool to build 2d animation trought bones. It as a lot of features and with that also an no artist can make great animations in a few steps. here is the link. Anyway all this things is for 2D based games :slight_smile: .

1 Like

hehehe about Spine : “creating animations becomes so fast and easy, even programmers can do it!”
sounds pretty cool :stuck_out_tongue:

From what I see it generates a sprite sheet, so I guess that can be used in JME without any trouble, and just some shader tricks.

For TileMap, seems like an image building tool, how do they integrate it in libgdx?

@relucri thanks for the explanations :wink:

I agree it’s mostly about time. :slight_smile:
By the way, what is the difference between Avian and RoboVM? Why did you choose the former?

Code written for RoboVM only works with RoboVM, code written for Avian is normal Java and JNI code and can be used with other JVM implementations / cross-compilers.

Code written for RoboVM only works with RoboVM, code written for Avian is normal Java and JNI code and can be used with other JVM implementations / cross-compilers.
I didn't know that JME is using avian :-D , I read that they have also some support for windows phones a renderer also for that devices is it possibile? or there's too much work to do there ? .

About tiled they made a loader for the maps a built some apis to cope with the maps , link to their wiki , this makes life really easier for level building with libgdx. About spine they have several export format ( I purchased the full version in the kickstarter campaign) for example this animation :

you could create a sprite sheet like these :

Or if you use the spefic format of spine that is fully compatible with libgdx ( the tool is made by Nate one of core contributors of libgdx and it uses libgdx heavily ) you have three files : a png that rappresent a texture atlas , an atlas file compatible with libgdx format for atlas and a json file. The png looks like this :

the .atlas explains the bounding box for each image and .json file has all the data about animation with also some metadata that the developer could add like events or bounding box for collision detection :

[java]
{
“skeleton”: { “spine”: “1.9.15”, “hash”: “4xikLbm4gqMDmnPicboxvqLonPg”, “width”: 209.85, “height”: 318 },
“bones”: [
{ “name”: “root” },
{ “name”: “Base”, “parent”: “root”, “y”: 125 },
{ “name”: “bone1”, “parent”: “Base”, “x”: -70.99, “y”: -92 },
{ “name”: “bone2”, “parent”: “Base”, “x”: 62.05, “y”: -68.21 },
{ “name”: “bone3”, “parent”: “Base”, “x”: -69.99, “y”: -60 },
{ “name”: “bone4”, “parent”: “Base”, “x”: 74.99, “y”: 67.99 },
{ “name”: “bone5”, “parent”: “Base”, “x”: -63.99, “y”: 70.99 },
{ “name”: “bone6”, “parent”: “Base”, “x”: 85.35, “y”: 103.32 },
{ “name”: “bone7”, “parent”: “Base” }
],
“ik”: ,
“slots”: [
{ “name”: “power”, “bone”: “Base”, “attachment”: “power” },
{ “name”: “bubble”, “bone”: “root” },
{ “name”: “bone1”, “bone”: “bone1”, “attachment”: “bubble” },
{ “name”: “bone2”, “bone”: “bone2”, “attachment”: “bubble” },
{ “name”: “bone3”, “bone”: “bone3”, “attachment”: “bubble” },
{ “name”: “bone4”, “bone”: “bone4”, “attachment”: “bubble” },
{ “name”: “bone5”, “bone”: “bone5”, “attachment”: “bubble” },
{ “name”: “bone6”, “bone”: “bone6”, “attachment”: “sparlke” },
{ “name”: “bone7”, “bone”: “bone7”, “attachment”: “plus1” },
{ “name”: “Base”, “bone”: “Base” }
],
“skins”: {
“default”: {
“power”: {
“power”: { “width”: 195, “height”: 318 }
},
“bone1”: {
“bubble”: { “width”: 5, “height”: 5 }
},
“bone2”: {
“bubble”: { “width”: 5, “height”: 5 }
},
“bone3”: {
“bubble”: { “width”: 5, “height”: 5 }
},
“bone4”: {
“bubble”: { “width”: 5, “height”: 5 }
},
“bone5”: {
“bubble”: { “width”: 5, “height”: 5 }
},
“bone6”: {
“sparlke”: { “width”: 54, “height”: 56 }
},
“bone7”: {
“plus1”: { “width”: 136, “height”: 104 },
“plus2”: { “rotation”: 180, “width”: 136, “height”: 104 },
“plus3”: { “width”: 136, “height”: 104 }
}
}
},
“animations”: {
“animation”: {
“slots”: {
“bone5”: {
“color”: [
{ “time”: 0, “color”: “ffffff00” },
{ “time”: 0.1019, “color”: “ffffffff”, “curve”: “stepped” },
{ “time”: 0.5098, “color”: “ffffffff” },
{ “time”: 0.6797, “color”: “ffffff00” },
{ “time”: 0.8, “color”: “fffffffd” },
{ “time”: 1.3333, “color”: “ffffff00” }
]
},
“bone3”: {
“attachment”: [
{ “time”: 0, “name”: null },
{ “time”: 0.3333, “name”: “bubble” },
{ “time”: 1.2666, “name”: null }
]
},
“bone2”: {
“color”: [
{ “time”: 0, “color”: “ffffff00”, “curve”: “stepped” },
{ “time”: 0.2666, “color”: “ffffff00” },
{ “time”: 0.8333, “color”: “ffffffff” },
{ “time”: 1.1, “color”: “ffffff00” }
]
},
“bone7”: {
“attachment”: [
{ “time”: 0, “name”: “plus1” },
{ “time”: 0.1666, “name”: “plus2” },
{ “time”: 0.3333, “name”: “plus3” },
{ “time”: 0.9, “name”: “plus3” },
{ “time”: 1.1666, “name”: “plus2” },
{ “time”: 1.3333, “name”: “plus1” }
]
},
“bone1”: {
“attachment”: [
{ “time”: 1.2666, “name”: null }
],
“color”: [
{ “time”: 0, “color”: “ffffff00” },
{ “time”: 0.2333, “color”: “ffffffff” },
{ “time”: 0.8666, “color”: “ffffff00” }
]
}
},
“bones”: {
“Base”: {
“translate”: [
{
“time”: 0,
“x”: 0,
“y”: 0,
“curve”: [ 0.215, 0.36, 0.574, 1.74 ]
},
{
“time”: 0.6666,
“x”: 0,
“y”: 54.99,
“curve”: [ 0.264, 0.3, 0.574, 1.89 ]
},
{ “time”: 1.3333, “x”: 0, “y”: 0 }
]
},
“bone6”: {
“rotate”: [
{ “time”: 0, “angle”: 0 },
{ “time”: 0.3333, “angle”: -41.76 },
{ “time”: 0.6666, “angle”: -81.05 }
],
“scale”: [
{ “time”: 0, “x”: 0, “y”: 0 },
{ “time”: 0.1666, “x”: 0.5, “y”: 0.5 },
{ “time”: 0.5, “x”: 1.5, “y”: 1.5, “curve”: “stepped” },
{ “time”: 0.8333, “x”: 1.5, “y”: 1.5 },
{ “time”: 1.1666, “x”: 0.5, “y”: 0.5 },
{ “time”: 1.3333, “x”: 0, “y”: 0 }
]
},
“bone3”: {
“translate”: [
{ “time”: 0, “x”: -0.71, “y”: -34.41 },
{ “time”: 0.6666, “x”: -10.03, “y”: -19.35 },
{ “time”: 1, “x”: -0.71, “y”: -15.05 },
{ “time”: 1.1333, “x”: -11.47, “y”: -7.16 },
{ “time”: 1.2666, “x”: -16.49, “y”: 7.16 }
]
},
“bone1”: {
“translate”: [
{ “time”: 0, “x”: 0, “y”: 0 },
{ “time”: 0.3333, “x”: 10.75, “y”: 12.18 },
{ “time”: 0.6666, “x”: 15.77, “y”: 24.37 }
]
},
“bone2”: {
“translate”: [
{ “time”: 0, “x”: 0, “y”: -29.8 },
{ “time”: 0.2, “x”: 11.2, “y”: -19.36 },
{ “time”: 0.5, “x”: -6.83, “y”: -6.28 },
{ “time”: 0.7333, “x”: 5.12, “y”: 6.05 },
{ “time”: 1, “x”: 16.43, “y”: 22.68 }
]
},
“bone5”: {
“translate”: [
{ “time”: 0, “x”: 0, “y”: 0 },
{ “time”: 0.1699, “x”: 6.73, “y”: 7.29 },
{ “time”: 0.3398, “x”: -6.17, “y”: 13.46 },
{ “time”: 0.5098, “x”: 3.36, “y”: 23.56 },
{ “time”: 0.6797, “x”: 17.39, “y”: 31.41 },
{ “time”: 0.7, “x”: -18.78, “y”: -16.46 },
{ “time”: 0.9333, “x”: -3.88, “y”: -2.63 },
{ “time”: 1.0666, “x”: -16.65, “y”: 8 },
{ “time”: 1.1666, “x”: -3.88, “y”: 21.83 },
{ “time”: 1.2666, “x”: -11.33, “y”: 25.03 }
]
}
}
}
}
} [/java]

Of course if you support the latter format you have all metadata available for our user otherwise you could import only the 2d animation. :slight_smile: I hope this is helpful !

1 Like

You could somewhat easily create a loader for the later,

Basically do a spin loader that returns a Material and a Controll attached that has all images linked and updates the materials data accordingly.
Then create a shader that gets all textures pushed and merges them based on a submitted time/frame uniform.

I would say its possible to fully implement in a few days.

I would say its possible to fully implement in a few days.
Nice to hear that :D