Skip to main content
GameDev.net gamedev.net
🔒 Locked

New terrain source code

Started by steg May 22, 2003 at 12:18 PM 8 replies 750+ views
Original Post
steg
steg
Hi all, I''ve uploaded my terrain source code, fixed a few bugs and made collision a little better. If any of you have anytime to check out then please do. Link is under downloads on my website in signature below. Kind regards, Steve As I get older, my mind becomes more cluttered. [3d Game development]
If it isn't working, take a bath, have a think and try again...
UltimaX
UltimaX
I see the sky box (and some green thing floating?) but no terrain?

1.6 P4
512 DDR Ram
128 DDR Radeon 9500 Pro

Any ideas?

-UltimaX-

"You wished for a white christmas... Now go shovel your wishes!"
Subotron
Subotron
I downloaded the demo (first things first ) but I don't see any terrain, just skybox... I think controls work because my position changes if the stats are right, but I cannot make terrain appear :S

Pentium III 650 Mhz
TNT 2 M64 (32 mb)
Windows XP

[edited by - Jim Adams on May 24, 2003 2:29:19 AM]
steg
steg
AP, you offering to write some tuts ? ;-)

Did any of you guys download the source and build from that ?

Regards,
Steve


As I get older, my mind becomes more cluttered.

[3d Game development]
If it isn't working, take a bath, have a think and try again...
blueknight
blueknight
OK, I looked at it. It ran OK and I saw the terrain and skybox. You have some bugs in your code, however. It seems that you have a function float CTerrain::GetHeight(int i, int j); and if you move the camera away from the terrain an a negative index is passed into that function which causes an invalid index into your m_pData[] array. Anyway, the result (as you probably have already surmised) is a crash.
I would strongly recommend a more thorough testing of your code before you release next time. You cannot possibly test every possible scenerio in any complex piece of software, but in this case a few minutes of testing would have found this problem. Also you really need to protect yourself from invalid array indexing.
Anyway, other then that it seems like a good start.

Beer Hunter
Beer Hunter
quote:
Original post by steg
Link is under downloads on my website in signature below.

[3d Game development]
That page has no links on it anywhere, which makes it slightly difficult to find the downloads section.

EDIT: Actually, I found it pretty quickly once I started guessing filenames. Maybe this'll save some other people the trouble.

[edited by - Beer Hunter on May 24, 2003 2:52:24 AM]
reaction
reaction
It worked OK once I had done this...

quote:

// Does this adaptor mode support a refresh rate of 75 MHz?
//if( d3ddm.RefreshRate != 75 )
// continue;



... at about 50 fps.

Athlon XP 1800+
GF2

R

ToDoList | Wayout | ManillaPush
optionalreaction.net
"I will, even if I try, always be second; and because of that, I know nothing is a lesson." - me

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.