[Raycasting] Draw texturer floor WITHOUT walls?

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply
ProfEich
Newbie
Posts: 3
Joined: Sun Feb 13, 2005 5:28 am

[Raycasting] Draw texturer floor WITHOUT walls?

Post by ProfEich »

Hi!
I'm veeeery new to raycasting. I looked into some tutorials and examples. Everyone draws the texture on the floor dependend on the distance to a wall.

Well. I'm programming a little RPG game (for school) in 100% 16-Bit assembler. Tile-engine and scrolling and things like LZ77 decompressing for images wasn't a real problem.
But I want to have a SecretOfMana-like worldmap. What means: the complete worldmap created only using a textured floor. I have to rotate the floor and "walk" over it. Then I have to set the Y-position of the player. Sometimes near the ground and sometimes high in the sky.

Well. I'm looking for someone who can explain me how to create this or someone who knows a tutorial / example for that or someone who is bored and writes me an example *g*. (Every programming language is ok for that. I have to convert it for the A86 compiler (http://eji.com/a86/ - only because of the school >_<))

If the game is done (by summer - end of schoolproject) I can post it on your site Open-Source.


Thank you for every help. :)
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) I once new one way of ray-casting, now I'm learning a new way..

Well, what you want sound like you need to convert the rays from mainly reading from left to right for texture infomation stored in the DATA to create walls, to scanning up and down for texture info for a floor...

This should remove walls and make a plane, then you could have a secondary scan left and right to create walls or buildings or whatever. normaly its oposite scaning for walls mainly and floors secondary.

Hope this helps some, or helps you figure it out. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

hmmm...well this ones yours Rattra, I don't have a clue....
:P
"But...It was so beutifully done"
ProfEich
Newbie
Posts: 3
Joined: Sun Feb 13, 2005 5:28 am

Post by ProfEich »

Well. Thanks for your help.

But like I said: I'm veeery new to raycasting.

The only thing I know about it, is, how the distance to the next wall is calculated from the player and how a texture comes on that wall.
But I don't know how calculating a texture on the floor works. I tried to understand it, but I can't explain me, how everything correctly works when the player rotates.

Well. That's why I not really understood what you wrote and because I'm from germany and I'm not the best in speaking/reading english.
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) I can probaly break down a really rough method of raycasting to do up a example of what you want... If you'd like... Can't say it will look pretty mind. :wink: , but by what you say, you got a great deal of practice with a regular Raycaster to learn ow it works. then you might can figure out what I said, then make what you need.. :)
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
ProfEich
Newbie
Posts: 3
Joined: Sun Feb 13, 2005 5:28 am

Post by ProfEich »

Well. I guess you're right when you say, that's better when I learn it by myself. An example would be easy and I guess nice, but I wouldn't learn anything with it. When I have to explain that algorith in school I would have a problem :roll:

Maybe I understand it correct, that it might work to calculate the distance to an invisible wall in front of the player. That might work with every 90th degree. But I don't know how that should work with the other degrees.
I'll watch some tutorials about raycasting again and will try some parts. The first I tried to copy was using "Scalars" in C++. And I used floats. That was a bug, I think ^^.

If you're really bored and don't know what to do, it would be nice if you make a LITTLE example code. But thanks for that offer :). I would use it as help to understand the way floorcasting works.

Could you maybe tell me a good raycasting tutorial? QBasic, C++, Assembler or anything else : )
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) Yeah, I'll see what I can do.. need to do a little looking over and get myself back into casting again,.. I'm hoping I can pick the sting back up, cause I do remember where you read the floors..

All I need to do is just break it down to where it does this only,. :) Can't promiss much, but I'll try and get some form of a example.. and while I play around here and there with that.. Joe King, he has a pretty good raycasting tutorial, It on this site, or the Main site to this forum.

Just go to the tutorial section, and its somewhere down in the graphics section.. that sould get you on your feet in Raycasting.. :wink:

PS: Gots some otherthings I'm working on, so breaking down the engine and making a example might fit in atleast a week or two, onless I get some good luck on breaking it down.. :) :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
zcmrrd
Newbie
Posts: 1
Joined: Fri Jun 15, 2007 2:35 am

Raycasting

Post by zcmrrd »

New to the forum.

Heard about your ray casting issue. Rendering wall and flood textures can be a pain. I found a way to do it but it is slow as hell. Mabe with assembler, you could speed up the code I made. I've tried 3D raycasting; its easy to implement, but very slow. Anyway the 3d raycaster I made is on my site [url]www.freewebs.com/3dendeavor[/url].

It projects on the x,y, and z planes and even subdevides into 3d textures, rendering them in a way similar to the map.
Post Reply