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 / Limbs. How to create and use them ingame?

Author
Message
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 10th Nov 2005 23:46
I am making game where you have a ball in a map (any shape - currently using a simple rectangle). To bouncing the ball, I need to be able to get the gradient of all the sides. Instead of creating multiple objects for walls, which would be time consuming and obstructive to creating a level editor, I would prefer to use limbs - which I have vaguely heard about and presume these would forfill the task of having multiple objects for walls. I want to know;

1) How to create limbs? I am using DeleD to model with, do i create them in that or in DBP.

2) How to get the gradient of a limb? Would this be done using the limb commands? (Angle + direction)

Thanks for any help.
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 11th Nov 2005 00:30 Edited at: 11th Nov 2005 00:30
Hello..

1) Check out the docs. You can convert 3D objets into limbs and attach them to objects..
2) Check out the docs. There is how to get the rotation and location of limbs..


Hope it helps..

The worst foe lies within the self..

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 11th Nov 2005 22:23
Which docs?
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 11th Nov 2005 23:46
Right an explanation of limbs...

Limbs are basically objects that take on the rotation, location and movement of an object of your choice. You can manipulate limbs a lot of ways, offsetting them for example, or maybe hiding them if they aren't meant to be seen.

Open up DBP and enter the following as our base code structure (I'm assuming you know a fair amount of DBP and can understand this basic layout):



Now that we have a basic setup we can continue on with the limbs part.

Creating a limb requires 3 things, the object you want the limb to be attatched to, the mesh you want the limb to be created from, and the limb number the limb will be identified with.

To start we'll make a box object, enter this after the MAKE OBJECT SPHERE line:



Now we will make a mesh from the box. Meshes are basically the main data of the structure of the 3D object. To create a mesh we require the mesh number we want to identify it with, and the object number we want to make the mesh from. Add this code after the line we previously typed:



We've created a mesh numbered 1, from our box object 2.

Now we'll delete the object 2 since it isn't needed anymore:



Now its time to add the limb. Add this code:



We've added the limb to object number 1, made from mesh number 1, with a limb number 1. It's important to note that limbs must be linked in chain sequence, by this I mean that the first limb to be attatched to the parent object must be numbered 1, the next one must be 2, and so on.

Also, note that when you get into complex objects made in modelers they often have many limbs already. This can be a problem since limbs must be added in chain sequence, so basically we need to get the amount of limbs the object has so we know what to number the next limb. If this were the case, you would first use this command:



Replacing Object with the object in question. Then you would use the CHECKLIST QUANTITY command to store the amount of limbs in a variable, like so:



Now you just use the new variable we have as the limb number.

Coninuing on, we've used the mesh so now we can delete it, add this code:



Next we'll offset the limb to the right of the user, add this:



This command requires the parent object number holding the limb ; 1, the limb number; 1, and the x y and z offset. In this case we've offset it 45 units to the right, 0 up and 0 behind.

There you have it, run the program and you should have a sphere that you can move with the arrow keys, and a box-like limb that stays to the right of it.

Here's the final source:



Just some uses for limbs:

Offset an invisible limb behind the user, position the camera there and point it toward the user and you have 3rd person view.

Offset it at a given point and check for intersections, useful for basic polygonal collision detection.

Many more im too tired to list right now

Hope it helps.

Heckno
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location: Palm Coast, FL
Posted: 13th Nov 2005 05:37
Holy snap crackle pop Ruccus you just gave me an idea how to resolve a problem that I have been struggling with...

........
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 13th Nov 2005 14:22
I've been told I have a way of doing that

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 14th Nov 2005 22:48
Thank you so much Ruccus Although this doesnt directly fix my problem, I can see many uses for limbs. I guess to fix my problem i will have to try to think of a way around it. If worst comes to worst then i will just have to make 5 objects and limb them together for each tile.

Thanks again
Ne0
18
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 21st Dec 2005 05:39
Quote: "Offset an invisible limb behind the user, position the camera there and point it toward the user and you have 3rd person view."

have u actually done this?
look at these 2 topics to see why i'm asking... i dont think its possible (with dbpro)

topic 1:http://forum.thegamecreators.com/?m=forum_view&t=67517&b=7
topic 2:http://forum.thegamecreators.com/?m=forum_view&t=67187&b=7

Hey, I'm still a newb, so expect lots of questions from me...
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 21st Dec 2005 23:36 Edited at: 21st Dec 2005 23:38
Lol yes Ive done it, I even made a function that uses it, its not a bug with DBP thats almost for sure. I think its with your code, in my opinion Id take out the GOTO's that might make it more legible and easier to understand, possibly turn them into functions instead. Just an idea.

Lil Gaming Man
18
Years of Service
User Offline
Joined: 23rd Dec 2005
Location: Abbots Langley
Posted: 24th Dec 2005 10:31
RUCCUS, one question. Do you have DB or DBPro? and also do you have the latest update of each one?

This may help as updates fix problems.

Good Luck!

geez
gamerz rule!
Lil Gaming Man
18
Years of Service
User Offline
Joined: 23rd Dec 2005
Location: Abbots Langley
Posted: 24th Dec 2005 10:32
Xlayos

Read what I sent to RUCCUS. It may help your problem.

geez
gamerz rule!
Ne0
18
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 24th Dec 2005 14:25 Edited at: 24th Dec 2005 14:30
@RUCCUS: There is no GOTO's in my code(http://forum.thegamecreators.com/?m=forum_view&t=67517&b=7)... only gosub. and u say more legible, u mean for us or for the program?
i think it's "more legible" for me with the gosub...

and why would making it into a function make it work properly?


Some people know me as:
Lil Gaming Man
18
Years of Service
User Offline
Joined: 23rd Dec 2005
Location: Abbots Langley
Posted: 24th Dec 2005 15:14
What is a GOTO?

geez
gamerz rule!
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 24th Dec 2005 19:18
Quote: "What is a GOTO?"


Thank God you don't know. It's a more primitive "gosub"... only it doesn't return back to the "goto" like "gosub" does.

Many of us keep away from "goto" like it's a 3 week old roadkill thats been partially eaten by wild animals and festering with maggots.


RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 27th Dec 2005 03:38
I must've said GOTO instead of GOSUB by mistake, either way in my opinion at least I find functions are a lot easier to understand...I dont know why, its just... Er... Somethiug...

Anyways I dont use GOSUBS, never have, so I was just stating that one of the problems could lie within the GOSUB, perhaps something that disables automatic camera updating (I highly doubt it) but I know that I can make it work. Heck, Ill even make a quick sample right now:



I'd comment it but I think I explained limbs enough in the other post, hope it helps.

RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 29th Dec 2005 14:25
Im still interested to see whats happening with this, have you tried my source code to see if it works Ne0?

Login to post a reply

Server time is: 2024-09-24 11:21:40
Your offset time is: 2024-09-24 11:21:40