Working Raycasting example! WolfenLöve 3D if you will...

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.
User avatar
slime
Solid Snayke
Posts: 3160
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by slime »

Have you tried using LuaJIT and seeing what sort of speed increase you get?
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by Jasoco »

Nope because I don't know what that is or how to use it.
User avatar
slime
Solid Snayke
Posts: 3160
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by slime »

User avatar
MarekkPie
Inner party member
Posts: 587
Joined: Wed Dec 28, 2011 4:48 pm
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by MarekkPie »

I'm pretty sure Jasoco uses Linux :(
User avatar
slime
Solid Snayke
Posts: 3160
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by slime »

His screenshots are from OSX. :P
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by Jasoco »

The video should have given it away if not the screenshots.

Doesn't work. Is LuaJIT based on 0.8.0? Because this game takes extreme advantage of new features not in 0.7.x. It tells me I can't do "newCanvas". I need a newer version. Does one exist?

Also, Doors are kicking my ass right now. I'm even looking at Wolfenstein 3D's code. Floors were easier than this!
Last edited by Jasoco on Sat Jan 28, 2012 6:21 am, edited 1 time in total.
User avatar
MarekkPie
Inner party member
Posts: 587
Joined: Wed Dec 28, 2011 4:48 pm
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by MarekkPie »

Whoops, you're right. I was thinking of another thread where he went a lil' overboard about someone not having a non-Windows binary, and I usually equal that level of Microsoft rage with Linux users (No offense, Jasoco.)
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by Jasoco »

MarekkPie wrote:Whoops, you're right. I was thinking of another thread where he went a lil' overboard about someone not having a non-Windows binary, and I usually equal that level of Microsoft rage with Linux users (No offense, Jasoco.)
How dare you not have a .love file! The outrage! The anger! It's unacceptable. :P
User avatar
slime
Solid Snayke
Posts: 3160
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by slime »

Oh sorry, I thought you were still using 0.7.2. I'll post a 0.8.0 LuaJIT build once I reboot back into OSX later.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Working Raycasting example! WolfenLöve 3D if you will...

Post by Jasoco »

slime wrote:Oh sorry, I thought you were still using 0.7.2. I'll post a 0.8.0 LuaJIT build once I reboot back into OSX later.
Thanks! As long as it's up to date. I know they changed other things between older versions of 0.8.0.

After spending way too much time going about door casting the wrong way I decided to try a different approach. As you can see, I almost have it. The rectangle represents where the door would be. The two points A and B are the ends of the door. I would need to figure out how to cast rays along that line excluding any rays that would be inside the wall as seen in the bottom shot. The door drawing would probably be post-processed after the rays for the walls have been added to the pool. It would create the rays along that line and add them to the pool with everything else, sort it and everything would draw correctly. In the first shot below, it would be about 55 rays. But they'd be easier like the floor since the distance is already known and it doesn't have to find any walls.

I just need to figure out how to cast the rays from point A to point B. It's probably so easy, but it's 3AM so I'll tackle it tomorrow. I WILL get doors implemented tomorrow. If it kills me!

Image
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests