I am approaching OpenGL and general gaming-development. I want to start by coding a simple 2D game in Java (lwjgl) but, since I can create models with Blender, I don't want to use 2D sprites, but a semi-flat environment. My target is to remake a classic game but with some cool stuff like particle emitters, bump mapping, lighting and so on... The basic idea is to make something that looks like Super Mario Bros Wii (or Kirby's Adventures Wii, or Super Smash Bros. etc...).

Do you think I have to use JavaMonkeyEngine? Some hints,code snippets, tutorials, links? Do I have to handle a "z-fixed" camera or set-up OpenGL to render in 2D mode? What about the HUD? Sorry if my question is too generic, but I would like to have a clear idea of what I have to do before starting writing code. As always, thanks for your help!

  • \$\begingroup\$ Yeah, this is broad enough that it's multiple questions. To make the gameplay 2D, keep everything (in 3D) at Z = 0. Draw the HUD as a 2D overlay. And, how much do you need to know about general game development? \$\endgroup\$ May 9, 2012 at 14:06
  • \$\begingroup\$ I have read a lot, but now I need to dive into real development. For now I think I'll start from scratch and try to implement something. I'll post some other questions as soon as I get stuck (yes, I will surely get stuck! :P ) What do you think about JavaMonkeyEngine? \$\endgroup\$
    – Otacon
    May 9, 2012 at 15:33
  • 2
    \$\begingroup\$ If this is your first attempt at developing a game, I'd go with something less ambitious; that's a big pill you're trying to swallow. I've never used JavaMonkeyEngine so I can't offer any insight at all, there. \$\endgroup\$ May 9, 2012 at 16:07
  • \$\begingroup\$ as chaosTechnician said, what you want seems to be 2D gameplay, while actually rendering in 3D. To get "2D" visuals, you would use an orthographic projection matrix, instead of perspective projection. \$\endgroup\$
    – user13213
    May 9, 2012 at 17:15

2 Answers 2


I'll mostly compile what others said in comments. It's definitely possible to make a 2D game using 3D rendering, it's actually what most games do nowadays. So, to answer your questions:

Do you think I have to use JavaMonkeyEngine?

You can use jMonkeyEngine, but you could use any 3D engine for that matter

Do I have to handle a "z-fixed" camera or set-up OpenGL to render in 2D mode?

I'd say you've got 3 options:

  • Old-school 2D: render only flat polygons at depth zero, with an orthographic projection; that's basically a sprite engine over a 3D engine. You said you didn't want sprites, so I guess this is a no-go.
  • 2.5D: use a "regular" perspective projection but flat polygons only, at different depths layers; that's what's used in Shank or Rayman Origins for instance.
  • 3D with 2D gameplay: full 3D assets, but the gameplay sticks to one plane only, e.g. Trine or Donkey Kong Country Returns.

Some hints, code snippets, tutorials, links?

It all depends on which option you choose, I'm sure you'll find resources by yourself. Still, have a look at Wikipedia for an explanation of orthographic projections, and here for their configuration in jMonkeyEngine.

What about the HUD?

It's just the same as in a 3D game, rendered in screen-space after all the rest with your favorite lib.


Complementing lorancou's answer, I would add that you also have the option to create the backgrounds and objects in 3d, pre-render them and use the pre-rendered sprites in the game. It is possible to obtain nice visuals doing that.
To create a nice sense of depth, use parallax scrolling, you can find information about the technique here:
Question About An Implementation Of Parallax Scrolling In C++/SDL/OpenGL
and here:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .