Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Infinte Landscape WIP (version 2)

Author
Message
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 1st Oct 2003 16:07
Enclosed below is a new version of my landscape program i am working on.
This time, the landscape scrolls under the camera as the landscape moves about in real co-ordinates.
This way i can have objects placed anywhere from the origin to infinty
Hopefully this will help create the illusion that the landscape isnt mearly repeating.

However, in converting to this new techique my camera no longer follows the landscape nicely.

Can anyone help?



-----------------

"tileset.bmp" is a 8*8 tile set of grass textures which are assigned by height. (dont worry about this for now)

"lake1.bmp" is just a water texture.

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 2nd Oct 2003 21:55
Please?

My end gool is to have an open source, infinte landscape engine that would be usefull for many different games. I think i got the basic techique worked out now.
The source code is above, I can upload the *.bmp files too if you want them.

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 2nd Oct 2003 22:13
get ground height is relative to matrix, not to 0,0,0

Also, to be more precise, remember grond height is a float, not an integer



If your mansion house needs haunting, just call Rentaghost!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 2nd Oct 2003 22:37
Also another bug



If your mansion house needs haunting, just call Rentaghost!
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 3rd Oct 2003 22:54
relative? oh..that makes sense I guese.
Thanks


That other bug dosnt exist, it was just pasted wrong.
(ive noticed sometimes the code window cuts of bits :?)

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 4th Oct 2003 17:31
Yes, that works much better, enclosed below is the latest code.
(with accelerating movement and turning, and gravity)

I noticed theres a slight jerkyness when going up hill, any idea whats causing this?

I first thought it was my "randomize matrix 1,25" command that caused small distortions in the tarrian.
But i REMed it out and its still jerky.

Is it to do with my camera methods?
Or is it a sync thingy?

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 5th Oct 2003 02:06
Try code below. I had to change it a fair bit to make it smooth. Basically you have to use floats, not integers.

If your mansion house needs haunting, just call Rentaghost!
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 5th Oct 2003 02:21
ah hu! Thanks, yes that works brillently

Silky smooth.

After a bit of testing I found i dont need the Matrix positions (X,NewX) as floats.
The formular i use to work out NewX (and thus X), only produces intergers

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard

Login to post a reply

Server time is: 2024-09-21 03:41:22
Your offset time is: 2024-09-21 03:41:22