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 / Creating Maps Basics

Author
Message
Avoth
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location:
Posted: 11th Jul 2011 03:40
I was wondering if anyone could shed some light on the best way to build a map. Loading meshes is quicker than loading a DBO object map from what ive been told. But a DBO map you can apply great detail too in an editor and place buildings/items exactly where you want them. Where with a standard mesh im just assuming you would have to imagine approximately where the objects should be (or precisely) and tell the program to load the object and position them at specific coordinates.

What is the most practicle way to do this? Code into the game each coord for each object or use a DBO file with preplaced objects.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Jul 2011 04:10
Quote: "Loading meshes is quicker than loading a DBO object map from what ive been told"
That is not really exact. That depends of what you are going to load. If we want to add terrains to our map, the best way is making the terrain with adavance terrain, if not, we can make in any 3D program our objects in .x format and then from the same darkbasic pro, load those objects and save them as .dbo ....we have to say that those dbo objects will be bigger than .x , but will be loaded faster than any other format. We can manage small maps being a unique dbo file, or we can load several .dbo to complete our map...that depends on the power of our PC, but it is preferable to load several medium-sized maps. We had better make something like as storyboard and start little by little.

Cheers.

I'm not a grumpy grandpa
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 11th Jul 2011 15:54
there are a lot of practical ways.
however, use data then read as a simplest way.
Avoth
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location:
Posted: 11th Jul 2011 16:02 Edited at: 11th Jul 2011 16:18
I could quite simply create the entire map in 3DWS and load it as a DBO and make intersection checks... but the worry is that this would use up alot of juice having all the objects on the map loaded at once.. and thought maybe it was more suitable to Create a basic terrain mesh using a heightmap allowing get ground height to be used.. and then adding a layer of objects (buildings) on top.

There is no way to break down a DBO object once loaded to seperate the ground mesh and use it as a terrain plane (making commands such as "Get Ground Height" work?).

There are plenty of programs which make worlds for you but are not classed as Advanced Terrain when loaded. But there is no real explaination to how you can make a terrain mesh then accurately place objects throughout it either to be used (doors) or pushed (switches) without trial and error of placement.
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Jul 2011 16:29
Quote: "There is no way to break down a DBO object once loaded to seperate the ground mesh and use it as a terrain plane "


You can play with the limbs, but this is not the case. Normally levels are made with many square rooms, and it doesn´t have to much polys, but when we make a big mesh for a terrain, that slow down the PC because of the quantity of polys, that`s why we had better using Adbance terrain in those cases, but we can make the terrain whereve we want.

Case 1 - if we want to use an external terrain made in any 3D program, we can not use the command get ground height with this object...of course that we can anyway to find out the floor position all the time with other commands like intersect object.

Csase 2- if we use for terrains (just for terrains ...mountains cliffs etc) we can use the adavanced terrain that come include with darkbasic pro, and the use all this useful commands like get ground height.

So knowing that,we have to choose which method to use at all times
taking into account, we can use them all at once.

As you mention, I think your biggest problem now is knowing how to position objects on your land, and believe me, for this purpose is best to use advance terrain, but if you want to use your own terrain use intersect object . I can make an example for you if you want

cheers.

I'm not a grumpy grandpa
Avoth
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location:
Posted: 11th Jul 2011 16:49 Edited at: 11th Jul 2011 16:50
So basicly

Create Heightmap > bigger the image.. the more the detail
Then load heightmap
Then you have to imagine in your head where each object must be placed?

OR could you create all the object for that level in a group the same size of the Advanced Terrain and effectively place it on top. This would lead to all the objects being loaded at once. Would this be an unsuitable option due to so many polys being loaded at the same time... or does the program automaticly hide polys not in view?

My other thought would be to create the height map and then create clusters of objects to be loaded when inside a certain proximity of the cluster (loaded just before they actualy come into view through fog of war for example)
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 11th Jul 2011 17:12
Quote: "Create Heightmap > bigger the image.. the more the detail"


That depends on how this terrain will be . Imagine you just need to see outside in a small area, and then you have to go into a castle. The level of detail doesn´t depend on how big the map, but how big is the detail map.

Quote: "
Then you have to imagine in your head where each object must be placed?"


I asure you, that when we dream how to make our map, we had dreamed wher to place our objects ....some other times we place them just because it looks good there.


Quote: "could you create all the object for that level in a group the same size of the Advanced Terrain and effectively place it on top"



Not necesary... unless we make by hand the heightmap and then place the rest of the objects. I will prefer to add my level in flat areas independently, but the game is in our brains .


In most game, when we are outdoors, we just see the outside of the level, but inside there´s nothing. The same happens in a big level...for example when we go into the level, we sclude the object terrain and when we are into a room, the next room is empty.

Time ago, I made a tree system for a forest, and with just 50 trees, it looks like there were thousands just repositioning trees close to camera and keeping its position when we go back.

Cheers.

I'm not a grumpy grandpa
DVader
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 11th Jul 2011 17:19
Making an editor is probably your best bet. So you can load up your terrain, and place each object down as and where needed. Although terrains are never the best for road layouts. Dark Imposters is the best bet for keeping up speed in a 3D world, as far as I can see, it certainly helps anyway. Plus you can always resort to other methods as well, if you are still having speed troubles.

http://s6.bitefight.org/c.php?uid=103081
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 12th Jul 2011 04:11
Have you not looked at Cartography Shop which is free from TGC? There's also a lot of editors out there that allow you to create levels easily enough with more than enough options to play with internal objects.

I did actually make a scene editor just for GDK and DBPro just in case it's whats your after. http://csnorwood.com/dark-gdk/wlsge/

The editor is written in GDK but all you need is one file to add to your DBPro project to load and manipulate the separate objects in the scene.

Warning! May contain Nuts!

Login to post a reply

Server time is: 2026-07-10 21:42:03
Your offset time is: 2026-07-10 21:42:03