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 / Place characters on a level with DbPro

Author
Message
Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 11:15
Hi all

I know that we can build map and level with 3d World Editor or Delgine for example. But I wonder, what about character ?

I mean, if I create a level with 3D World Editor or something like this, I will have to place my animated character with line of code and DbPro or there is an other way more sample to place them on the map ?

I ask this because, ok easy to build a map, but imagine a level, with rooms and you want to place characters on a particular room, how to do that easly ? Because with code...we have to try coordinates and try again and again to make the character matches the place I want.

Thank you for help

PS : sorry for my english... ^^
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Feb 2012 12:24 Edited at: 15th Feb 2012 12:26
Quote: "I ask this because, ok easy to build a map, but imagine a level, with rooms and you want to place characters on a particular room, how to do that easly ? Because with code...we have to try coordinates and try again and again to make the character matches the place I want."

make your level editor or position a box on the places where you want your characters to be, give the boxes special names and then when you load your map scan the map's limbs, when you encounter those special names remove boxes and place characters instead

Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 15th Feb 2012 13:45 Edited at: 15th Feb 2012 13:46
i'm having a lot of fun with this at the moment. I've been working on a project for a while now and i've decided to code for long term adaptability and customisation, rather than short term attainability

The quickest way is to code it into your program. It will be seperate to the level itself, you'll have to write something like...



it's quite repetitive but it works. The issue is it's hard coded, if you change the level layout, or want to add more levels, you have to update your code. I opted for the script method, i've since expanded it drastically to have full mod support. I won't disclose my actual code yet but basic process is...

-scan folder for maps
-load corresponding configuration file
-load map objects
-configuration file determines names of available objectives, weapons, units etc as well as their positions
-load any relevant config files relating to units/weapons/etc
-fill arrays with relevant data. Unit health, damage, position etc
-position said objects within the map

This takes a lot more effort but allows you to modify or add new maps without recoding. And it allows you to write your own level designer which can export a configuration file for you. The problem is you need to write your own file format, which means an encoder and decoder.
I'm pretty sure there's actually some 3rd party programs that handle the encoding/decoding for you and cuts out a lot of the work. Have a look through the 'work in progress' and 'program announcement' forum sections.

That's about all the help I can give you at the moment. Ultimately you can't position units with the same map editor, you'll need to use something else, or just hard code them in.
I'll consider releasing my script engine later on as it's extremely diverse and adaptable, allowing user created mods. As well as 3rd party level designing programs to export to the format. But for now i'm keeping a lid on it
Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 15:44
The ideas with the limb is a great idea.

I tested it but I have a small problem :

In my level to test, I have named my objet "test". In Dbpro I retrieve limbs and I found "test", I can delete it and I can position my object at his place but...when I retrieve the x, y, z position on my limb and attribute it to my new object, the position is not exactly the same in the level, of my limb

I try to play with offset option but doesn't work.

Any idea ?

Thank you all for your answers and help !
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Feb 2012 17:01
try to print limb positions on the screen to check if the limbs in the level contain offset data. Some level editors place all the limbs at 0,0,0 and only offset the vertices

Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 17:06
the problem is when I print the limb position it always return 0 ????

I can delete the limb but it's very strange that his position returns 0

here's the snippet :




