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 / random placement of objects spawned to an object terrain (advanced terrain)

Author
Message
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 28th Apr 2007 10:28 Edited at: 28th Apr 2007 10:29
'Ello all,

I have been trying to get my trees to randomly spawn on top of my object terrain. I have been successfull in getting the trees to spawn at random cords, but am having a problem with keeping them on the terrain. They seem to spawn on the terrain and off of the terrain..

Here is my code (compliments of tehcoderer)

This is the first part, the loading of the original tree, and the instancing for the rest of them.



This next bit is the collision, distance viewed.



Thanks in advnace to those who would help me.

Cheers,
Dave


vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 28th Apr 2007 16:18
Could you post a screenshot of what is happening?
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 28th Apr 2007 18:22
sorry mate, it got fixed. Turns out I was using the "object size" incorrectly, but it's fixed now.

This is how I should have used (as pointed out by tehcoderer)
I would post how I had used it but I am to embarassed...



Cheers,
Dave


vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 28th Apr 2007 18:37
Glad you got it working, you seem to be getting good at this
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 28th Apr 2007 18:54
well, TEHCoderer has been my guiding force. That dude has helped me alot and has taught me alot. as it stands now I have roughly 200 trees , 1 mega-terrain and the player hud weapon with animations and sound and basic collision loaded. and it runs around 64 FPS, I have it locked at 60 so i guess I am not doing to bad. I need to tacklet he skycube/sphere task now...


Cheers,
Dave


Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 28th Apr 2007 22:41
I'm curious to know how "mega" in DBP units your terrain is, cause i dig mega terrains but personally I always hit the "too low fps" wall with my attempts.
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 29th Apr 2007 12:43
The terrain is a 512x512 bitmap and is scaled 20,2.6,20 before i use the "save object "lalalala.DBO",# " command.


Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 29th Apr 2007 12:56
thanks
512x20 means 10240 dbp units
Reality Forgotten
FPSC Reloaded TGC Backer
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Wichita Falls TX
Posted: 29th Apr 2007 13:00 Edited at: 29th Apr 2007 14:15
ok thanks, is this considered a mega terrain?

here is a video of the terrain in action, the frame rate is low because of Fraps, but still runs quite smooth.

Video


Cheers,
Dave


Login to post a reply

Server time is: 2024-11-25 19:25:13
Your offset time is: 2024-11-25 19:25:13