Dark Bit Factory & Gravity
GENERAL => Projects => Topic started by: Pixel_Outlaw on September 27, 2010
-
Hello again!
I wrote my first ray casting engine yesterday. It is very slow and I plan to do a heavy overhaul on it.
Use the arrow keys to move around Fisheyecubeland. I actually like the fish eye distortion so I will probably not correct this.
The .exe is about 60 kb - Windows only right now.
-
It seems to be runing plenty fast on my computer. It could use some collision detection, but you probably already have that on your to-do. It has some serious fish eye when close to the outer walls, not sure if I like it or not, but it is different.
I just tried to compile it without having the console window and then upxed it. It came down to 48kb. I also tried to compile with console window and upx, and it came to the same. So I might be using another version of upx, or you could be using some other kind of exe compression software.
-
Nice thing :)
I didn't see any weird effect at first glance, but after some time I saw it :D ( I always had problems with perspective )
After, on my computer, is not running slowly ... maybe you have a FPS counter, and that you see that you are slow for this number of materials, but otherwise ... it's not slow.
I hope you will continue on this, and send us how it is going :)
-
I might continue to toy around with this. I like that I can set the viewing angle to something absurd and it will render it with curves and such which is hard to model with standard polygons.
I guess it is not really slow for a computer program but my coding is pretty crude and it can defiantly be sped up. It is probably slow by ray casting engine standards. It is drawing 480 vertical scaled lines after all.
I may load a texture and create 64 -1 pixel slices of it and replace the lines with scaled 1 pixel wide textures.
-
It's colourful! Are you using the 'tiny step so I don't miss any walls' method, or are you correctly skipping across the grid cells?
http://www.permadi.com/tutorial/raycast/rayc7.html (http://www.permadi.com/tutorial/raycast/rayc7.html) - excellent tutorial.
It's not fast on my netbook (1.6GHz Atom).
Jim
-
I'm looping through all the walls and checking which sides need to be checked for collision. REALLY bad idea. I plan to depart from the traditional blocks however. I'm going to scrap my current "block" styled walls in favor of single lines that can be rendered from any angle. I'm going to break away from the grid soon. This was mostly to see if I have the concept right. 480 rays doing up to 2 exact collision checks per wall "cube" is a very very bad thing. This I realize. :stirrer: I should have textures working soon. There is much to be done! I want to add some of those rotating scaled sprites too that always face the player. Mayhaps some pretty autumn trees?
-
Looking good!
:clap: