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.

Author
Message
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 29th Dec 2008 15:33
Hi, I have another question. I've build my map, or level, in 3D World Studio. I've added a few entities around and exported it as a .dbo)

I've managed to load up my map and fly around in it. Now I would like to find those entities for in my code to actually be able to give a function to it.

I would like to do in in a way so it find several 'childeren' with the same name and place the item/monster/whatever at all children locations.

I think it has something to do with limbs... ?

A little example is much appreciated! Here is my code :



Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 31st Dec 2008 16:07
No one? I really need this info to proceed.

Lets say I have placed several entities in 3D World Studio with a name called 'info_tree'. Now I would like it so that when I run my game tree models gets loaded and placed on all of the entities position.

This mean I need to count and get the name and locations of the entities in the code to make it work.

Anybody?


Thanks a lot!

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Dec 2008 16:56
Your best bet would be to ask this question in the 3D World Studio forum.

However, if you'd like to upload a simple example model here (with textures) I'll take a quick look and see what Josh has done with the exporter.

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 31st Dec 2008 18:34
Thanks a lot. Here is a simple generated tree model :
http://www.goannasvencoop.com/sphinx/FTP/projects/random/testtree.rar

I don't just need to know how to add tree models in the map, but I would like to know how to use the entities to add other stuff as well. The tree is just for test.

I hope you can help me, else I will ask on the board you suggested too.

Thanks a lot!

Regards,
Sph!nx
Rico109
15
Years of Service
User Offline
Joined: 2nd Dec 2008
Location: none-of-your-beeswax!!!!! (lol)
Posted: 2nd Jan 2009 23:17
I can't help you, but you say "thanks a lot" a lot...

but as the other guy said, put this in the "3d world studios" forum, you'll get a ton more info from there!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2009 04:32
@Rico109 ... Huh?

@IanM - Very cool of you

@Sph!nx - I'm pretty sure the way josh set up the 3DWS when it exports a DBO is it all becomes one object with multiple limbs and I'm pretty sure those limbs don't work out the way you might thinnk - tree, etc... Maybe but definately not separate objects. DBO objects I am pretty sure become "one object".

Is it possible to do what you say? Yeah... but its not easy... I mean, 3DWS has a native format that has ALL the info you'd want but it's not easy to parse through - you have to be pretty good with reading custom data formats and stuff - additionally alot of stuff isn't doc'd right and you need to ask Josh yourself - and he's pretty busy with his stuff - one guy - many people using his new game engine and 3dws - etc... might take a bit to get good responses...

Pixel Perfect did all this research and made an awesome file loader but for DarkGDK awhile back. It looks pretty darn 100% WYSIWYG too I might add... but he released the source code and that source code SHOULD explain alot about what needs to happen to get through that file if you're that motivated to convert it to DBPro or whatever...

It definately won't be a load object "YEAH" situation. I don't need to tell you about the benefits of hunkering down on that though bcause being able to edit a level in a cool modeller for levels like 3dws and then just run it in DBPro and it looks identical etc etc... well - that rocks!

--Jason

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 4th Jan 2009 12:33
Considering DB Pro and Blitz 3D are quite similar I though it would work the same way, yet I could not figure out the specific code.

In my Blitz project I managed to load up a map build with 3D World Studio and find the 'children' from the mesh and use them as 'spawn', or start, locations for all my characters and items.

This system is very effective and flexible and hoped to be able to do something like this in DB Pro.

Thanks anyway!

Could someone tell me then the most effective way to place the entities (monsters, items, players, etc.) around in my world with Dark Basic Pro?

Thanks a lot!

Regards,
Sph!nx
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 4th Jan 2009 18:06
Well - I think its worth a try - there are commands in DBPro for accessing limbs etc... you can run some tests like you did with Blitz. alternative? Parse his file format. another decent one that works pretty good with some work - (easier because its a text file format) is the TED editor - as there are some code snippets that show how to load those files .. and they work out pretty decent.

--Jason

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Jan 2009 18:24
@Sph!nx,
I'm sorry, I forgot all about this thread and my offer.

