Pseudo 3d with Raycasting

Show us your completed creations made in Construct 2

Post » Sat May 19, 2012 5:48 pm

The second one looks like it uses a thin texture slice, then creates a lot of sprites to represent each wall from them before scaling them to how close they should appear.

Is that about right @R0j0hound?

Edit: Ah, just saw that each slice sprite also has 64 frames, to make up the different textures per sprite too.Jayjay2012-05-19 17:50:43
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Sat May 19, 2012 5:55 pm

yeah I think Ive about got it figured out just have to do some more tinkering heh
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Sat May 19, 2012 6:01 pm

Yeah, think of it as if you were to draw the wall 1 pixel at a time.
Just instead of drawing a line from left to right, you draw it from top to bottom.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat May 19, 2012 7:01 pm

yeah I figured it out. Bout to edit the first post for the new demo version
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Sat May 19, 2012 7:48 pm

@Jayjay
I split everything up into vertical slices: screen and textures. Then with a bit of math I calculate what texture slice to use for a screen slice.


@aridale
It's good to hear that you're getting 30fps. I only get 5-12fps on my rig. I may be able get a speedup by going back to 90 degree walls on a grid.R0J0hound2012-05-19 19:57:12
B
79
S
24
G
54
Posts: 4,747
Reputation: 40,757

Post » Sat May 19, 2012 8:05 pm

I dont think its so much the angles as it is the number of slices. I think you noticed in your 3rd example that 1 pixel slices are way too much overhead. I use 2 in both my examples and with 4 it runs at 60+ fps the problem is then the wall slices are wide enough you start seeing the jagged sides on angles
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Previous

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 1 guest