Thanks a lotJasoco wrote:My project is currently not in progress. You should probably ask the other guy currently doing Raycasting.
viewtopic.php?f=5&t=12069
I'm currently tied up with 3D polygons.
Short answer, if you've coded it correctly, and I assume you have if you have successfully replicated the numerous demos availble on the internet, you divide each wall tile into quads, figure out where along the wall the ray is hitting, (The value will be between 0 and 1 as a decimal value. Simply multiply that by the tile width you use and floor it to get your quad number) and display that quad.
Go to that link above. That is where most active discussion will be taking place until I decide to take up this project again.
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...
Re: Working Raycasting example! WolfenLöve 3D if you will...
It would mean tons if you could just comment the code, what you have done, so that people can understand it easier. I'm trying to write my own first raycaster engine, and i'm taking a look at others code just to see different ways of doing it. Maybe you could comment it?
Re: Working Raycasting example! WolfenLöve 3D if you will...
Considering he wrote it 7 years ago, your guess is probably as good as his.Sarius wrote: ↑Tue Feb 26, 2019 7:43 am It would mean tons if you could just comment the code, what you have done, so that people can understand it easier. I'm trying to write my own first raycaster engine, and i'm taking a look at others code just to see different ways of doing it. Maybe you could comment it?
- 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...
This is a realllllly old topic. And numerous better similar Wolf-like engines have been created since then. Including one that's much better than mine that was based on my original code. (I forget who made it right now)
And my original code was ported (by me) to Lua from a JavaScript engine I found on Google once years ago. (Just like my 3D engines are all ported from some archaic math I found in a QuickBASIC project 20 years ago.)
Also I've never been one for commenting code much. It just doesn't come naturally to me.
And my original code was ported (by me) to Lua from a JavaScript engine I found on Google once years ago. (Just like my 3D engines are all ported from some archaic math I found in a QuickBASIC project 20 years ago.)
Also I've never been one for commenting code much. It just doesn't come naturally to me.
Re: Working Raycasting example! WolfenLöve 3D if you will...
You can find an example of a raycaster I did here: viewtopic.php?f=5&t=78608Sarius wrote: ↑Tue Feb 26, 2019 7:43 am It would mean tons if you could just comment the code, what you have done, so that people can understand it easier. I'm trying to write my own first raycaster engine, and i'm taking a look at others code just to see different ways of doing it. Maybe you could comment it?
I think the code is quite well-documented and there is some extra info in the thread.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
personal page and a raycaster
Who is online
Users browsing this forum: Ahrefs [Bot] and 3 guests