Page 1 of 1

Wireframe 1st-person render of a maze

Posted: Fri Nov 03, 2017 7:38 pm
by aidalgol
I'm trying to make a dungeon crawler in the vein of Scarab of Ra, and I'm a bit stuck on the render part of this. I'm aiming for a retro, 1-bit graphics look, with no movement animations, so I think I can pull this off with LÖVE, and not have to go true 3D.

https://gitlab.com/aidalgol/rogue-pyramid

The first approach I'm going to try is drawing lines from (near) the corners of the viewport heading toward the centre of the viewport. Then draw the lines in segments, one for for each cell travelling forwards, only drawing a segment when there is a wall on that side of that cell.

Does this sound at all sensible, or can anyone offer suggestions?

Re: Wireframe 1st-person render of a maze

Posted: Fri Nov 03, 2017 9:03 pm
by aidalgol
After stumbling upon love.graphics.shear, I think I should just draw flat rectangles with holes in the sides, and apply shear transform.

Re: Wireframe 1st-person render of a maze

Posted: Sat Nov 04, 2017 2:44 am
by aidalgol
No, that won't work. Of course that won't work. Shear is a linear transformation.

Re: Wireframe 1st-person render of a maze

Posted: Sat Dec 02, 2017 7:12 am
by SPlice
Use matrix multiplication to do some 3d points than use a mesh or lines to draw your maze

Re: Wireframe 1st-person render of a maze

Posted: Sat Dec 02, 2017 7:45 am
by erasio
If you have never done anything like this before and wonder how to do it (the logic behind 3d rendering).

I can recommend catlike coding. The tutorials are for unity but it will bring you up to speed and give you the knowledge necessary to implement 3d rendering.

http://catlikecoding.com/unity/tutorial ... ng/part-1/

Re: Wireframe 1st-person render of a maze

Posted: Sat Dec 02, 2017 7:54 am
by aidalgol
Thanks, I've also had LearnOpenGL.com recommended to me for getting up to speed on OpenGL. (I've only covered the fixed-function pipeline until now.)

Re: Wireframe 1st-person render of a maze

Posted: Sat Dec 02, 2017 8:25 am
by zorg
(Also please don't multi-post; you can edit your own posts to add other stuff if you want.)