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 / The proper way to make "outside" levels

Author
Message
SkyCube
17
Years of Service
User Offline
Joined: 20th Jan 2007
Location:
Posted: 3rd Jun 2007 01:33
Hello all,

Does anyone know the best way to create outside terrain levels? Right now I have various options, but I would like to know what other people do. I can make my terrain in a .x file and load it. Only problem is, it always loads small and I need to scale it to make it big. I have even tried scaling within the 3d App I'm using, but it always loads small. Another option is to use a DB Matrix. Only problem is, I'm using Sparky's DLL for collision, and I'm not sure if that DLL can detect collisions with a matrix, so I will be using Sparky for collision, but the native DBPRO commands for terrain collision, which can complicate things.

The final option I was checking out is using a heightmap file for the terrain data. However, when I export such a file from my 3d App, it loads small in DBPro when loaded using the MAKE TERRAIN command. Unfortunately, I can't seem to find something like SCALE TERRAIN. So, do I have to scale my heightmap file to a ridiculious size to get a decently sized terrain from it?


How are those big, seemingly infinite terrains (like in WoW) made? I know the terrains in WoW have limits, but they sure are big! I read once that a big terrain is often divided in pieces, and loaded as necessary. However, I can't seem to get a big enough terrain to divide, even after scaling to proportions like 4000,4000,4000. How do the rest of you deal with this problem? Thanks, like always for any info.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Jun 2007 03:49
Hallo skycube....it seems very strange...i´m using Max for that and it works ok...perhaps you have to have a look in your program opsions for export .x

I know, that scaling the object have had problems detecting collisions...but a matrix it´s not pretty good.

if you send your landscape...i will try to make it biger as it shouldn´t be to difficult.

greetings

oh my god
SkyCube
17
Years of Service
User Offline
Joined: 20th Jan 2007
Location:
Posted: 3rd Jun 2007 16:07
Hi chafari,

Thanks for your offer to help. What do you need me to send, my .x file, or my hieghtmap? I've been thinking... I don't know how I would detect collision with a terrain made with a heightmap anyway. Most collision functions are for objects and matrices. Anyway, let me know so I can send you the map. Thanks.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 3rd Jun 2007 18:03
hallo again SkyCube....you can send the .x file, and i will try to make it biger from Max...and put it here again.


You don´t nead to detect collision on a terrain, as they are automatic :

y#=get terrain height (1,x#,z#)
position object obj x#,y#+5,z#
position camera x#,y#+10,z#


You can do the same with a bullet that hits in the terrain


bullet_y#=get terrain height(bullet,x#,z#)
if bullet_y#<0 (it means ...the bullet impacted to land)

then you could decide what to do....

robertochafari@hotmail.com

oh my god
SkyCube
17
Years of Service
User Offline
Joined: 20th Jan 2007
Location:
Posted: 4th Jun 2007 05:40
Hello again chafari,

I am posting my .x file here. See if you can make it bigger. I was also looking into the possibility altering some camera parameters or something, to make it seem bigger when it is really small, but I can't seem to find anything like that in DBPRO's command set.

Attachments

Login to view attachments
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Jun 2007 02:14
Hallo Skycube... i made what i sed...i made your terrain bigger, and here you can find a complete sliding collision system free for you...ha ha

in the example code, you can fly pressing space key...but it must be just when you create you level in oder to see where to put objects...i hope you can find it useful


Greetings

oh my god

Attachments

Login to view attachments
SkyCube
17
Years of Service
User Offline
Joined: 20th Jan 2007
Location:
Posted: 5th Jun 2007 04:03
Thanks chafari,

This is just what I was looking for. Now I have to see how I go about doing it myself (after all, I can't be bothering you whenever I need to enlarge a terrain!). Thanks for the collision code as well. Collisions in DBPro have a major issue for me as well.

On a side note, I notice from your code it's commented in Spanish. I speak Spanish too. Nice to know I'm not the only one here. I will post back when I have analyzed what you sent in detail. Thanks again!

SkyCube
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 5th Jun 2007 11:51 Edited at: 5th Jun 2007 11:52
if your world is a .x object, use the command

if you are using the advanced terrain, you can use the command


by decimalscale, i mean 1=100% 0.5=50% and so on..
SkyCube
17
Years of Service
User Offline
Joined: 20th Jan 2007
Location:
Posted: 9th Jun 2007 20:22
Thanks for the tip, revenant. I didn't know there was a scale function for advanced terrains. But I would like to be able to load my terrain in the proper size, without having to resize it using DBPro's commands.

Chafari, I checked it out. I think I managed to do it. It turns out there was an export option that I was not checking, with resizes the object. Now, I haven't created a terrain large enough to fit my needs, but it's a start. Thanks for everything.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 11th Jun 2007 05:22
This is a good question and the terrain commands I'm dying to try out - haven't touched any DB Pro code in years.

I wonder about this also, making terrains - the right way for out side etc. I've read and have more or less seen - that Flight Sims for example - DEFINATELY are designed and considered a different animal than a FPS for example, like Far Cry - (Which had an awesome Hang glider part.. on a side note!) Reason being the amount of terrain you want to cover, and the amount of mem etc and info - you need to get into a scene - and the detail necessary to get the "effect" or "experience" you're after.

In a flight sim, this is usually done where chunks get loaded as they are neded - almost how I evision the "rotating" matrix is supposed to work - but the heights and terrain tiles etc - are appropriate for where the player/plane/heli/parachute dude happen to be - which is techicallay (I'd venture to guess) directly stationary and the scenery is smooth (hopefully) scrolled appropriately as the player progresses.

In something like far cry, there are documents I've read (Especially by this lady named TinkerGirl) who correctly describes how games can give great game play and the illusion of grandeur and size while really just restricting vision (For render optimization concerns) and controlled "views" (For both render and preventing the user from seeing enough that the game looks model railroad'ish by letting them see TOO much), forcing (without player noticing) to follow a more or less linear path etc.

The other concern is naturally speed. We all know DBP has its strengths and weaknesses - and leveraging those to get the scale we want along side performance can be a challenge. Deciding on what to preload, what to recycle, what poly's to drop, etc. Can be a challenge. This might be where DarkGTK beceomes our best friend giving us both the "quick access" to DirectX and 3D (Without 30 definations and API calls to just get the screen cleared and load a model and and tell mom or the wife) while still having all the other high level language tools available for things like object oriented classes, string manipulation - heck - database access and other user interfaces may be possible by in one app starting and stoping the API as needed. But - as a DarkBasic(Pro) coder - even if I'm a bit rusty personally - I know its important as heck to write lean and mean routines to get the higher Frames Per Second in complicated scenes and AI routines etc.

Well - enough ranting from me. I definately like this subject - as I seem to have more fun making terrains (or trying to) than making box levels - and I'd say each is completely different is design both graphical and from a coding perspective.

Know way to many languages - Master of none

Login to post a reply

Server time is: 2024-11-25 17:56:18
Your offset time is: 2024-11-25 17:56:18