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 / My DBPro 'Round 1' Questions

Author
Message
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Dec 2005 00:07
greetz, all. it's been a couple weeks since i received DBP, and i'm loving it. i've read a ton on the forums here; my thanks to all who take the time to share their knowledge and allow newcomers like myself to quickly see some of our ideas come to light. like most, i dove in quickly 'just to see' some of what DBP can do, and yes, i do understand that when i decide to 'get serious', i'll slow the pace and think everything through as best i can.

so, one experiment i've been working with includes the use of terrains and heightmaps. i created a 5120x5120x256 *.PNG heightmap with shades of gray ranging from pure white to solid black. i've defined 3 'terrains' (with textures) that i'm using as 'tiles', positioning them with flags as i traverse through an 'endless' space. also of note is that i've set the ambient light (0) to 5 and added a 2nd light (1) with a 1000 range setting that follows the camera. and, my sync rate is set to 60. this, i hope, sets the stage for the following questions:

1) with the range of grays i've used on the heightmap, i expected more than the 'slightly undulating' terrain displayed. there are no mountains or valleys, just little hills and/or 'bumps in the road'. is there a way i can scale the terrain to provide more definitive highs and lows? or is this not the best way to do 'terrains' with the results i'm looking for? i recently downloaded a 'lake demo' from someone's post (i think it was for Nvidia Functions), and the terrain there was what i was kinda expecting). i have tried Matrices, and they just bog the system down so much but if you all say Matrices are the way to go, i'll do it. BSP's and X's i haven't fiddled with too much yet. i just want to know if i'm on the right path.

2) with the 3 terrains mentioned above (and 100 randomly placed cubes that i placed to simulate buildings, etc), my modest system produced approx 50 FPS. everything ran as expected and i was happy enough with the results. well, today i added some sound to the experiment. a looping ambient sound, a couple looping sounds representative of various speeds i was 'travelling' at, and a 'laser blast' sound for the weapon i've installed. lo and behold, my FPS jumped to 60+! how can this be? it breaks what i thought was a basic rule that the more you add to a loop/program, the lower your FPS will be.

that's plenty for now and my thanks aforehand for any constructive responses

My Modest System:
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb), Drivers and Updates Kept Current
Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 30th Dec 2005 12:12 Edited at: 30th Dec 2005 12:14
1) set terrain scale does the trick
set terrain scale terrnumber,x,y,z

you can increase the y value to give more height and x and z to increase size

the ratio is the floowing:
heightmap size in pixel * x = DBP units

supposing to have a 512x512 pixel heightmap and scale x and z like 100 you get:

512x100=52100 DBP units in x and z

for the y value i found it goes from 0 (rgb 0,0,0=black) to 251 (rgb 255,255,255=white)
so if you put y=1, the highest spot will be 251 DBP units, if you put y=10 the highest possible spot will be 251*10= 2510 DBP units; etc..

2) no idea why
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Dec 2005 20:09
scorp,

i tried the command and got an error on compile. the thing is, Set Terrain Scale is not a command (for me?). it doesn't show itself as bold blue like the rest of the commands do in the editor. but, when i enter the command alone, without parameters, it tells me that i NEED parameters for it, so... is it an undocumented command? or, is the compiler just seeing 'set' something and assuming it needs paramaters, even tho compiler doesn't know what to do with it? or... is the command part of something else that i can add to DBP? (DLL or something) so far all i've added to my DBP is the 5.9 upgrade.

attached (i hope) is the error pop-up i received.

My Modest System:
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb), Drivers and Updates Kept Current

Attachments

Login to view attachments
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 30th Dec 2005 20:22
Finally an intelligent newcommer that doesnt go flaming his head off with tutorials and free downloads. Welcome to TGC.

As for the second reason there really is a lot of things that could affect why this is happening.

For one thing, depending on where your standing and where your looking with the camera, the FPS will change. Eg if you were to go to the edge of the map and stare into the endless blue you'd get a much much higher FPS rate than if you were to stand at the end of the map and look towards the map, as the camera has to draw a lot more things.

