Raycasting Hybrid Demo

Show us your completed creations made in Construct 2

Post » Mon Feb 25, 2013 6:10 pm

Here's a quick demo I slapped together using a different technique for ray casting. You still have rays, but you don't need to incrementally cast them for distance calculation in order for it to work. The plus side is you can have a high ray count without the heavy cpu processing. This is extremely beneficial in C2.

In the beginning of the video you'll see the level "shape" itself. What I've implemented is a real-time adaptive ray generation technique that will scale back the amount of rays inversely proportional to the cpu load. When the fps is lower (by root mean square measurement) the rays cast will slightly lower so you may have more overhead for anything else such as the enemy pathfinding in the video.

I've also implemented transparent surfaces for glass-like effects and an overhead map (in case it gets a bit confusing to navigate).

Raycasting Demo on YouTube



Paul White

Fireskies Studios
B
17
S
5
G
4
Posts: 24
Reputation: 4,039

Post » Mon Feb 25, 2013 6:44 pm

Do you have a demo we can try so we can see how well it performs? I'm also interested in more details about your technique. Are there any papers or sites you used as a reference?
B
79
S
24
G
52
Posts: 4,725
Reputation: 39,713

Post » Mon Feb 25, 2013 7:22 pm


I like the smooth falloff, you made a very unique "look".

Sort of odd looking though, for a "retro" look you would want to use Dithering rather than an alpha with a ramp falloff.

Sort of like making a painting of "The old West" from USA pop culture, and off to the side painting in a Porche 911, and Starbucks coffee.

The 2 technologies never really existed at the same time, if you know what I mean.

Give dithering a try, it will probably take less GPU power to render it too, if you have the Alpha blending, or alpha clip available to you.


I must say that I do like the look you already have. Very well done, and very innovative.

On a side note, I like your snake sprite too.
B
28
S
8
G
4
Posts: 767
Reputation: 5,940

Post » Mon Feb 25, 2013 9:09 pm

Alright, I just made this yesterday so as a disclaimer it's in no way even close to being polished. I've yet to implement a bunch of things I want to refine, but here's the basic premise of what I made. I've know about raycasting for a long time but I've never built anything..the only thing I had to reference was the fisheye-distortion compensation right here.

I'm going to rewrite some of the code because I can refine the processing but I've got to test away! Yeah I should use dithering instead of alpha transparency, it would sell the 8-bit look a bit (I'm trying to get away from the 8-bit look on this though!!)

WASD and arrow keys strafe/rotate/move, q toggles double resolution, e toggles transparency multilayer processing and spacebar toggles the overhead map.

Paul's Raycasting Demo (.capx)

Enjoy!

Paul White

Fireskies Studios

P.S. Brent Hamel, teammate, all around nice guy did the snake sprite for one of my games 'Dead Battle' (to be released hopefully sooner than later!) This pseudo 3d test was/is to be the Dead Battle 3D version!
B
17
S
5
G
4
Posts: 24
Reputation: 4,039

Post » Mon Feb 25, 2013 9:19 pm

Before I made it, I looked at what Ashley has implemented for built-in functionality. The 'Is Overlapping Object' is absolutely vital to this working, as is being able to calculate the anglediff.
B
17
S
5
G
4
Posts: 24
Reputation: 4,039

Post » Wed Feb 17, 2016 4:40 pm

I really don't want to necro the thread, but it appears that the OP was more than a year ago last time on this website and I'm not sure if he would appear again. In any case, I PM'd him.

The question, does anyone here still have a project that poisonpage shared with us? The link gives a 404 back and if anyone had the sample, I'd be very grateful!
B
8
Posts: 2
Reputation: 321

Post » Fri Feb 19, 2016 7:10 pm

eineste wrote:I really don't want to necro the thread, but it appears that the OP was more than a year ago last time on this website and I'm not sure if he would appear again. In any case, I PM'd him.

The question, does anyone here still have a project that poisonpage shared with us? The link gives a 404 back and if anyone had the sample, I'd be very grateful!


+1 This is so cool. I do appreciate the link with the trig calculations and instructions though :) - great resource!
B
29
S
17
G
14
Posts: 244
Reputation: 9,786


Return to Completed Creations

Who is online

Users browsing this forum: mystazsea and 3 guests