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 / help me, please

Author
Message
Nunez12
18
Years of Service
User Offline
Joined: 29th Dec 2005
Location:
Posted: 31st Dec 2005 02:04
I just started dark basic a month ago, i got the programming language one, well ive been trying to make simple thing such as shapes and trying to put music in and stuff like that, well ive been having some trouble. I can\'t figure out how to calculate the way to put shapes were i want them to go. I dont know if im doing the music thing wrong or what, but i cant put it in right, and i dont know how to get the colors the way i want them, i just quess on numbers and see what comes out, well, anyways, please help
SirFire
19
Years of Service
User Offline
Joined: 4th Apr 2005
Location: North America
Posted: 31st Dec 2005 07:30
Have you tried looking at the examples in the help file?
As for calculating positions, one thing I noticed about DBP is that X and Z are for horizontal position, and Y is for verticle. This threw me off a bit when I first started. That's backswards if you ask me, but somebody will probably argue that X and Y correspond to "screen" coords and that Z is the distance from you, but it still seems wrong to me b/c when working in the 3d world I seem to think of moving along a flat plain X and Y, and distance up/down from plain should be Z.

Also it's very difficult to help you with your code without seeing it. You should post code snippets and ask what to modify to do what you are wanting to do.

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 31st Dec 2005 07:39 Edited at: 31st Dec 2005 07:39
Are you talking about 3D or 2D?


You need to post code but make sure you put it in code snips.

[ code ]
Your code here.
[ /code ]

Just remove the spaces between the brackets and you see this:


If you're talking 3D here's some code that'll help you place 3D objects (it's very primitive). It uses the arrow keys to move the object and a and z to bring the object towards/away from the screen. The spacebar changes the color of the object.




MMORPG programs
18
Years of Service
User Offline
Joined: 12th Nov 2005
Location:
Posted: 31st Dec 2005 08:07 Edited at: 31st Dec 2005 08:18
um... you really need to look at the tutorials.
color object (obj#), colorvalue
in use it would be
color object 1, RGB(255,0,0)
for 3d objects
Make object cube (obj#), size
for cube there is also sphere and box, though box requires 4 dimensions. In use-
make object sphere 1, 90
for xyz coordinates- for games usually the objects are built into a map using a custom-made terrain editor which is a huge project on its own. The basic position is 0,0,0. y is up, x is across, and z is the depth making the game 3d. As for the music... you have to load the music and play it
load music "musix.mp3", (music#)
play music (music#)
[edit]
It really sounds like you've just been ignoring the manual and looking at the code.

[img]http://www.savefile.com/files/4182721 [/img]
Nunez12
18
Years of Service
User Offline
Joined: 29th Dec 2005
Location:
Posted: 31st Dec 2005 20:07
well, i did kinda skim through the manual, i never thought that you had to read through it that well, well, i'm only in eighth grade, so this stuff is pretty hard for me, but i'm getting it. Thanks

Login to post a reply

Server time is: 2024-09-24 11:28:34
Your offset time is: 2024-09-24 11:28:34