I've looked at the model you uploaded and it's the tree .x file, not the .dbo I was expecting - it's a small example map that I need so I can check what's going on and work out how to fit it to what you want.

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 4th Jan 2009 18:35
Ohw yeah, don't know where my head was when I posted that. Of course you need the map files... my bad.

Here is the simple test map I'm using :
http://www.goannasvencoop.com/sphinx/FTP/projects/random/map01.rar


Thanks!

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Jan 2009 21:13 Edited at: 4th Jan 2009 21:14
Ok, I've made a quick check of the model and I see what Josh has done.

Here's some code I used to dump out the details:


It relies on my plug-ins, so if you don't have them already ... why not?!

The limb name is used to hold all of the properties - it's a string of 'key=value' pairs, separated by CRLF characters.
There's no hierarchy to the object, so all limbs are top-level limbs. Because of this, the offsets/angles (which are relative to the parent) are directly equivalent to the position/directions (which are world relative).

Is there anything I missed that you need?

[EDIT]
One further thing to tell you - the limb names are limited to 255 characters in size - make sure that your properties and CRLF separators do not exceed this size.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 4th Jan 2009 21:48
WOW - this is such a cool "shorthand" Way to get this info... as for your plugins... I'd use em if they worked in DarkGDK <hint hint> LOL


Seriously - that makes a 3dws model editor or the more valuable! That's slick.

--Jason

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Jan 2009 22:02
Quote: "<hint hint>"

Alright, but you need to play a part too - every time someone asks for some of it to be ported and I ask for suggestions on what they want first, the silence becomes deafening.

So, what do you want first?
Email me and we can discuss it.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 8th Jan 2009 11:05
Thanks guys! Sorry for my late reply, been mighty busy with work but I will try to implement the code you've provided!


Thanks!

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 8th Jan 2009 15:03
How could I have missed this?

Inca Pro Demo : http://3dworldstudio.thegamecreators.com/downloads.php

I feel a bit embarred now...

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 11th Jan 2009 18:50 Edited at: 11th Jan 2009 18:56
Hello again,

I'm having major trouble understanding this code and the Inca Pro demo is still a little too advanced for me. I'm still a n00b, but do want to understand this now...

I know I need to do some kind of loop like this code I found in another thread :

I just don't really understand it.


I have placed 1 'info_player_start' limb, or child, and 3 'info_tree' limbs in a small test map, level, build with 3D WS.

Here is the code I use for the map to load and run :


Here are the map and tree model files :
map01.rar
testtree.rar

I now wish to let my 'tempcam' object start at the 'info_player_start' limb and have the trees be created at all three of the 'info_tree' limbs.

Could some one please add the most simplest possible code to the code I've provided? Although I have most of the extensions I prefer an example with the 'basic' code set.


Much appreciated!!

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jan 2009 20:15
To be honest, I wouldn't use that DBO file in its current format directly in a game - it's too unwieldy and slow to pull all of those properties out at runtime.

My advice would be to use a variation on the code I posted above to write all of the important properties to a file of your own design, then to rename all of the limbs (SET LIMB NAME in my plug-in) to something unique that can be used to map to the properties in your file. You could for example use an ini file format and use another of my plug-ins to do quick lookups for values.

BTW, what is that B3D prefix for the commands? Are they from the eXtends plug-in? If so, I can't write your code for you because I don't use that plug-in - I have my own variations.

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 11th Jan 2009 20:51
Yes it's from the extends, but you can write it just the basic code, without any extensions, if you'd like.

