[SOLVED] Creating 2D games with JMonkeyEngine

Hi monkeys!

So, I decided to try and program a game in 2D. So, I’m just asking if I can do this easily with JMonkeyEngine, or if I should try another engine, like libgdx? And if I can do it, can you give me a wiki or tutorial page for that?


You can do it, but easily is very inappropriate abjective to say about game making. Let say you want to make platform game with 2d gameplay and 3d elements: Yes, you can with a learning path of 2-3 months depends on your current knowledge.

As in libgdx, they have box2d, tiled, spine, textureAtlas, particle editor, ashley…

In jME3, we also have box2d, tiled, blender, textureAtlas, SDK, zay-es…

I used both, so I don’t want to start conversation about what is better cause both have strength and weak. I you ask for a resource for making 2d game:

I’m also going to post a full example of making 2d-3d platform game soon!

@atomix thanks for your answer! I know the features of one engine and another are somewhat similar, but, for example, I don’t know how to scroll the level. I suppose I must move the guiNode, but that is a very dirty way to do it.

First, dont add anything except gui to guiNode.

-You can make another node for you level , called levelNode (no surprise). Add your character and other stuff in that node, attach it to rootNode.


@atomix thanks! That solved some of my doubts. But I also want to know: does libgdx has a networking api like jme?

No, they don’t have one like jME3, but they have one Networking · libgdx/libgdx Wiki · GitHub :slight_smile: Their API support to be cross-platform, that means can also be used in HTML5, which I highly doubt about its functionalities currently. Of course, it don’t work in HTML5 and GWT!

jME3 network API is … “quite alike” kryonet, because they both base in another serialization method for Java objects. Libgdx developers usually use kryonet because they find it familiar (the guy make kryo and kryonet is the guy make spine).

Thanks, that answers all my questions! Thank you for helping me!

Err… my 2D shooter game did everything in the guiNode :smile:

The only exception is the background, which is a endless rotating skybox :smile:

I frequently do this also for simple 2D stuff. I guess the issue is that then your game will interact with your UI if they are separate.

It’s easy enough to create your own fake GUI-like node in the regular 3D scene:

Node my2dNode = new Node("2D");

Then you have a place for your 2D game to play while keeping the viewports separate just like in 3D.