0
\$\begingroup\$

I can't find what is the name of the camera type.

Sided camera view seems logical but not correct thought

\$\endgroup\$
3
  • 3
    \$\begingroup\$ "Side view" is not correct? Says who? \$\endgroup\$ – Philipp Jan 25 '17 at 10:13
  • 2
    \$\begingroup\$ Put camera, make it orthographic projection. Done. (Though this really depends on language etc. so more info would be useful.) \$\endgroup\$ – John Hamilton Jan 25 '17 at 10:20
  • \$\begingroup\$ Orthographic is more than likely the term you want. \$\endgroup\$ – lozzajp Jan 25 '17 at 13:56
1
\$\begingroup\$

From what I understand of your question, the 'type' you're after is in fact called a 'projection'.

From Wikipedia:

3D projection is any method of mapping three-dimensional points to a two-dimensional plane.

Since most 2D games are rendered via 3D APIs (such as OpenGL), the projection that is used in most 2D games is the 'orthographic', or 'parallel', projection, as opposed to 'perspective' projections, that are used in 3D games.

As for the side, there is not really such a thing. If you use a 2D engine, the coordinates will be x, y and depth, while if you use a 3D engine, you'll be able to decide how to do it, depending on how your brain works:

  • you can place the camera in z+, pointing towards 0/z-, having y+ pointing up and x+ pointing right, with the smaller z being the further away from the camera
  • you can place the camera in y-, pointing towards 0/y+, having z+ pointing up and x+ pointing right, while the bigger y being the further way from the camera
  • etc

Now the rest of the answer is just extra things that complement what has already been said.

An orthographic projection will project the 3D points directly to the screen, in a 'flat' fashion, without simulating a 'real world' point of view.

The use of the orthographic projection is required because even if everything is going to 'look flat' in the 2D game, there is still the concept of depth, or z-ordering.

As a simple example, here is a bunch of cubes rendered with a perspective camera projection:

example of perspective

And here is the same thing, but using an orthographic camera projection:

example of orthographic

The cubes' top faces are 10 units above the grid. Do you notice that the cubes are well aligned with the grid with the orthographic projection, but are not with the perspective? That's what you're after when programming a 2D game.

\$\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.