• Welcome to Dark Bit Factory & Gravity.
 

Yabasic Rocks !!!

Started by rain_storm, January 09, 2007

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Jim

Pretty amazing.  Good effort at interpreting the web site and putting it into code.

Jim
Challenge Trophies Won:

lilw4t3rdr0p

Agrred. I like the rain and lighting. The map was handy as well! ;)

rain_storm

I'm proud of this one its my baby I still dont know what to do next. Maybe I will hit up one of my other hobbies til something comes along

Challenge Trophies Won:

lilw4t3rdr0p

ENTER in the INTRO-INFERNO compo!!!!!!! You still have plenty of time!

:goodpost: karma up!

rain_storm

Okay I have run some optimisations on this raycaster and I have removed the bugs and bug-fixes. I am confident that I can get 640 rays working at decent speed, at the moment the frame rate is 170+ when doing nothing 150+ when rotating but only a measly 50+ when walking.
I am trying to avoid casting rays if at all possible for example when the camera is rotating I have scrolled the distance values through the array and only cast rays that will hit new areas of the map. This works perfectly. I am trying to cheat when moving too by simply sliding the rays along the walls and only casting those rays that are near an edge or beyond the visible range. But this has proven to be a royal pain. I know it can be done. But I am constantly running into the same brick wall.
Things I have noted though are walls need to be altered according to the angle of the ray multiplied by direction of travel and not simply the direction the camera is moving at. Sometimes the alterations need to be applied as the cosine other walls require it to be the sine. The first file below does not include the movement cheat the other one does, the problem is in the move_rays() subroutine. I will trade karma for advise. Any suggestions will be appreciated.

Challenge Trophies Won:

Clanky

RayCaster Optimised is really good!
Nice effort.
He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

rain_storm

The movement routine is a disaster, that sliding the rays along the wall cant be done directly I tried casting directly to the wall bypassing the firing the ray stage that works alright but finding the edges of the wall is killing the speed. You need to know exactly where the edge is and you need to leave a tolerence to either side of it. I have pulled it off but the camera moves at a snails pace and still miss the odd edge I need a better approach. the best thing is to play it safe for now and leave this one on the backburner til I can get my head around it.

Challenge Trophies Won: