Simulate 3D space in 2D

I am starting to code my first game, and I want to make a simple 2D sprite game. However, I want to simulate 3D space and physics, and I'm looking for a few tutorials / guides / algorithms that would teach me the basics ... but still without any luck.

Do you have any recommendations? Books? I don’t care about the programming language, any language will do, since I can read the algorithms in most languages, and for a start I just want to understand the outgoing solutions for the 3D → 2D problem.

Thank!

Edit: I don't do much physics right now, as for projecting 3D space onto 2D

This is the best article I have found on the topic: http://www.create-games.com/article.asp?id=2138

Another great article: http://pixwiki.bafsoft.com/mags/5/articles/circle/sincos.htm

+3
source share
4 answers

In 1980, game systems used parallax techniques to give a sense of depth with a 2D implementation.

+3
source

If you are talking about the process of rendering a 3D scene in the form of a 2D image (i.e., on the screen), you need to look at perspective forecasts . However, it is quite heavy in mathematics and requires a lot of work with transformation matrices and linear algebra.

You need to make sure that you scratch both linear algebra and calculus if you plan on creating a 3D physical game.

+2

2D, 2D-. Box2D ! , .

+1

, , OpenGL , , -, .

It provides some very powerful tools for creating 3D objects, installing viewports in a virtual 3D space, placing lights, defining textures. It may take a couple of weeks of free time to handle, but it certainly saves you from the great mathematical perspective that you will need to minimize your own 3D tools. Intenet has some good tutorials.

Good luck.

+1
source

Source: https://habr.com/ru/post/1727076/


All Articles