Discuss Scratch

_Explosive_Games_
Scratcher
9 posts

How do you do raycasting?

Many ppl have sugested that i use http://lodev.org/cgtutor/raycasting.html BUT it dosent make sense, can some one make a tutorial http://lodev.org/cgtutor/images/wolf3d.jpg
jokebookservice1
Scratcher
1000+ posts

How do you do raycasting?

You want to bounce a little dot into every direction the player can see. The dot should measure the distance it travels before it hits a wall. You then draw the height of the wall at that point to something that has a relationship to the distance to the wall.
_Explosive_Games_
Scratcher
9 posts

How do you do raycasting?

Oh Ohhhhhhhhhhhhh
jokebookservice1
Scratcher
1000+ posts

How do you do raycasting?

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
SC_DStwo_Master
Scratcher
100+ posts

How do you do raycasting?

jokebookservice1 wrote:

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
how would you implement such a dot? (without using maths formulae)
jokebookservice1
Scratcher
1000+ posts

How do you do raycasting?

SC_DStwo_Master wrote:

jokebookservice1 wrote:

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
how would you implement such a dot? (without using maths formulae)
You make a sprite, that literally moves one step and makes a variable go up by 1. When it literally hits a wall sprite, you can record the distance in a list
lugga
Scratcher
500+ posts

How do you do raycasting?

jokebookservice1 wrote:

SC_DStwo_Master wrote:

jokebookservice1 wrote:

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
how would you implement such a dot? (without using maths formulae)
You make a sprite, that literally moves one step and makes a variable go up by 1. When it literally hits a wall sprite, you can record the distance in a list
I think he was refering to the virtual dot.
jokebookservice1
Scratcher
1000+ posts

How do you do raycasting?

lugga wrote:

jokebookservice1 wrote:

SC_DStwo_Master wrote:

jokebookservice1 wrote:

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
how would you implement such a dot? (without using maths formulae)
You make a sprite, that literally moves one step and makes a variable go up by 1. When it literally hits a wall sprite, you can record the distance in a list
I think he was refering to the virtual dot.
Then you have to use a bit of maths.
SC_DStwo_Master
Scratcher
100+ posts

How do you do raycasting?

jokebookservice1 wrote:

lugga wrote:

jokebookservice1 wrote:

SC_DStwo_Master wrote:

jokebookservice1 wrote:

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
how would you implement such a dot? (without using maths formulae)
You make a sprite, that literally moves one step and makes a variable go up by 1. When it literally hits a wall sprite, you can record the distance in a list
I think he was refering to the virtual dot.
Then you have to use a bit of maths.
nah, I was referring to the normal dot, but I was more thinking outside of scratch
what sort of maths do you need to know to move onto raytracing?
jokebookservice1
Scratcher
1000+ posts

How do you do raycasting?

SC_DStwo_Master wrote:

jokebookservice1 wrote:

lugga wrote:

jokebookservice1 wrote:

SC_DStwo_Master wrote:

jokebookservice1 wrote:

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
how would you implement such a dot? (without using maths formulae)
You make a sprite, that literally moves one step and makes a variable go up by 1. When it literally hits a wall sprite, you can record the distance in a list
I think he was refering to the virtual dot.
Then you have to use a bit of maths.
nah, I was referring to the normal dot, but I was more thinking outside of scratch
what sort of maths do you need to know to move onto raytracing?
Trigonometry I think.
Jonathan50
Scratcher
1000+ posts

How do you do raycasting?

There are two tutorials on the Wiki article.

Not yet a Knight of the Mu Calculus.
CodeLegend
Scratcher
500+ posts

How do you do raycasting?

SC_DStwo_Master wrote:

jokebookservice1 wrote:

lugga wrote:

jokebookservice1 wrote:

SC_DStwo_Master wrote:

jokebookservice1 wrote:

_Explosive_Games_ wrote:

Oh Ohhhhhhhhhhhhh
But for extra speed you want to make it a “virtual” dot, so you bounce it with maths formulas. But for your first raycaster, you might want to use an actual dot
how would you implement such a dot? (without using maths formulae)
You make a sprite, that literally moves one step and makes a variable go up by 1. When it literally hits a wall sprite, you can record the distance in a list
I think he was refering to the virtual dot.
Then you have to use a bit of maths.
nah, I was referring to the normal dot, but I was more thinking outside of scratch
what sort of maths do you need to know to move onto raytracing?
Raycasting and raytracing are two completely different things. Raycasting can be done either with sprites or trig. Raytracing is how movies are made, and it's never at a playable framerate.

Powered by DjangoBB