Working Raycasting example! WolfenLöve 3D if you will...
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Working Raycasting example! WolfenLöve 3D if you will...
Hello... yes. I just realized it.. I edited my original post
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Working Raycasting example! WolfenLöve 3D if you will...
Note: Deleted my previous post to make my edits seem new and let people know I made progress so this first quote was from an hour ago or so. The rest from more recently.
Going to examine your code and do some experimentation...
Edit: CLOSE!
Edit again: And it's a BINGO! That's what they say, right?
After DAYS of scratching my head, we finally got it. If it weren't for your help, it wouldn't have been done.
You will notice the jagged edges. This is unavoidable with the method being used. If only Löve had the same capabilities as Java with image manipulation and speed. (See: Prelude of the Chambered for perfect floors) But hell, this is SOMETHING! It'll open up so many possibilities! Including animated floors (Just change the ground canvas, but not the entire one to save speed) and other things.
It also does have some bleeding of darkness around edges which I will try to fix. For instance, note that the angle is jagged on the floor but smooth on the walls. Should be simple to fix if done right. Once again unavoidable.
Now I just need to do the ceiling for levels with no sky and make proper textures.
This is a GOOD DAY! Thanks JFROCO! The world is now safe from evil... except that little guy in the blue boots staring at me... what's his problem? He keeps following me but never says anything. Maybe I should give him a personality...
Next up... DOORS.
Hello, yes. I know, I just edited my post.jfroco wrote:Hello... yes. I just realized it.. I edited my original post
Going to examine your code and do some experimentation...
Edit: CLOSE!
Edit again: And it's a BINGO! That's what they say, right?
After DAYS of scratching my head, we finally got it. If it weren't for your help, it wouldn't have been done.
You will notice the jagged edges. This is unavoidable with the method being used. If only Löve had the same capabilities as Java with image manipulation and speed. (See: Prelude of the Chambered for perfect floors) But hell, this is SOMETHING! It'll open up so many possibilities! Including animated floors (Just change the ground canvas, but not the entire one to save speed) and other things.
It also does have some bleeding of darkness around edges which I will try to fix. For instance, note that the angle is jagged on the floor but smooth on the walls. Should be simple to fix if done right. Once again unavoidable.
Now I just need to do the ceiling for levels with no sky and make proper textures.
This is a GOOD DAY! Thanks JFROCO! The world is now safe from evil... except that little guy in the blue boots staring at me... what's his problem? He keeps following me but never says anything. Maybe I should give him a personality...
Next up... DOORS.
Re: Working Raycasting example! WolfenLöve 3D if you will...
Great work!!! Looks awesome. Congrats
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Working Raycasting example! WolfenLöve 3D if you will...
Doors are gonna be a bit harder I can tell.
I figured out so far how to change the wall textures on the inside edges of the doors to door frames. I now just need to figure out when the ray is entering a door tile and stop casting and draw the door at halfway between tiles. It's more complicated than that but I'll do my best.
Notch made it look so easy when he created that Prelude game in 48 hours. His doors are actually 3D too.
I figured out so far how to change the wall textures on the inside edges of the doors to door frames. I now just need to figure out when the ray is entering a door tile and stop casting and draw the door at halfway between tiles. It's more complicated than that but I'll do my best.
Notch made it look so easy when he created that Prelude game in 48 hours. His doors are actually 3D too.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Working Raycasting example! WolfenLöve 3D if you will...
Oh man, so awesome!
Help us help you: attach a .love.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Working Raycasting example! WolfenLöve 3D if you will...
This is incredible! I can't wait to sift through the code
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: Working Raycasting example! WolfenLöve 3D if you will...
This thread makes me happy \o/
That's clever; I tried making something like that -actually it was far from it, it was a slow textured quad, plotting every pixel.. I'm looking forward to an eventual release
That's clever; I tried making something like that -actually it was far from it, it was a slow textured quad, plotting every pixel.. I'm looking forward to an eventual release
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Working Raycasting example! WolfenLöve 3D if you will...
The first video of many I will post as I add new features. Newest additions are floors, door frames for when I get doors in place, an initial editor. A feature I didn't show was higher rooms because it's not ready yet and is low priority. This video is Hidden for now until release because I hate when people comment "WHERE CAN I DOWNLOAD THIS GAEM!!!??" when it's so obviously not freaking finished.
As I said, I won't be creating an official thread or offering a download until I get the most important pieces in place. That includes working doors, item pickups, initial enemy AI and better collision detection.
Other things to do are ceiling casting, better lighting, (Make it so when the light level is low, the raycaster will stop searching sooner* and give the game better framerate if it casts into an area that would be 100% black anyway) scripts and switches, NPC's, transparent walls that actually allow casting to continue passed them.
*Raycasting is the most expensive part of the game. It has to check every grid square from your position to the first wall it finds, then do it a couple hundred more times for every line across the screen. It performs a lot of math calculations to do this. The higher your resolution, the more rays it has to cast. And the bigger a room, the longer it takes to cast the ray. Which is why framerate jumps when you are right up against a wall.
As I said, I won't be creating an official thread or offering a download until I get the most important pieces in place. That includes working doors, item pickups, initial enemy AI and better collision detection.
Other things to do are ceiling casting, better lighting, (Make it so when the light level is low, the raycaster will stop searching sooner* and give the game better framerate if it casts into an area that would be 100% black anyway) scripts and switches, NPC's, transparent walls that actually allow casting to continue passed them.
*Raycasting is the most expensive part of the game. It has to check every grid square from your position to the first wall it finds, then do it a couple hundred more times for every line across the screen. It performs a lot of math calculations to do this. The higher your resolution, the more rays it has to cast. And the bigger a room, the longer it takes to cast the ray. Which is why framerate jumps when you are right up against a wall.
Re: Working Raycasting example! WolfenLöve 3D if you will...
WHERE CAN I DOUNLOOD DIS GAEM!?
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Working Raycasting example! WolfenLöve 3D if you will...
Exactly. *sigh* Well, what do you think sooooo far?
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 7 guests