Page 1 of 1

Raycasting?

PostPosted: Fri Jun 01, 2012 12:36 am
by Hblade
Can someone explain how this is done? I know its been done in GE but with bad performance. Maybe I can just use raycasting as a form of mode-07 without any actual walls to make it lag.

Re: Raycasting?

PostPosted: Fri Jun 01, 2012 10:25 am
by lcl
Have a look at this: viewtopic.php?f=6&t=2850&p=49916&hilit=raycasting+demo#p42022
Feral replaced the canvas with actors. :D

Also the tutorial for raycasting is here: viewtopic.php?f=5&t=5709&p=43571&hilit=raycasting+codes#p39886

You can even make the gefox demo run better with these two things:
1. Change fps from 16 to something higher, like 32 or 64
2. Go to view -> Create Actor -> Script Editor and change the GEWOLF_SCREEN_WIDTH and GEWOLF_SCREEN_HEIGHT to something littler.
For example you can divide the values by two and then head to the screen -> Draw Actor -> Script Editor and go to the end of the script where the setpen() calls are.
Now just change the size from 1 to 2 and multiply the values of putpixel() by 2 and you will have the thing as big as it was, but with bigger pixels so the quality is worse but it runs smoother :D

Re: Raycasting?

PostPosted: Fri Jun 01, 2012 3:12 pm
by Hblade
This is fantastic! Sweetness :) thanks LCL. +1