121 reputation
4
bio website danielcarvalho.com
location South Africa
age 30
visits member for 2 years, 1 month
seen Dec 18 '13 at 20:51
I am a designer and developer who is smitten with the gaming industry.

Jul
12
awarded  Commentator
Jul
12
comment What mathematics would I need to know in order to build a 2.5D raycasting engine
Thanks for your time and effort though. It is appreciated.
Jul
12
comment What mathematics would I need to know in order to build a 2.5D raycasting engine
For the research I did do into raycasting engines, I took away what you're saying here, which is very comforting, because it's stuff I understand. But, as you perfectly noted, it gets more complicated when doing projections, which is about the point in my research I donned a "huh?" face.
Jul
12
comment What mathematics would I need to know in order to build a 2.5D raycasting engine
@Tetrad I have done some degree of research in raycasting engines, so I know it seems like I'm shooting this question out of the dark, but I have looked at it some. The reason I am asking this question is because I started losing myself a bit when the stuff I was reading got a bit... too Mathy? However, the parts that talked about shooting rays and scaling slices just as Tapio mentioned, seemed to make perfect and simple sense.
Jul
12
asked What mathematics would I need to know in order to build a 2.5D raycasting engine
Mar
10
awarded  Editor
Mar
10
comment Parallax Scrolling - Layers not preserving their relational positions
Cool, I've updated the question with a rough draft of my setup. I must be obviously missing something.
Mar
10
revised Parallax Scrolling - Layers not preserving their relational positions
added 1551 characters in body
Mar
10
comment Parallax Scrolling - Layers not preserving their relational positions
That doesn't seem to work.
Mar
9
comment Parallax Scrolling - Layers not preserving their relational positions
This doesn't really work though, because a layer can be offset from the origin point of the screen by, for example x: 80, and the camera can be at the center of an 800x600 screen, x: 400. So simply setting the layer.x to the camera.x will result in the layer's original x position being ignored and just set to the camera.x, which is not really what you want either.
Mar
9
comment Parallax Scrolling - Layers not preserving their relational positions
Oh, that basically performs the same function has my "z".
Mar
9
comment Parallax Scrolling - Layers not preserving their relational positions
If I go layer1.x = cameraTarget.x, and layer1.x is initially 80 and the cameraTarget.x is initially 200, it seems the layers.x is ignored.
Mar
9
comment Parallax Scrolling - Layers not preserving their relational positions
Could you elaborate on layer1Scale, layer2Scale etc..? I get what you're saying about error propergation, I assumed this was the case, but didn't know exactly how to avoid it. I've tried using camera position as you've recommended, and so far it seems to be working great. Required some rewriting, as before I didn't ever physically set a camera position, but now I am. But now objects are jumping to camera.x! I assume that's where layerScale comes to the rescue?
Mar
9
comment Parallax Scrolling - Layers not preserving their relational positions
Isn't this essentially the same thing, since I am always moving everything according to cameraTarget every update? Every update consists of a loop that goes through every layer and updates the position.
Mar
9
awarded  Student
Mar
9
asked Parallax Scrolling - Layers not preserving their relational positions
Mar
9
awarded  Autobiographer