Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Raycasting problems

This thread is locked; no one can reply to it. rss feed Print
Raycasting problems
23yrold3yrold
Member #1,134
March 2001
avatar

Just populate your dungeon with giant cube slimes, Z ;D

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

aybabtu
Member #2,891
November 2002

I'm gonna work on drawing objects soon. I can't get the engine to run much faster, so I'm gonna move on. Should be pretty easy. Just use the distances in the view[] variable, and compare it's distance...I think.

Thomas Harte
Member #33
April 2000
avatar

Yeah. And in my portal engine you only need consider objects which overlap with sectors that were actually visited, so you usually end up considering less objects than a ray caster!

aybabtu
Member #2,891
November 2002

Thomas Harte: Can you attach a binary of your portal engine? I can't get it to compile with my version of allegro (3.11...bleh!) and DJGPP...

Thomas Harte
Member #33
April 2000
avatar

Oh, yeah, I'm going to get on top of that as soon as I get a working DJGPP install. Or are you happy with a Windows binary?

aybabtu
Member #2,891
November 2002

A windows binary is fine...but I'd prefer a DOS one, because sometimes I can't get the windows ones to work even on 98SE!

Karel
Member #3,624
June 2003

Aren't you taking my quote a bit out of context aybabtu? 8-)

23yrold3yrold
Member #1,134
March 2001
avatar

Now, what framerate did you get with mine? ;)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Karel
Member #3,624
June 2003

It says ~480 fps :o.

This is a really cool engine, if you'd improve it maybe you could make a Build-like engine, that would be awesome. Build > *.

Steve Terry
Member #1,989
March 2002
avatar

23: did you ever fix your rendering error? It really looks great though, and yeah I get excellent fps with your demo :) I hope you can work out the kinks, but another great idea is to have the player move slowly if up against the wall proportional to his angle. For instance instead of stopping once you hit a wall at 10 degrees offcenter then move slowly in that direction instead of a dead stop. Of course if the player hits perpendicular to a wall then his velocity will by 0.

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

23yrold3yrold
Member #1,134
March 2001
avatar

I already fixed the hit-wall-and-stop-dead thing in my other thread (which anyone is welcome to bump ;)). I detailed the finalest of final texture errors there, but I can't lick it. I put it away for now; I'm finishing my Tetris Attack clone right now, then I'm going back to The Mighty Stoopid. If someone wants to help me, I won't turn them down ;)

See fourth last post here for my latest progress. And thanks for the compliments :)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

aybabtu
Member #2,891
November 2002

I got MinGW up and running, and today I'm getting Allegro going...so I won't be the only person that can play my binaries!
Karel: Well...um...heheheh...no.

Thomas Harte
Member #33
April 2000
avatar

Attached is a compiled and slightly fixed version of my 'not really raycasting' engine, along with source, alleg40.dll and everything else you need to use it. It runs at 800x600, keeping up with the frame rate of 60fps on my little celeron 533Mhz.

I'm aware that in a few cases (most notably on the very right edge of walls) slivers do not appear. I'm sure I could fix that. Also I'm aware that I don't really need cos and tan tables across an entire circle because cos(a) = -cos(-a) and tan(a+ half circle) = tan(a). That wouldn't take terribly long to fix.

aybabtu
Member #2,891
November 2002

Cool, Thomas! I only get about 10-16 fps depending on how close I am to a wall (the closer, the slower).

Thomas Harte
Member #33
April 2000
avatar

How does 10-16fps compare with the other alternatives when running at 800x600? In any case, the good news is that I've fixed all rendering errors this afternoon and sped things up about 10% by replacing every instance of 'fmul' with 'fixmul'.

EDIT: to put things in perspective, 800x600 (8bit) is 468.75kb. 320x200 (15/16bit) is just 125kb. And, comparitively, you get half the byte computations for free.

aybabtu
Member #2,891
November 2002

10-16 fps is pretty good because I get 11-18 on my 320x200 raycaster!

Zaphos
Member #1,468
August 2001

23's seems to only get 45 fps when I make it 800x600, and has a minor graphical glitch in the background. Then again, he is drawing some pretty sky gradient or something in the top, so maybe that's just really really slow ... but I think we can probably say that yours is faster, TH. Especially because 60 is the refresh rate of my monitor ;D
Those occassionally invisible slices of wall are kinda annoying though. Fixing that would be cool.

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

23's ... has a minor graphical glitch in the background.

Yes, and I hate it with all my being. It doesn't show up in nice low resolutions though ;)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Carrus85
Member #2,633
August 2002
avatar

I hate to be satins advocate, but shouldn't you guys start up another thread? This one is getting REAL crowded, it is kinda nice not having to sift through all of the pages.

23yrold3yrold
Member #1,134
March 2001
avatar

Whenever Matthew closes it, we'll all pile into Aybabtu's Depot thread ;)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

gnolam
Member #2,030
March 2002
avatar

Use the lightbulb, Luke :)

(or change My Profile->Forums->General->Page Splits to a setting that you like)

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

aybabtu
Member #2,891
November 2002

Quote:

I hate to be satins advocate, but shouldn't you guys start up another thread? This one is getting REAL crowded, it is kinda nice not having to sift through all of the pages.

I have my pages set to 25ppp, and I like it. I don't think it's crowded...pages are such a nice feature for dial up users who's modems are crapping out and only connect them at 21.6 kbps...bleh.

Quote:

Whenever Matthew closes it, we'll all pile into Aybabtu's Depot thread

Well, you're all very welcome! How long is the longest thread ever? >225 posts, I think.



Go to: