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.

DarkBASIC Professional Discussion / Requesting sugestions for a flight sim matrix system

Author
Message
Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 9th Oct 2002 21:15
Or something else...
100x100 tiles is not enough, more than that it starts getting slow and it seems to have a limited number of tiles though it gives no error message.
Is multiple matrixes next to one another the only way?
Note: The matrix tiles' height is done from an array with altitude data taken from a greyscale height 3000x1500 bitmap (had problems with 4000x2000).
AlecM
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Concord, MA
Posted: 10th Oct 2002 01:53
wait a little while for the terrain patch. then LoD terrains will become very functional.

In the future please post issues relating directly to DBP in the DBP board.

Goto http://www.shellshockede.com
Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 10th Oct 2002 20:18
I was wondering where my post went
Sorry, thought the other boards were also related to DBpro except the Dark Basic discussion one.
Ok, thanks.
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 11th Oct 2002 00:35
100x100 would not be nearly enough for any flightsim using a static matrix but a dynamic matrix is very easy to write and allows for infinite size. Combine a 30x30 dynamic matrix with aerial photography and you have a very realistic looking terrain that will run at much faster speeds with much smaller tiles than a verbose static system.

In the below example of a Fokke Wolfe 190 flying over Hemel Hempstead, UK (created on a static matrix in DB1) you can clearly see the difference between the effect of aerial photography and standard DB media style textures.

Creating a dynamic matrix is relatively simple - it gets complicated if you want to fill the landscape with resident objects but I don't see this as being too much of an issue in most flight sims. Therefor just hold your tile and height information in an array and run a check every few seconds, on a 30x30 matrix the update matrix command is pretty fast.

www.users.globalnet.co.uk/~thane/snapshot77.jpg

Pneumatic of Xev@EQ

Life outside of MMORG's costs more, rewards less and features no end game content.
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 11th Oct 2002 00:36
Sorry, picture not posted correctly Trying again

[img]www.users.globalnet.co.uk/~thane/snapshot77.jpg[/img]

Pneumatic of Xev@EQ

Life outside of MMORG's costs more, rewards less and features no end game content.
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 11th Oct 2002 00:39
OK I give up - but you can copy/paste that address into your browser and see it still

Pneumatic of Xev@EQ

Life outside of MMORG's costs more, rewards less and features no end game content.
Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 11th Oct 2002 17:30
Thanks for the reply PneumaticDryll.
I've thought about something like that, but dont quite know how to do it yet, what happens every few seconds when it checks?
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 13th Oct 2002 16:16
function updateMatrix(x,z)
remStart
Only do this if camera is nearing the edge of the visible matrix (ie. edgeOfMatrix-playerPosition<viewRange) or just run every few seconds
remEnd

for mX=x to x+30
for mZ=z to z+30

set matrix height 1,mX-x,mZ-z,terrainHeight(mX,mZ)
if mX<30 and mZ<30 then set matrix tile 1,mX-x,mZ-z,terrainTile(mX,mZ)

next mZ
next mX

update 1
position matrix 1,x*tileSize,0,z*tileSize
endfunction

function ground(x,z)
remStart
You will need to re-write get ground function to allow for the matrix offset from 0,0.
remEnd
gnd#=get ground height(1,x-(matrixOffsetX*tileSize),z-(matrixOffsetZ*tileSize)
endfunction gnd#

I hope these pointers help

Pneumatic of Xev@EQ

Life outside of MMORG's costs more, rewards less and features no end game content.
Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 13th Oct 2002 21:56
Hmm, I'll run some tests, bit confused, x and z are coordinates to extract the necessary data from the arrays, but camera coordinates in 3d space are different, real numbers, how do i use those functions in the game loop?
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 15th Oct 2002 01:29
the matrixX(1) and matrixZ(1) variables are holding the tile offset not the camera position. The answers are all there, it's up to you to piece it together I can't write it for you.

Actually I can, I just don't want too *snicker*

Pneumatic of Xev@EQ

Life outside of MMORG's costs more, rewards less and features no end game content.
Madehra
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: Portugal
Posted: 15th Oct 2002 20:21
Ah, i think im starting to understand
Well, i have to work on a first version for the GUI and some other stuff before i move on to the matrix code.
I really apreciate your help, im sure I'll be able to figure it out when i start working on it, if not, I'll have more questions
Thanks!

Login to post a reply

Server time is: 2024-04-25 02:44:26
Your offset time is: 2024-04-25 02:44:26