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 Discussion / how to make walls in a corner?

Author
Message
sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 29th Nov 2006 19:09
i made a wall like this:

--------

and now i want to turn a corner:

--------
|
|
|
|
|

how can i do this?
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 29th Nov 2006 19:17
Did you just use a box for the wall? If so, just make another box.

sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 29th Nov 2006 20:26
yeah but how can i make that box vertical instead of horizontal?
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 29th Nov 2006 21:32


hope this helps try using the tutorials on the cd

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 29th Nov 2006 21:40
You just use different coordinates. In 2D there are only 2 coordinates the x (which is left to right) and the y (which is up to down). The upper left corner of the screen is 0,0. The lower right is (if your resolution is 640x480) is 639,479. So if you want a box that has a skinny width and a large height you have a small number for the x coordinate and a bigger number for the y coordinate.

Like:
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 29th Nov 2006 21:45
are you using 2d or 3d?

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 29th Nov 2006 23:30
For us to help you, you need to explain your problem properly - we can't see your program like you can.

As The Wilderbeast points out, what you do depends on whether you are writing a 3D program or a 2D one, (with DB you can do both).

If it is 3D then, as has been already stated, you use boxes.

MAKE OBJECT BOX 1, 1, 1, 1

The last 3 numbers are the width, height and depth of the box and in this case would result in all dimensions being the same (a cube).

To make a wall shape, simply make the width value the biggest, and the depth value the smallest. The height value is set to somewhere between. Eg:

MAKE OBJECT BOX 1, 10, 5, 1

As long as the relationship between the sizes is what you want, you can re-use them for other walls, rotating them about the Y axis and moving them into position.

You also have the Scale Object function which can increase the size of the walls as an alternative to using bigger values in the Make Object Box command.

You really do need to read the help files and as many tutorials as you can to get the basics.

TDK_Man

sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 30th Nov 2006 17:51
ok tnx i got it now i needed to turn it 90 degrees. the wilderbeast was right.
The Wilderbeast
19
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 30th Nov 2006 18:40
nice to have you back TDK

Good luck with your programme sjonny

sjonny
18
Years of Service
User Offline
Joined: 25th Nov 2006
Location: darkbasic classic
Posted: 30th Nov 2006 20:36
well i still have a question i got the wall now but the collision only works horizontaly. how can i make it in the wall?

Login to post a reply

Server time is: 2025-05-27 19:04:50
Your offset time is: 2025-05-27 19:04:50