I just need a very easy example with the code and models I provided. Preferably with a lot of notes (// blabla) so I can follow the code and makes it easier to understand.

If you can do this, you are really helping me out here!

Thanks a lot!

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 15th Jan 2009 20:14
Anyone? I really want to understand this before proceeding with the game actors and items.

Thanks

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Jan 2009 23:31
Ok, I'll see what I can do during my lunch hour tomorrow.

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 16th Jan 2009 11:45
Much appreciated mate!

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 17th Jan 2009 13:22
Ok, I've hacked together code that does what you want - it uses my own plug-ins though so you'll need to either download/install them, or replace them with code of your own.

The code is in two parts.
The first 'BuildMapIni' loads the map, reads through the limbs to get all of the required information, then builds an ini file specific for the map.

The second 'game' loads the map, uses the ini file to load & position the models (testtree in this instance), then puts you into freeflight mode.

You might also consider changing the BuildMapIni program to rename the limbs to something more meaningful, remove the 'placeholder' limbs, and then save back over the original .dbo file - it'll be smaller and load faster if you do.

Attachments

Login to view attachments
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 17th Jan 2009 14:29
I have your plugins! I'm very grateful and I will study what you've made for me!

Thanks a lot!

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 17th Jan 2009 16:57 Edited at: 17th Jan 2009 17:30
Wow, that still dazzles me a lot. I've managed to do this in a simple way with Blitz 3D in the past.

I've found the code and tried to translate it into the DB language. Here is my map load/run function code : (the part I'm speaking of is noted)


Can someone please translate that code for me in proper DB code? (If its even possible...)

Thanks!!

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 18th Jan 2009 17:39
Man, I really can't seem to get this work.

I simply need to find all the limbs containing a certain name, and then place a model at all of the limbs, containing that name, locations.

I've searched the board, code archives and browsed my dark source snippet collection...

I'm pretty sure I will take the direction IanM showed me, but for that to grasp I need a very simple example.

Are there perhaps some tutorials, on this subject, that I've missed?


Thanks

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 20th Jan 2009 13:33 Edited at: 20th Jan 2009 13:50
I'm very grateful to what IanM made for me. Really. It's just far to difficulty for me to understand.

I 'simply' need to find all the limbs of a map mesh containing the same name and do some actions with it... Can't be too difficult and there must be an easier way than Ian made for me.

The Inca Pro would work for me, yet I find the information (notes) in the code very limited to get a clear understanding. Isn't there someone else who has some knowledge to share on this topic?

Getting kinda desperate now... HELP!

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Jan 2009 14:25
The answers are all in the code I posted, and in your own code actually.

In the extract program, it loops through all of the limbs and gets their names one at a time - you already have this in pseudocode. You can search the name for whatever string you want by using the INSTR function from my plug-ins - you already have that too in pseudocode.

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 20th Jan 2009 14:34
Okay, so my pseudo code could work? In that case I will get back into translating that as best I can.

Thanks again!

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 20th Jan 2009 15:07 Edited at: 20th Jan 2009 15:24
I know this sounds a little weak, but could you perhaps translate the pseudo code for me? Perhaps with a little extra notes and stuff.

I've been at this problem for days now and as the Dutch saying goes "I can't see the trees through the forest" any more.

Thanks

EDIT :
Meh, can't let this rest ...

This is what I've got so far:


Gives me a parser error here:


I Don't get it... I need to find a certain string withing the name of the actual limb (to be able to get all the limbs with that name in it) and then identify them all to place abjects in a loop based on the count of the limbs...

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Jan 2009 19:58
You can't use GET LIMB BY NAME, as that function assumes that you know the name and just need the limb number - not what you need at all.

Use LIMB NAME$ (as I did in my code) to get the name, then search that name for the text you are looking for.

Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 20th Jan 2009 22:25
I will give it a try! I just hope the rest of my translation is correct...

Thanks!

Regards,
Sph!nx
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 24th Jan 2009 20:03 Edited at: 24th Jan 2009 20:04
Still braking my head at this...

Inca Pro demo seems a good direction to take. Does anyone perhaps got an old version, stripped from the use of NG collision and other random stuff?

I still cant seem to get my head around this. In Blitz its so easy...


Thanks

Regards,
Sph!nx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Jan 2009 21:44
In DBPro it's so easy.

I'm very surprised that with the code I've already given you, your pseudo code, and your blitz experience, you couldn't come up with the code.

Same base loop, different LoadMap function:


Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 28th Jan 2009 02:53 Edited at: 28th Jan 2009 02:53
Been busy with work, but have time tomorrow to fiddle a little more!

I knew this could not be that hard... I just didn't see it. You gave me exactly what I needed!!

I really appreciate all your help and I thank you for it!

Regards,
Sph!nx

Login to post a reply

Server time is: 2024-09-28 02:31:44
Your offset time is: 2024-09-28 02:31:44