freebasic.net Forum Index
FreeBASIC's Official Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in

OMG, OMG ANOTHER RAYCASTING ENGINE!!!
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
 
Post new topic   Reply to topic    freebasic.net Forum Index -> Projects
View previous topic :: View next topic  
Author Message
Lithium

PostPosted: Oct 25, 2005 20:43    Post subject: OMG, OMG ANOTHER RAYCASTING ENGINE!!! Reply with quote

But this time it's in freebasic

get it at my website, with a more detailed description:http://lithium.zext.net
 
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
rdc
Master
PostPosted: Oct 25, 2005 21:19    Post subject: Reply with quote

Very cool.
 
Back to top
View user's profile Send e-mail Visit poster's website
Adigun A. Polack

PostPosted: Oct 25, 2005 21:30    Post subject: What do I think of this new demo? Here is my say: Reply with quote

Lithium, if my memory serves me correctly, it has been *quite* a while since you have been in the QB demoscene field (I believe back in 2001, I guess! ;) ! ). Now that you are creating this raycaster in FB, I can see that you have done a marvelous job on it so far, man, texture placements and all!! ^-^=b !

My, I sure hope you convert it to ASM form within FreeBASIC indeed, because that will then be truly something, won’t it?

Talk to you again, and best to you here!!! :D
 
Back to top
View user's profile Visit poster's website
Nodtveidt
Sr. Member
PostPosted: Oct 25, 2005 22:05    Post subject: Reply with quote

Hey, not bad at all for a double-precision floating-point raycaster that doesn't take advantage of a precalculated cosine table and uses the built-in gfxlib. :) A solid 30fps on my machine and absolutely no intersection problems or "dead lines" I see a lot in other raycasters. Only problem with this one is that the camera is allowed to get too close to the wall...a minor detail though because the rest is perfect. :)

EDIT: btw, when I recompile the source, the colours become all blue and the EXE is 5k smaller. Nifty psychadelic effect man. :D
 
Back to top
View user's profile Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Deleter
Master
PostPosted: Oct 26, 2005 0:55    Post subject: Reply with quote

the only thing is, i set the fps to 300, and when I was looking away from a wall, the actual fps went down to 60. Considering the speed of opengl and then comparing their looks...If you were to make an actual game I would just go with GL. (btw, my gpfx card is a 6600gt and my proc is an a64 3700+)
 
Back to top
View user's profile
Lithium

PostPosted: Oct 26, 2005 14:57    Post subject: Update Reply with quote

I re-wrote the floor/ceeling mapper last night using fixed point inline asm, my frame rate jumped from 8 to like 25... i'm going re-write the part that draws the walls tonight.. probably won't rewrite the actual raycasting part.. just cause i'm sure it would give me a headache :P

Also to add, sprites and doors... I have a vauge idea how to do both of them, but i'll do some research.

But holy $%#@, making the ray jump from line to line was a pain in the ass... i'm suprised i got it working :P
 
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
Lithium

PostPosted: Oct 27, 2005 17:44    Post subject: Posible problem with fb 1.4's gfx library Reply with quote

I have 1.3 at home, when i compile my source in fb 1.4 everything turns blue... but not when I rewrote my rendering in ASM, writing directly to the frame buffer.

Soo... the problem is probably with line, or maybe the whole thing.
 
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
Nodtveidt
Sr. Member
PostPosted: Oct 27, 2005 19:25    Post subject: Reply with quote

When Angelo comes back from his hiatus, ask him about how he did sprites in RTe...that was a pretty solid raycaster, although it did have some minor flaws (the sprite handling was a bit "shaky" but at least it worked...).
 
Back to top
View user's profile Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Nexinarus

PostPosted: Oct 28, 2005 7:02    Post subject: Reply with quote

Ha nice Lithium. I still want to make a DOOM 1 sorta renderer, but im too stupid :p.
 
Back to top
View user's profile Send e-mail Visit poster's website
mopz

PostPosted: Oct 30, 2005 9:48    Post subject: Reply with quote

Oh my god! I love ray casting!

I wrote this one: http://user.tninet.se/cnx955d/tmp/rayeng.rar in pure C. It uses a 640x480x16 screen and renders texture mapped floors and ceilings and uses billboarding for objects. It runs at 12 fps on my 400 Mhz celeron. I'll definitely try to rewrite it in FreeBASIC (just discovered this nice language) :-)
 
Back to top
View user's profile
mopz

PostPosted: Oct 30, 2005 9:53    Post subject: Reply with quote

The instructions in the program above are in swedish, sorry. This is how you control the thingie:

Mouse - rotate view
Arrow up - forward
Arrow down - backward
Arrow left/right - sidestep
Left mouse button - shoot some plasma
'+' - increase field of view
'-' - decrease field of view
 
Back to top
View user's profile
Lithium

PostPosted: Oct 30, 2005 14:06    Post subject: Download updated! Reply with quote

Same url: http://lithium.zext.net/downloads.php -> raycast.zip

There's now doors and sprites, as well the rendering is done in inline ASM (with exception to the actual raycasting, which would have gave me a hernia -- Anyway, there's also a map editor included, instructions are in readme.txt

P.S. -- I hope to make a game out of this (my first 3d game!!!.. or "3d".. whatever :P) ANYWAY, as long as I can get a hold of my crazy artist friend, or find someone else who can do it.....
 
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
Lithium

PostPosted: Oct 30, 2005 14:11    Post subject: Reply with quote

nek!

O M F G!!

this is how I did sprites in mine, for each wall drawn store in a zbuffer the distance to the ray,

then rotate, clip, project the sprites (in that order)

and then draw each sprite one X at a time, if the distance fron the sprite to the POV is less that the zbuffer(X) then draw that vertical line of the sprite, otherwise not.

what I'd like to figure out tho, is how to add depth to my doors -- I think I may have figured it out last night.... but I don't remeber much about last night (beer sucks)

anyway! POOF!
 
Back to top
View user's profile Send e-mail Visit poster's website MSN Messenger
Deleter
Master
PostPosted: Oct 30, 2005 19:13    Post subject: Reply with quote

wow, sweet. with your new engine, in the big room, the fps went only as low as 180 (obviously i set the max higher) and it went all the way up to 600 at times. Nice. If you make this into a game, i will definitely play it.
 
Back to top
View user's profile
rdc
Master
PostPosted: Oct 30, 2005 20:24    Post subject: Reply with quote

Very nice. Makes me want to use this for my rouge-like entry for fb.tk. :)
 
Back to top
View user's profile Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    freebasic.net Forum Index -> Projects All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8, 9  Next
Page 1 of 9

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



sf.net phatcode