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 / going from T.ed to DB Pro

Author
Message
Grumpy
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location:
Posted: 8th Jan 2006 23:00
New to Dark Basic Pro (one week and counting) so please bear with me.

I exported a 2x2 multi texture terrain from T.ed 3.2 and it saved it as a colormap and the .x file (Super Texture). I was able to load it into DB Pro with the code listed below but it's jumpy and only getting 16 fps. Any ideas as to why? Are there too many polys and it needs to be optimized?

Also, I tried exporting it as a .x file and converted the layers to child meshes. How do I load in the separate images and map them to the terrain?

Man is the only animal that blushes -- or needs to.
-- Mark Twain

Attachments

Login to view attachments
MMORPG programs
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 9th Jan 2006 00:16
post the code in brackets
[ code ]
[ /code ]
remove the spaces and


[img]http://www.savefile.com/files/4182721 [/img]
Grumpy
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location:
Posted: 9th Jan 2006 00:31
my bad...

[ code ]
hide mouse
set ambient light 100
TEXT 0,0,"Loading......."
sync

for b=1 to 2
for a=1 to 2

inc c
inc d

mo$="map3\test("+str$(a)+","+str$(b)+").x"
mt$="map3\test("+str$(a)+","+str$(b)+").bmp"

load object mo$, c
load image mt$, d

position object c, (a-1) * 500.000, 0, (b-1) * 500.000
texture object c, d

next a
next b

sync off

color backdrop rgb(0,120,255)

fog on
fog color rgb(255,255,255)
fog distance 1500

position camera 338,48,380
CX#=25
CY#=321
CZ#=0

do

print screen fps()

if upkey()=1 then move camera 5
if downkey()=1 then move camera -5

cx#=wrapvalue(cx#+mousemovey())
cy#=wrapvalue(cy#+mousemovex())
cz#=wrapvalue(cz#+mousemovez())
if cx#>90 and cx#<180 then cx#=90
if cx#<270 and cx#=>180 then cx#=270
rotate camera cx#,cy#,cz#

sync

loop
[ /code ]

Man is the only animal that blushes -- or needs to.
-- Mark Twain
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 9th Jan 2006 00:57
You need to remove the spaces when you type the CODE tags, alternatively, you can highlight the entire bit of code and press the 'Code' button located just above the textbox you type your message into.


"Computers are useless, they can only give you answers."
Grumpy
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location:
Posted: 9th Jan 2006 02:29
Ladies and gentlemen, I'd like to introduce the newest of the newest...every newbies newbie...ME! Sheesh, if I can't even get the post right how am I ever going to move from java web development to 3d game development! Ok, stupidity aside, can anyone help me?



Man is the only animal that blushes -- or needs to.
-- Mark Twain
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Jan 2006 11:02
Well one thing that pokes me in the eye about that code is how your SYNC'ing every loop yet you've SYNC OFF'd - change that for SYNC ON and see if things improve.

Using big .X terrains is a killer for performance as DBPro can't hide detail to well when it's all as 1 big object. Using smaller chunks of terrain, like a grid of pieces would be better for performance as DB would only have to draw the pieces in view. Not sure what options T.Ed has, but personally I'd avoid .X terrain unless you really have to, Advanced terrain is a bit more processor friendly.


Van-B

Put away, those fiery biscuits!
Grumpy
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location:
Posted: 9th Jan 2006 12:42
I changed the sync, same thing. I also changed the colormap from a .bmp to a .jpg and went from 3 meg vs. 92-104k. No change.

Very high level question, if you were to make a terrain and use it in dbpro and wanted to add things like trees, buildings, etc, what route would one take?




Man is the only animal that blushes -- or needs to.
-- Mark Twain
Grumpy
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location:
Posted: 9th Jan 2006 13:23
I just figured it out, I was using 'print screen fps()' vs. 'text 0, 0, str$(screen fps())'. Smooth as silk at 121 fps...



Man is the only animal that blushes -- or needs to.
-- Mark Twain

Login to post a reply

Server time is: 2024-09-24 13:22:08
Your offset time is: 2024-09-24 13:22:08