A
A
alkolove12019-06-29 11:32:41
Game development
alkolove1, 2019-06-29 11:32:41

How to make the simplest software 3D engine?

In Google I found a shaft of examples with a rotating cube. But even this is too complicated for me to understand.
To begin with, I would like to make at least a one-room sector. That is, from the available data X, Y of each edge on the map and the position / rotation angle of the camera, place points. Then connect these points with each other with lines, simulating the floor. Then draw a line upwards from each point, the length of which depends on the distance from the camera. And there, at the top, also connect these very lines, imitating the ceiling (in general, like the "port" of Doom on the Ti calculator).
In addition, a difficult problem for me is the clipping of invisible lines, as well as those that are behind the screen.
Raycasting is not offered. Firstly, the walls will turn out only with a multiplicity of 90 degrees.
Secondly, I tried to delve into it, but I can’t master it beyond the theory. In addition, I need to implement my plan on a very limited hardware, where fractional numbers have a fixed comma (we are talking about the current megadrive, if that).
P.S. C-like or BASIC-like pseudo-code will do.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
L
Lander, 2019-06-29
@usdglander

Here is all the necessary mathematical base with code examples. The book is big, but if you really need it, then I think this will not stop you.

A
Armenian Radio, 2019-06-29
@gbg

A short course in computer graphics: writing simplified ...

A
Anton Shamanov, 2019-06-29
@SilenceOfWinter

In short, you first need to learn DirectX / OpenGl.
For general presentation: Mikhail Krasnov "DirectX Graphics in Delphi projects". The book is as old as mammoth shit (I bought it when I was finishing school), but it is quite simple and intelligibly describes the development process.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question