I try to remove the # after posx, posy and posz, I try to make a do loop with a print for the limb position but it returns 0...
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Feb 2012 17:27
instead of checklist value A(c) try putting just c.
If it doesn't work then level editor you're using doesn't save limb positions and then unfortunately you either have to switch to another editor or you'll have to code yourself a character placement editor (it's not that hard and if you search a forum a bit i'm sure you'll find something like that already done)

Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 17:41
it's strange. Because it finds the limb and delete it with the remove limb command.

But it doesn't retrieve position of the limb

try your idea, but doesn't work. I work with Delgine.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Feb 2012 17:42
It could be the limb bug that I posted in the bugs list. DBPro sometimes resets limbs to zero. It depend on which program they were saved in.

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Feb 2012 17:53
Quote: "try your idea, but doesn't work. I work with Delgine. "

it's probably the problem in delgine - it doesn't save limb positions

Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 18:35
what about World 3D Editor ? I've seen that level are rendered black in dbpro, it seems, there is something particular to do ?
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Feb 2012 18:49
Quote: "what about World 3D Editor ?"

link?

Quote: " I've seen that level are rendered black in dbpro"

where did you see that?

Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 19:14
I talked about 3D world studio (do a mistake).

I do a search and in fact that was because textures that come with 3D World studio doesn't match the format that Dbpro want ^^

But I don't know if the limb technics work with it.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Feb 2012 19:21
Quote: "I do a search and in fact that was because textures that come with 3D World studio doesn't match the format that Dbpro want"

you have to use your own textures in bmp or png format. Textures that come with 3D World Studio are for use only inside 3D World Studio.

Quote: "But I don't know if the limb technics work with it. "

neither do I

Try searching for some level editor here on the forums. There was o cool editor few years ago called World, try searching for it.

Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 19:30
thank you
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 15th Feb 2012 21:37
Within Delgin (and likely any other editor too) editor you could just note the coords of an object and transfer them directly to your program. Place an object, the editor shows you where it is, that's your position.

Obviously if you are altering the levels then you would have to re-create the list which would probably be better in a text file and then read the updates or have your program read them in.

Just a though...

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Crystal Noir
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 7th Sep 2011
Location: France
Posted: 15th Feb 2012 21:57
That' s an idea. I think there is no simple thing to do that. The limb technic is the most simple I think but it seems to work when it wants to ^^

Thank's to all, and also Millenium7 and all members that try to help me here
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 19th Feb 2012 22:13
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 19th Feb 2012 23:21 Edited at: 19th Feb 2012 23:21
you always could do an easy trick to model, just like i do..
just suit your modeling into your programming. whats that means?
just use some model maker, make a map on that, also place small boxes around the world, make sure you name them differently.
export everything as a single mesh (.x file)

now all ya need to do is just put your characters or other models on the x/y/z limb positions of those boxes..

example:



thats basicly all ya need
thats my way of doing stuff.. maybe you loose about 6 vectors for rendering, but its worth it sometimes..

more 3d models .x/.obj and more foramts here:
[href]https://www.turbosquid.com/Search/Index.cfm?keyword=gogetax1&x=0&y=0[href]
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Feb 2012 23:22
I have 3DWS and curious how to name entities... classes?

like this?



I am totally new to the idea...

Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st Feb 2012 00:48
make a test:




export any model from 3dws into .x, and load it.
replace the MyObj.x file with your own and see what happens..

you will get the limb name..

more 3d models .x/.obj and more foramts here:
[href]https://www.turbosquid.com/Search/Index.cfm?keyword=gogetax1&x=0&y=0[href]
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Feb 2012 01:26
Sergey... umm not sure what limb its naming but I get garbled words... and looks like its just displaying the one... should your code display all limbs?

hang on I have an idea... no

no luck... it comes upas mangled with your code

Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 21st Feb 2012 10:28
I already did.. with this code I posted earlier, ones you load the model, it should get all the names of all limbs of the model. try ti replace the load object with "make object cube 1,10" instead..

more 3d models .x/.obj and more foramts here:
[href]https://www.turbosquid.com/Search/Index.cfm?keyword=gogetax1&x=0&y=0[href]
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 21st Feb 2012 10:30
yeah weird...

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 27th Feb 2012 03:43 Edited at: 27th Feb 2012 03:51
Although it takes a longer, I write my own world editor for this very reason. It's not as pretty, but I completely control what it can do.

Many professional studios design their own "in house" tools and editors. For best results this is how it's done.


3DWS and other software mentioned above are really great and give you quick and easy access to some very advanced features. The cost is you need to accommodate the fact they don't fit your game design completely. So you need to choose which is a better option given the situation.


Edit: I actually wrote a custom editor for levels, characters, items, world objects, and scripts.

Seppuku Arts
Moderator
21
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 27th Feb 2012 12:31
MapScape is definitely a good choice and it does save limbs. I recently switched to it, I definitely recommend it.

I have never thought of the limb approach, but it's a pretty cool idea. My current approach has been to display a character's position on screen and move it to where I want it, write down that position and then code it in.


Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 27th Feb 2012 17:39
@Seppuku Arts: thanks dude. thats my idea
and here is how it works.
copy/paste the code and download the attached file, thats the demo for you.



more 3d models .x/.obj and more foramts here:
[href]https://www.turbosquid.com/Search/Index.cfm?keyword=gogetax1&x=0&y=0[href]

Login to post a reply

Server time is: 2026-07-09 17:41:50
Your offset time is: 2026-07-09 17:41:50