Wireframe 1st-person render of a maze

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
aidalgol
Prole
Posts: 19
Joined: Tue Feb 07, 2012 7:53 pm
Location: New Zealand
Contact:

Wireframe 1st-person render of a maze

Post by aidalgol » Fri Nov 03, 2017 7:38 pm

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?

aidalgol
Prole
Posts: 19
Joined: Tue Feb 07, 2012 7:53 pm
Location: New Zealand
Contact:

Re: Wireframe 1st-person render of a maze

Post by aidalgol » Fri Nov 03, 2017 9:03 pm

After stumbling upon love.graphics.shear, I think I should just draw flat rectangles with holes in the sides, and apply shear transform.

aidalgol
Prole
Posts: 19
Joined: Tue Feb 07, 2012 7:53 pm
Location: New Zealand
Contact:

Re: Wireframe 1st-person render of a maze

Post by aidalgol » Sat Nov 04, 2017 2:44 am

No, that won't work. Of course that won't work. Shear is a linear transformation.

SPlice
Prole
Posts: 45
Joined: Thu Jul 28, 2011 8:53 am

Re: Wireframe 1st-person render of a maze

Post by SPlice » Sat Dec 02, 2017 7:12 am

Use matrix multiplication to do some 3d points than use a mesh or lines to draw your maze

User avatar
erasio
Party member
Posts: 118
Joined: Wed Mar 15, 2017 8:52 am
Location: Germany

Re: Wireframe 1st-person render of a maze

Post by erasio » Sat Dec 02, 2017 7:45 am

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/

aidalgol
Prole
Posts: 19
Joined: Tue Feb 07, 2012 7:53 pm
Location: New Zealand
Contact:

Re: Wireframe 1st-person render of a maze

Post by aidalgol » Sat Dec 02, 2017 7:54 am

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.)

User avatar
zorg
Party member
Posts: 2596
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Wireframe 1st-person render of a maze

Post by zorg » Sat Dec 02, 2017 8:25 am

(Also please don't multi-post; you can edit your own posts to add other stuff if you want.)
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

Post Reply

Who is online

Users browsing this forum: 4vZEROv, Bing [Bot], Google [Bot] and 5 guests