I made my first 2d platformer game using java + swing.

Now I want to achieve the same gameplay adding 1 dimension. I think this will require opengl knowledge.

I know the basics but i don't consider myself an expert.

This is an idea of how the game should look like.

enter image description here

So the question is, what will i need in order to do this(libraries,programs etc)?

Please do not start writing answers and comments on how hard this will be. I know that it will take me some time but i am willing to finish the project.

  • \$\begingroup\$ On a basic level, this answer gamedev.stackexchange.com/a/18828/6558 provides an excellent description of what you need to do 3d. I would also check out LWJGL. \$\endgroup\$ – thedaian Dec 5 '11 at 20:12
  • \$\begingroup\$ just one dimension can make a BIG difference :). Try going from 3d to 4d for your next project. \$\endgroup\$ – stas Dec 6 '11 at 21:26
  • \$\begingroup\$ Talking about 4d, I couldn't resist to post about Miegakure, and see this video! \$\endgroup\$ – Quazi Irfan Dec 6 '11 at 21:48
  • \$\begingroup\$ @stas I know. That's the reason I am asking here. I will leave 4d stuff to you :P. \$\endgroup\$ – congkawa isaki Dec 6 '11 at 23:29
  • \$\begingroup\$ Why? Can you move in all directions? Either way, not that it's hard, but it doesn't make sense. Can you elaborate on what you actually want to achieve by adding the third dimension? \$\endgroup\$ – jcora Dec 7 '11 at 14:16

Yes, you need libraries and other things that handles the low level stuff for you so you can work on the core game play and game assets. LWJGL is the natural choice if you want to do something with OpenGL + JAVA. But, its low level. You want something that more focused towards game, not pixels of your display.

jMonkeyEngine is the perfect choice for this. It handles all the high level stuff for you. It is a shader based engine. So, unlike most of the engines out there you wont be working with old feature & functionality. It comes with SDK, which features update center and pre-configured project setup with many examples. Plethora of documentations. Very active community. Most importantly its development is progressing like a bullet train.

Recently its beta version has been announced, (fear not, its very stable) that's why a game development competition is being help over there. So, jump in with your eyes closed!

If you want to know what are the others options(libraries) and why I suggest you jME over those, read this answer.


If you want to use OpenGL, it should be enough to use some library like SFML or GLUT or FreeGLUT or something like that. It will give you all you need to "render" things. But for example physics is on your own - collisions, models, animations (if your hero will be only 2D, you can use just sprites - animated pictures). You may want also create some level editor, export levels from it and import them to game.

I think, that the hardest part is levels and collisions with environment (and if you want 3D character, then maybe also animations).

  • \$\begingroup\$ I want to have a 3D character. Can you provide more info about animmations? I model them in 3D software? \$\endgroup\$ – congkawa isaki Dec 5 '11 at 20:19
  • \$\begingroup\$ Ou. That would be problem. I have never used 3D animations in OpenGL. But I think you can also find some libraries, like animahead: animadead.sourceforge.net (but I think this is only for C++, not Java). It will be easier to use some 3D engine, but I'm programming in C++, not Java, so I won't help you with this. I'm sorry ;) \$\endgroup\$ – zacharmarz Dec 5 '11 at 20:45
  • \$\begingroup\$ Well i could switch to C++ if i can't find all the needed tools in java. \$\endgroup\$ – congkawa isaki Dec 5 '11 at 20:52
  • \$\begingroup\$ @congkawa-isaki Yes, you model them in 3d Application like Blender, 3ds Max ,Maya, XSI etc etc. After modeling you UV map them, then texture them, then rig(its like attaching bone to a character) them, then animate them, then you export them to a particular format that your game engine recognize, then you set you game logic one them! SIMPLE! \$\endgroup\$ – Quazi Irfan Dec 6 '11 at 21:59

You should use LWJGL which is a java implementation of OpenGL that is very good for beginners and professionals as it does the basic setup of the OpenGL components for you and it is much simpler than using OpenGL by itself.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.