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 / Moving to 3D?

Author
Message
Techninja
16
Years of Service
User Offline
Joined: 20th Jun 2008
Location:
Posted: 20th Jun 2008 18:37
So I've been using Dark Basic for a while now and I feel that I have a large enough understanding of its basic features. I've made programs in the past using text, databases, and 2D images. Never used a sprite, though.

There are several programs that I have sampled and begun in 3D, but none that were really worth my time.

I really need an overview, here. Can anyone list some useful commands that I could use to load, use, manipulate, deform, and control 3D objects?

Also if someone could give me some tips as to easily make my own animations, that would be great! I saw that in the original Dark Basic they had a sample program that used an object of a man to manipulate and move his limbs so the animation could later be saved as a new animation for the object. This is great and all, but it really doesn't give any biped object the appearance of walking over a matrix.

Really, I'm imagining my first project being a basic racing game. I'm hoping to have a scrollable options screen when the players are choosing their vehicle. I'm hoping to have some sort of linear scrolling where the selected car is larger than the rest and the ones far from it are smaller/in the distance:
[1st selected: Oo..]
[2nd selected: oOo.]
[3rd selected: .oOo]
[4th selected: ..oO]


I also need to learn how to randomize a matrix so that there are slight peaks which the car will smoothly roll over, which reminds me... I'll also need some commands for creating and using collision boxes.

I know this is a lot to ask and I really appreciate all those who read this message (even moreso, if you reply or help out).

Thanks so much!

Feel like I understand text-based/2D programs well enough.

Time to move to 3D!
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 20th Jun 2008 19:37 Edited at: 20th Jun 2008 19:41
Alright, here are a bunch of commands you may find useful for 3D. It gets easier once you get the hang of it

X Axis= Width

Y Axis=Height

Z Axis=Depth


Quote: "load, use, manipulate, deform, and control 3D objects."


For object loading from a .x or .dbo or other supported file formats:

LOAD OBJECT
FIX OBJECT PIVOT <-- Useful if your model doesn't load in facing the right way... you can rotate it and then use this to make it face that way when rotated at 0,0,0... It's NOT a loading command.

and, some common and simple native DB object creation commands:

MAKE OBJECT BOX
MAKE OBJECT CUBE
MAKE OBJECT SPHERE
MAKE OBJECT CYLINDER
MAKE OBJECT PLAIN
<-- that object actually has no depth


POSITION OBJECT

XROTATE OBJECT
YROTATE OBJECT
ZROTATE OBJECT
ROTATE OBJECT

MOVE OBJECT
TURN OBJECT LEFT
TURN OBJECT RIGHT

SCALE OBJECT

TEXTURE OBJECT
<--- Use LOAD IMAGE, then you can put that image on your object.


And here's a simple example using some of those commands:





And little quote from something I wrote a while back titled "A Few Tips For Newcomers- Getting Started" to help understand the concept of the CAMERA used in 3D.

Quote: "
-The next thing you must understand is the camera. The user of the program only sees what the camera can see. so, you need to place the camera accordingly to where you want the user to be able to see. Say you wanted to make a cube spin. Well, you would first need to create this cube. Next, you want to make it spin, right? WRONG! What's the point of making a spinning cube if we can't see it? Yup. No point. So, you would now put the camera where it can see the cube, and then you would make something called a "loop". A loop is when you tell the program to do whatever is inside it OVER and OVER again. This can save LOADS of time. And in this loop, we would tell it to turn! That's it for our cube.


Commands needed to do the above
>Make Object Cube
>Position Camera
>Do
>One of these, any of them will do. The "Turn" ones are easiest:
Turn object left
Turn object right
Yrotate object
rotate object
>Loop

NOTE: Do and loop are related.
"

^ You can try and do that if you like


Quote: " I also need to learn how to randomize a matrix so that there are slight peaks "



MAKE MATRIX

PREPARE MATRIX TEXTURE
<--- this one can seem tricky. The first # is the matrix number. The second # is the image to put on it. The third & fourth #'s denote the number of tiles that the image has on it. If you wanted to have some parts of the matrix be grass and others be dirt, you would need an image with different tiles on it.


RANDOMIZE MATRIX

UPDATE MATRIX

*******************************************************************
Feel free to post back with any questions, and don't forget to look at this: http://forum.thegamecreators.com/?m=forum_view&t=115633&b=7

Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 20th Jun 2008 23:38
don't forget delete object that is unless you want to crash you computer

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 20th Jun 2008 23:44
Haha good point

Techninja
16
Years of Service
User Offline
Joined: 20th Jun 2008
Location:
Posted: 21st Jun 2008 03:39
Thanks so much! I didn't think that anyone would actually add so much detail to their post!

Few questions, though:

1> I've had some problems scaling my objects in the past with the original Dark Basic. When it says scale object, is it only referring to the cones, cubes etc. or objects that you load into the game (say, from DarkMatter)?

2> For turn object right/left... does it mean that it does so on the Y axis?

Well that's about it... your earlier post seems to about have covered everything.

Oh... one more thing. Earlier, in the original Dark Basic, I had to use their sample programs to figure out all the individual limbs an object had. It was a real pain trying to figure out how to simply turn the wheels on a car or make a mannequin rotate his arm. Is there an easier way to do this than rotate each individual limb to discover its function?

Also.. do you think you can post some commands on limbs as well?

Hope these aren't too many requests heading your way and thanks again for the lightning fast posts!

Feel like I understand text-based/2D programs well enough.

Time to move to 3D!

Login to post a reply

Server time is: 2024-11-25 22:36:50
Your offset time is: 2024-11-25 22:36:50