Building a 2D game

Hello there,

I am new in this forum. First thing I have to say: As far as I can juge it currently, JMonkeyengine is a greate Java engine for game development.

Now, my problem is the following:
After going through most of the beginner’s tutorials, I wanted to try some things out on myself. And therefore I want to develop a really tiny space shooter, but in 2D.
The problem now is: I have no idea how to do this with JMonkeyengine.
I already searched the forum and also found the Neon Vector Shooter tutorial. But I am confused as they attach the images to the guiNode. And I also found in this forum, that this is bad practice.
But I haven’t found another way of displaying a plain 2D image.
So, my question is: How is this done in JME? I would also like to use animated 2D images, so spritesheets.

Kind regards,

The Neon Vector Shooter tutorial is a good way to start.
About the guiNode, I see not problem using it, it works well for 2d, the Neon Shooter is a good example of it. But if you want diferent ways, just search here in the forum, I remember I saw once a large discussion about how to fix axis in Z to do 2d games.
About the sprites, take a look on the wiki effects, there is something there also.
Another tip, you will find others game codes samples in the internet, and there is one tests select application in the Jm3 root installation dir where you can run a lot of examples.

source please.

@Pesegato Maybe this ? the wiki calls guinode “basic”

@M0rgenstern To directly answer your question, Currently guiNode for you and many other beginners is best practice. Don’t let your game get out of scope trying to use something more advanced when you are looking to make something basic as a stepping stone.
You might end up like me hopping between 10 different engines never making progress. Learn the basics first.

The page says that the guiNode provides “basic” features, which is true. Other libs build on top of it for providing more advanced features. At the end of the day, all the fancy libs use the guiNode for 2D.


Source is here: Can jme make a 2d platformer? - #6 by oxplay2
It is just a single thread. But when reading this, I found it pretty obvious that you should not mix GUI and actual game.
If you say using guiNode is fine, then I will do this. Thank you.
The effect page looks also good for animations. Thanks.

Kind regards,

This is a good practice that is also valid for 3d gui in 3d games. However, it depends on the kind of game you want to do.

Thank you very much.
Then I will go through that tutorial.