How do you raycast without walls?

Started by
5 comments, last by Royale00 22 years, 9 months ago
Hi all I just wanted to know if anyone could provide source code or point me in the direction I want to head. I want to create a reaycasting engine without the walls so I can texture and use the floor and ceiling to make a racing game like F-Zero.
Advertisement
Just learn some OpenGL.

Thing is, F-Zero wasn''t raycasted. The "3-D floor" in those games on SNES were done by cheating. They used the Mode 7 on the SNES to rotate the image first and then would add the perspective with a simple function. Someone else explained that on the forums a week ago, I''ll say it again for you tho:

If the image was, after rotating, something like

a
bcd
efghi
jkl
m

then after the perspective it would be

bd
efhi
jl
m

Kinda... you get the idea. It was cheap. On these modern systems, we can do better.

(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
If I could I would of use DirectX or OpenGl but I am developing this racing game for the game boy advanced so I need some algorithm that changes my 2d maps into a F-Zero looking map.
Doesn''t the GBA have mode 7 like the SNES did? I thought
it had that.

You said the code I posted in the Super Mario Kart thread
doesn''t work but you don''t say what is not working as it
works fine here.



The Game Boy Advanced doesn''t have a mode 7 only has 0 to 5 but it is capable to imitate mode 7 thanks to its 32 bit Arm processor and internal,external,background,sprite,palette,and video ram etc... SO a modified raycasting engine or something should be able to work its just I dont know how to implement it. The code you posted earlier doesn''t display anything or it just draws the map diagonally in one direction.
That was a snippet so it could have some bugs in it. I based
it around the first Wacky Wheels pass that I lifted straight
from the old Watcom C code I had.

Email your test code to me if you want. I just *know* that
code works.

As mentioned the final Wacky Wheels code used 386 assembler and fixed point math but that optimised algorithm used the C version as it''s base.

By the way does the GBA have an FPU?


I dont think it has a FPU but 2 of the bitmap modes 4 and 5 allow you to implement double buffering but if you know what you are doing you can create interrupts to page flip in any mode the only thing is I dont know if that will work on real hardware.

This topic is closed to new replies.

Advertisement