Page 1 of 3

Just a question, Love3D?

Posted: Fri Nov 12, 2010 11:09 am
by Ryne
Hi guys. at the risk of sounding like a moron(asking about 3D, in "love2d") I'd like to ask a question.

I was talking to partymetroid yesterday and he sent me this.

http://forums.tigsource.com/index.php?topic=9701.0

I find the graphic style fascinating. I was wondering if something like this could be achieved in love? It's obvious that even if it were possible, it would be outside the scope of what I would be capable of doing. Especially while I'm in the process of developing my game. I was just curious if it could be done, and how It would perform.

Thanks.

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 12:15 pm
by nevon
Been thinking about more or less the same thing myself. Technically, the answer is yes. 3D can be simulated in 2D. Jasoco's starfox demo comes to mind. Shading has also been done. So yeah, it's possible, just not for us mere mortals.

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 12:28 pm
by zac352

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 12:44 pm
by Ryne
nevon wrote:Been thinking about more or less the same thing myself. Technically, the answer is yes. 3D can be simulated in 2D. Jasoco's starfox demo comes to mind. Shading has also been done. So yeah, it's possible, just not for us mere mortals.
I thought in theory that It should work. The person who made that game apparently created the engine from scratch, So I was assuming it would be just as difficult as that. I couldn't image it being harder.

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 12:52 pm
by zac352
Ryne wrote:
nevon wrote:Been thinking about more or less the same thing myself. Technically, the answer is yes. 3D can be simulated in 2D. Jasoco's starfox demo comes to mind. Shading has also been done. So yeah, it's possible, just not for us mere mortals.
I thought in theory that It should work. The person who made that game apparently created the engine from scratch, So I was assuming it would be just as difficult as that. I couldn't image it being harder.
x'=x*s/z
y'=y*s/z
(s is the viewer distance from eye to screen, apparently)

That's from wikipedia. Have fun translating and rotating your scene around your camera. :P

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 1:25 pm
by vrld
Ryne wrote:I thought in theory that It should work. The person who made that game apparently created the engine from scratch, So I was assuming it would be just as difficult as that. I couldn't image it being harder.
He is probably using a 3d framework like Direct3D or OpenGL that does all those pesky 3d-to-2d transformations for him.

To get 3D with löve, you'd have to write a software renderer, which is - as zac mentioned - far from trivial. It will be much, much slower than using OpenGL/Direct3D, since you can't use the graphics hardware.
Using textures might not be possible with löve, because you can't transform a rectangle to be a trapeze - which you would need for perspective rendering.

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 1:36 pm
by zac352
vrld wrote:
Ryne wrote:I thought in theory that It should work. The person who made that game apparently created the engine from scratch, So I was assuming it would be just as difficult as that. I couldn't image it being harder.
He is probably using a 3d framework like Direct3D or OpenGL that does all those pesky 3d-to-2d transformations for him.

To get 3D with löve, you'd have to write a software renderer, which is - as zac mentioned - far from trivial. It will be much, much slower than using OpenGL/Direct3D, since you can't use the graphics hardware.
Using textures might not be possible with löve, because you can't transform a rectangle to be a trapeze - which you would need for perspective rendering.
I have a PHP script for that which I don't feel like hunting down at the moment, but I could always write another one. It's not that laggy. Until you get to interpolating pixels, anyway. :P

What is hard though, is debugging the nasty logic nightmares that arise from these things. I can't tell what is wrong with my code. I *think* it *might* be in rotations. I am extremely unsure, though.

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 1:41 pm
by Chief
vrld wrote: Using textures might not be possible with löve, because you can't transform a rectangle to be a trapeze - which you would need for perspective rendering.
Hard, performance draining and shitty looking... but possible!

Image

I've ended up with making a oblique view thing instead.

Image

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 1:44 pm
by zac352
Chief wrote:
vrld wrote: Using textures might not be possible with löve, because you can't transform a rectangle to be a trapeze - which you would need for perspective rendering.
Hard, performance draining and shitty looking... but possible!

Image

I've ended up with making a oblique view thing instead.

Image
I wish that imageshack wasn't blocked by my school... >_>

Re: Just a question, Love3D?

Posted: Fri Nov 12, 2010 2:15 pm
by vrld
Chief wrote:but possible!
Awesome! How did you do that?