This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-11-04 17:50:12

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Ray casting

Can someone make a tutorial on how Raycasting works?  I really have NO IDEA WHATSOEVER how to make one.  I've read through a bunch of Raycaster code, but nothing helps.  Thanks in advance.

Offline

 

#2 2011-11-04 18:09:54

Pecola1
Scratcher
Registered: 2010-09-06
Posts: 1000+

Re: Ray casting

I think, im not sure, but that it has a list of the walls and then it draws those and those walls set to a z y and x position... but i dont know...


If you are reading this, please read to the end, because if you don't you won't know what's at the end. Don't just skip to the end though otherwise you won't be able to read the middle, which is most important. Now you must be wondering why you just read all that, the reason is you may have not noticed something, read it again and see if you notice it this time  smile

Offline

 

#3 2011-11-04 18:39:38

Greatdane
Scratcher
Registered: 2007-06-05
Posts: 1000+

Re: Ray casting

It's actually the points that are recorded.


The future belongs to those who believe in the beauty of their dreams.
        ~ Eleanor Roosevelt

Offline

 

#4 2011-11-05 02:05:25

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Ray casting


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#5 2011-11-06 17:10:14

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Offline

 

#6 2011-11-07 02:18:11

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: Ray casting

maxskywalker wrote:

Um, this doesn't really help.

Oh. Sorry, I thought I had a Wiki article linked in the project notes, which would be helpful. Well, here's the link: wiki.scratch.mit.edu/wiki/Raycasting. Good luck!

PS. Revise your trigonometry. It helps!  wink


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7 2011-11-09 02:20:18

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Ray casting

Well i made a tutorial, it possibly the worst way to ray cast but i made it up off the top of my head  tongue  Raycaster the tutorial


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#8 2011-11-10 10:20:22

maxskywalker
Scratcher
Registered: 2008-01-27
Posts: 1000+

Re: Ray casting

slinger wrote:

Well i made a tutorial, it possibly the worst way to ray cast but i made it up off the top of my head  tongue  Raycaster the tutorial

Yeah, it is the worst way (no offense)  tongue .  PLZ don't tell me I'm stuck trying to figure out array-based raycasters (the only way I can think of how to do) on my own...

Offline

 

Board footer