Raycasting Demo (like Wolfenstein3D, just veery basic)

Showcase your libraries, tools and other projects that help your fellow love users.
pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by pekka »

But if they add 3D features, they can't call it Löve2D anymore. Perhaps Löve2.5D will be a better name then. Or Löve2.718281828459045D for that matter.

Sorry :ultrahappy:
User avatar
pygy
Citizen
Posts: 98
Joined: Mon Jan 25, 2010 4:06 pm

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by pygy »

Well, I'm currently rewriting the logic to

1) Extract the coordinates of the wall (at love.load() time)
2) Cull the walls outside of the field of view
3) Use linear algebra to get the distance rather than the current iterative process.

It will hopefully be faster still (and make the tracing speed independent of the field depth, but dependent on the number of walls).

Improvements to the player's moves logic are of course welcome :-)

Regarding the arbitrary quad deformations, they could be useful in other 2D contexts too.
Hermaphroditism is not a crime. -- LSB Superstar

All code published with this account is licensed under the Romantic WTF public license unless otherwise stated.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by Jasoco »

pekka wrote:But if they add 3D features, they can't call it Löve2D anymore. Perhaps Löve2.5D will be a better name then. Or Löve2.718281828459045D for that matter.

Sorry :ultrahappy:
Well, the SNES had 3D games, but it wasn't a 3D system. I don't think anyone would complain if Löve suddenly had simple 3D features if it was still primarily a 2D engine. ;)
scirath
Citizen
Posts: 85
Joined: Mon Feb 23, 2009 4:44 am

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by scirath »

pekka wrote:But if they add 3D features, they can't call it Löve2D anymore. Perhaps Löve2.5D will be a better name then. Or Löve2.718281828459045D for that matter.

Sorry :ultrahappy:
Hmm. Maybe they could just shorten it to Löve.
(USER MIGHT BE BANNED FOR THIS POST.)
User avatar
thelinx
The Strongest
Posts: 857
Joined: Fri Sep 26, 2008 3:56 pm
Location: Sweden

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by thelinx »

I am monitoring this thread.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by Jasoco »

scirath wrote:Hmm. Maybe they could just shorten it to Löve.
Well, I never refer to it as Löve2D anyway. Why limit yourself from the start when the future is uncertain? Who knows what they'll be able to do in 3 years? 5 years? 10 years? 100 years? Because we all know Löve will last that long.
scirath
Citizen
Posts: 85
Joined: Mon Feb 23, 2009 4:44 am

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by scirath »

I'm still mildly curious as to why they decided to call it Löve to begin with. Heh. Though it's probably in a FAQ somewhere that I didn't bother to read.
(USER MIGHT BE BANNED FOR THIS POST.)
User avatar
bmelts
Party member
Posts: 380
Joined: Fri Jan 30, 2009 3:16 am
Location: Wiscönsin
Contact:

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by bmelts »

The FAQ wrote:What is up with the umlaut in LÖVE?
We can't really say that we're making love, now can we? Plus, adding an umlaut makes anything awesome, just look at Motörhead.
pekka
Party member
Posts: 206
Joined: Thu Jan 07, 2010 6:48 am
Location: Oulu, Finland
Contact:

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by pekka »

pygy wrote:Well, I'm currently rewriting the logic to

1) Extract the coordinates of the wall (at love.load() time)
2) Cull the walls outside of the field of view
3) Use linear algebra to get the distance rather than the current iterative process.
Neat stuff, though there is a slight element of futility in doing this all in pure Lua with Löve :). Since you're intent on doing this, have you though yet about placing billboards and mobile sprites in the scenery?

It looks like you'd have to draw them in the right order. For example, imagine a monster in the cavern being half hidden by a corner, but in front of a wall further away. You'd have to draw the distant wall first, then the monster sprite, and then the nearer wall that obscures half of the monster sprite to get it to look right. Or alternatively draw the monster only where the rays hit it, but in any case the rays will have to continue further than the monster to give you the background wall (I'm assuming the sprite is partly transparent of course).
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Raycasting Demo (like Wolfenstein3D, just veery basic)

Post by Robin »

scirath wrote:Hmm. Maybe they could just shorten it to Löve.
Hate to break the fun here, but AFAIK it was always LÖVE. love2d.org is just the domain name -- one might imagine love.org was already taken. ;)
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: No registered users and 58 guests