Miscellaneous > Programming & Networking

Question for C/C++ gurus..

(1/1)

eXor:
I'm proficient at Pascal but new to C / C++  so I thought I'd make a simple terrain engine to teach myself.  I downloaded this tutorial ( http://www.gametutorials.com/download/OpenGL/HeightMap_OGL.zip ) and it looks great.  However it keeps crashing consistently if I go left past a certain point or backwards past a certain point.  I'm guessing this is caused by the value of a "positive only" variable getting decremented to a point where it goes below zero.  I peeked at the source code but almost all the variables are floating point type.  I'll pore over the code tomorrow in detail when I'm less tired  ( right now my head is swimming just looking at it hehe )

Any pointers ( pardon the pun ) would be appreciated.

choasforages:
ok, i don't really know, but im going to barf some stuff in your post, sorry

alright people, this is a good post, it has to do with programing, and not breaching computer security, or h4x0ring MSN

and know that i though of it, go thruogh the totorial, and change all the

float

to

a larger float var, i forget but its somthing like
double float or somthing, look it up

it should slow the exucution of the code up, and should let you go farther

LorKorub:
Try using a "long" float.  What might be happening is that you are getting too many places past the decimal point of normal float value when your function, or whatever you have, is executing.  Using "Long" will counter that problem.

eXor:
thanks for the tip, i'll have a go


btw i feel so dumb  posted the wrong link  it was http://www.gametutorials.com/download/OpenGL/HeightMap2_OGL.zip

Kintaro:
Try having a beer  :D

Navigation

[0] Message Index

Go to full version