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 / Improvements to my infinte landscape

Author
Message
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 28th Aug 2003 19:49
Below is the code for an infinte landscape I made.(DBP only)

"GrassTiles.bmp" is a 2*2 set of 4 grass tiles, each slightly different.

"lake1.bmp" is just a simple lake texture.

Insert your own files/names for these things

You can use the arrow keys up/down to accelerate/decelerate.
And left/right to turn.
You can only controll your speed when your "on the ground". (ie. You can't brake in the air).

Any advice or help on improveing the following would be helpfull:
[B]
* Smoothness.

There is a slight jerkyness to the movement, I think this is caused when the camera wraps around every 200.
Any ideas how I could get rid of it?

* Camera Banking.

I thought this would be simple, I simply want the camera to tilt left or right according to the "rightTspd"/"lightTspd" values.
Any advice? code please?
I tried using Roll/Camera Rotate, but I either got no result, or a camera that never rolled back when the Turn speed went back to Zero.


* FOV

The field of view changes dianamicaly to make your movement look faster.
What do you think of this techique?
Any ideas how I could make it smoother? (is half values possilbe?)
[/B]

Thanks, any help in any area, or any comments on the code would be nice

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Aug 2003 15:23
You don't need to do an UPDATE MATRIX after one of the SHIFT MATRIX commands. If you remove it that should remove the stall that you get.
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 30th Aug 2003 15:53
oh, thanks

"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: 30th Aug 2003 20:46
spoke to soon....err..which update matrix?
The ones at the last 4 if lines seem to be essiental else the matrix dosnt move
---
Anyone else got any other ideas?
Im keeping this project open-source, so feel free to use/abuse the code.

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 30th Aug 2003 21:26
i don't move when i press the up/down keys, i can spin round fine but no forward or backwards movement


IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Aug 2003 13:46
I was wrong with my original post (I think it's DBC that doesn't need the update after a shift), so just for that, I've fixed your code so that (hopefully) it does what you want.

Just search the code for 'IanM' to see what I've changed.
Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 31st Aug 2003 18:13 Edited at: 31st Aug 2003 18:21
Yes, Indeed, that is an improvement.
Thanks a lot
hmz...gota work out why now :p

I mean, surely moving back 100 every 100 units is the same as repositioning at the start?
hmz...
----
ReD_eYe ~ Thats odd, works fine for me (both codes).

You can only move when your on the ground, btw.
Does the new code help?

wait, theres a mistake in it:
"if CH0 then Spd=spd-1"
should be
"if CH=0 then Spd=spd-1"



====
Ok, ill check this out and get back to you's.
Id like to try to get that FOV thing working smoothly if possible, I like the exadurated speed effect it gives, but as you say you get "stuttering".

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Aug 2003 19:31
Yes, it didn't post right ... again. It's actually cut out quite a lot of code. Something like:

Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 3rd Sep 2003 21:49 Edited at: 3rd Sep 2003 21:50
ok, heres the latest version if anyones interested

www.darkflame.co.uk/SkyScraper.zip

It now use's a 8*8 tilemap(included), and has a height based tileing system.
Looks much better, allthough my textures need a lot of work
Ive also made some sanded bit near the lake.
-----

Does anyone know why my fog isnt showing up?
Dosnt fog work on Matrixs?
Im trying to hide the pop up a bit you see.

As usual, any other comments or improvements are welcome.

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 3rd Sep 2003 22:18
you have to set the matrix to react to fog using 'set matrix' i think


Darkflame
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 4th Sep 2003 17:35 Edited at: 4th Sep 2003 18:53
Thanks ill try that

nope...didnt work...in fact, I think the fog is on but its not responding to by colour command (hence I thought it was lighting)

The relivent part of my code (above) is:

Fog on
Fog Color 0,0,256
Fog distance 5000

Surely this should make the matrix turn blue the further away it gets?

"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-20 21:34:04
Your offset time is: 2024-09-20 21:34:04