Raycasting without .dll's

Started by MisterN, August 02, 2011, 03:32:59 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BlackCurtain

Quote from: DoctorN on August 15, 2011, 02:09:13 AM
no... mode7 wasnt even invented by time wolfenstein came out in 1992 most likely
Mode7 is a Super Nintendo invention so I believe it was.

MisterN

And as I recall wolfenstein 3d nor doom on the snes used mode 7 at all (doom used the superfx chip, wolfenstein did not). But this keeps going off topic. I am pretty sure raycasting can be done for it was created without plugins, therefore someone must know how to have a raycasting code. If you cannot process what raycasting is. Raycasting is fake 3D believe it or not. The level is entirely 2D. And some code makes it so that each block (wall) represents a cube with textures. I am not entirely sure how its done, I just know it is.
werg

BlackCurtain

I believe it's called "sprite scaling" when you scale the sprites in a certain way to give them a 3d perspective. Galaxy Force 2 used this method, it looked fully 3d but was actually 2d.

Fuseki

#18
You could probably use a combination of mode7 and size scaling and angling of sprites to do raycasting. Someone did a Wolfenstein port for DIV1 using this method, back when it was popular, but unfortunately, the code and game has been lost to the sands of time. The basic process is to draw a map in 2D and have "rays" shoot out from your player object. Anything that falls in front of that object, depending on the distance and angle within the rays, would be drawn in a specific size. If I remember the Game Maker raycasting engine correctly, solid sprites that were already "textured" were used and drawn in this manner.


Come to think of it, I've got the old DIV1 cart racing game source code if that would be helpful, although it doesn't use raycasting, but does use size scaling depending on distance. I have all of the example games that came with that package (40mb download) and just uploaded them to my DC Fenix page at http://atari.vg-network.com. There's also the source code and files for Nazca Dreams, which used a lot of mode7 tricks, on the page as well...
Fuseki Games
Classic- style games for the Dreamcast
http://www.fusekigames.com
----------------
Dreamcast Fenix Resource Page
http://atari.vg-network.com

MisterN

werg

Fuseki

Quote from: DoctorN on January 18, 2012, 11:49:29 PM
site doesnt work anymore


You're right. It's back up now. I moved a redirect index to the wrong directory by mistake, months ago...
Fuseki Games
Classic- style games for the Dreamcast
http://www.fusekigames.com
----------------
Dreamcast Fenix Resource Page
http://atari.vg-network.com

SplinterGU

m7 isn't for create wolfenstein clones...

I was thinking lot of time about m7 and wall and other objetcts, but it isn't mode7... then I forget all idea of add this features to mode7...

http://en.wikipedia.org/wiki/Mode_7

for 3d, we need other thing.
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

handsource-dyko

M7 is for super mario kart style games isn't it? A lot of SNES games made creative use of it, like super probotector (a.k.a. contra 3) and turtles in time's neon night riders stage.

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

theosk

Yeah, it can be done.

I was toying some time ago and made this:
http://www.youtube.com/watch?v=TGRvZsEVHzA

My implementation is quite lame, but there's a reason for that.

This was made in fenix forever ago. I followed lodev's tutorial and adapted it to what fenix could do with a reasonable frame rate (about 60fps at 640x400). Walls render fast enough, but I couldn't make the floor render as I wanted. Since drawing functions are slow as hell and accessing the image buffer didn't make a difference, what I did was to create one process per vertical line (that's 640 in the example). Then, every texture was split in various 1xn textures (having 64x64px textures, that's 64 1x64px maps per texture). Then every process has a size depending on the distance to the camera based on the line cast.

I got bored before I implemented the sprites, but using regions and fenix/bennu's size variable should make it easy.

Sorry for my horrible explanation, lodev's tutorial explains it all and does it great.

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

l1nk3rn3l

 :o AMAZING


please share!!! 


thx

handsource-dyko

pretty nice. reminds me of wolfenstein 3d days.

theosk

Hi, I attached my code to this post.

There's a version without textures too, which boosts the FPS counter to infinity. I'm sorry for this horrible piece of code, It was an almost direct conversion of the tutorials and I was learning about raycasting on the go. I lost interest once I got it working so I don't think I'll keep working on it. If you find this useful at all, please feel free to do whatever you wish with this :)

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2