Another factor could simply be because your computer may have been experiencing some latency during the time you ran the app the first time, possibly having a program open in the background.

Then theres the fact that FPS's will undoubtedly change almost all the time, and in most games when you're just beginning the "engine" and you haven't added anything to keep the FPS steady other than the sync rate command, the FPS can go up or down by literally hundreds (except it didnt since you set it to 60 )

Aside from all of that you could have mistakenly added an IF statement that somehow cancels out checking something thus reducing lag, or it could have been pure luck.

Id recommend running the program a bunch of times (3 will do but the more the better) and finding the average FPS, you'll soon see it will tend to jump all over the place.


As always the source code would help.


Then again... It could be some strange phenomenon...

Scorpyo
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 30th Dec 2005 21:11 Edited at: 30th Dec 2005 21:17
Here's an example of my working code and yes, set terrain scale etc..is not shown in blue
That error you are reporting is normally due to a wrong path in the "...." sections where you load the relevant bmps or to corrupted bmps
Check if your code goes along these lines:
If you are still in trouble i will upload a simple fully working example

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Dec 2005 21:49
thanks, ruc. as stated, i've poured through a lot of the forums going back to a few weeks before purchasing (it's what helped me decide TO purchase it), and took mental notes on the dynamics here. add to that the fact that i'm 36 yo and, well, i like to play games, yes! "FPS", "RTS", "MMORPGS"... but, not those kinds of games. aka, "EGO" or "ID" then again, my age prolly has nothing to do with it; i know plenty of people my age who don't adhere to the 'mature' stereotype...

here's the (ugly) code:



it's not pretty, but it's {mostly) working. the flagging system to re-position the terrains is faulty (works fine as X coord increases, but not when i go back toward the 'home' position, but i can figure that out), but it's a step in the right direction. and, my 'building' placement isn't working correctly, but it's an effective way to realize the speed i'm moving at since the objects are emissive.

on initial 1) since i'm using a light range of 1000, i can definitely decrease the sizes of my terrains (prolly 1024x1024) since i can't see beyond that anyway, thus reducing the long 'creation' time required as the program starts. i've yet to implement this, but plan to. now, since i'll be doing this, i'm thinking of setting the tiles up so the nearest edge of the NEXT/APPROACHING tile/terrain matches height-wise with the farthest edge of the current tile, thus allowing additional 'height' (double for each consecutive tile). Q: am i correct in assuming that when i add gravity, and stagger the tiles on the Y axis as mentioned to get more 'depth', collision, etc, will be relative to each terrain/tile whichever one i'm currently occupying?

on 2) i'm thinking that since i open this project some dozen+ times a day since starting it, fiddling with it when i can or some bright idea pops in my head, i inadvertantly 'cleaned up' something in the code that produced the increase/efficiency in the FPS. that's probable, unless you see something in the code that's unstable.

thanks for any replies.

My Modest System:
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb), Drivers and Updates Kept Current
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 30th Dec 2005 21:56
scorp, thank you. will check into the error as advised.

the set terrain scale and other terrain commands... where can i find them? it seems i've shown up to the worksite with just a screwdriver and a pair of pliers. ie, there are many more tools that can help me but i don't know where they are/how you know about them.

ps: since i'm so new to the forums, my posts are being held up for awhile. sorry if anything i post here seems delayed/irrelevent.

My Modest System:
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb), Drivers and Updates Kept Current
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Jan 2006 20:19
bump, please, for the latest 'important' question:

Quote: "
the set terrain scale and other terrain commands... where can i find them? are these, and i'm sure there are many other 'barely-documented' commands, in the past Update Notes or something?
"


thanks, and may this year bring you many splendorous Dark days! (pun intended)

My Modest System:
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb), Drivers and Updates Kept Current

Login to post a reply

Server time is: 2024-04-19 11:45:22
Your offset time is: 2024-04-19 11:45:22