0
\$\begingroup\$

I'm making a 2D dungeon crawler. The problem I found, it is that trying to animate the movement through the dungeon it is hard as hell. Then I thought that maybe a 3D dungeon will be better for this, but I don't like it. Are anyways to make a 3D game look like a 2D game? I mean...

There is some kind of shader o camera mode to achieve a 3D game look like this?

enter image description here

(Tough the game is in 3D, looks like it was a 2D game trying to be 3D).

\$\endgroup\$
2
\$\begingroup\$

I believe you should still want to use a perspective projection instead of orthogonal one, as there is still a perspective in it.

There's some ways on how to achive it. One would be using a perspective projection and tweak the fov to achieve the narrow camera effect and maybe a low resolution framebuffer (OpenGL) and resize it to get a pixelated effect. Second would be using a ray casting method which is used for some old 3D games.

There should be more ways to achieve this though.

\$\endgroup\$
  • \$\begingroup\$ I will look at this. Raycasting is interesting too, but it doesn't seem to allow using textures on its walls. \$\endgroup\$ – piniacat Jun 27 '16 at 19:14
  • \$\begingroup\$ @Tchangla Nah, texture is allowed. There is a stream video where Markus "Notch" Persson use this technique (or i think he did) to make a dunegon crawler which has textures for walls and floors. Edit: You can see that texture is allowed at the wikipedia link i provided at the feature and limitation part. \$\endgroup\$ – Greffin28 Jun 28 '16 at 4:41
1
\$\begingroup\$

Use an orthographic camera instead of perspective camera.

\$\endgroup\$

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.