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
BigApe
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Greece
Posted: 13th Dec 2007 19:30
hi, can you elucidate for me (angle) code in dbpro...!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 13th Dec 2007 21:27
Why this recent spate of meaningless questions I wonder?...

Anyway, as your question doesn't ask anything precisely, here's one possible answer you might be after:

Objects spin in 3D through 3 axis - X, Y and Z.

Imagine a cube with a hole running through it placed on a vertical flag pole. Spin the cube and it rotates around the Y axis.

Now imagine that cube on the handlebars of a bike. Spin the cube away or towards you and it rotates around the X axis.

Finally, imagine the cube on the lance of a jousting knight on horseback. Spinning the cube left or right rotates around the Z axis.

The complete rotation of an object is 360 degrees, starting at 0 and to rotate it 10 degrees, you simply add 10 to it's current angle on the required axis.

To stop such an addition taking the angle outside it's 0-359 degree range the WrapValue() function automatically wraps the value around when it gets to 360.

So if on the Y axis object 1 is currently at 350 degrees and you want to rotate it another 20 you would use:

YRotate Object 1,WrapValue(Object Angle Y(1)+20)

This would result in object 1's resulting angle being 10 degrees - not 370.

The same can be done in reverse using -20 instead of +20 to rotate an object in the opposite direction.

All of this is covered in the many tutorials on this web site. Check the stickies at the top of the Dark Basic board for some beginners tutorials as well as those at the top of this one.

TDK_Man

BigApe
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Greece
Posted: 13th Dec 2007 23:17
thank you but why you angry? ok no problem
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 13th Dec 2007 23:59
I think you'll find he's more irritated that your question has no substance. It is courtesy to show what you have tried when you ask a question, rather than expect somebody to do all the work for you.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 14th Dec 2007 01:26 Edited at: 14th Dec 2007 01:28
Also, most people will be much more willing to answer your questions if you have a useful thread title.

Useful:
"Problem with Angles"
"Can someone explain angles?"
"Angle Help"

NOT Useful, And will make most people regard you as a complete noob:
"Can u..."
"HELP!!"
"I need help!"
"Is this possible?"


"Ok, so that wasn't funny. I don' have any good Christmas jokes."
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 14th Dec 2007 08:07 Edited at: 14th Dec 2007 08:08
A simple question

randomize matrix command.
Even if I execute it how many times,
The same answer returns.

Is this right?
PresFox
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location:
Posted: 14th Dec 2007 10:05
do you run update matrix?

Microsoft isnt evil, they just make really crappy operating systems -- Linus torvalds
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 14th Dec 2007 10:33 Edited at: 14th Dec 2007 10:42
A picture same in every time.
re-run.

This programs.
PresFox
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location:
Posted: 14th Dec 2007 12:20
hmm, you are correct, it does give the same matrix every time

Microsoft isnt evil, they just make really crappy operating systems -- Linus torvalds
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Dec 2007 12:38
The matrix is different for me each time, so there's no problem with the code.

It might look similar because the matrix is only 4x4, but it is different each time.

TDK_Man

pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 14th Dec 2007 12:47 Edited at: 14th Dec 2007 12:54
RANDOMIZE timer() is invalid.
Understood; thank you.


to TDK
DBC and DBP work different.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Dec 2007 15:45
Oh OK - didn't realise that. I did only try it in DBC, so my apologies.

TDK_Man

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Dec 2007 16:44
I ran some tests to show that the randomize timer() does produce random results in DBP, but does not work with randomize matrix. It is odd that it works in DBC but not DBP. Is it possible to generate a truly random matrix each time in DBP?

LB
Jeff032
17
Years of Service
User Offline
Joined: 13th Aug 2007
Location:
Posted: 14th Dec 2007 17:59
If you repeatedly call randomize matrix, it changes...so you could do it a random number of times, might be a bit slow though...

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Dec 2007 19:43
okay, thanks. It would be nice if there was a more efficient solution.
BigApe
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Greece
Posted: 14th Dec 2007 21:41
no I will make game ,and I hear much about angle so I ask yours thank yours
da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 14th Dec 2007 23:56
You forgot to include the 'sync' command in your loop




-Dan


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Dec 2007 12:45
It is odd to have a do-loop that has nothing in it. Why not just use 'wait key' or something to that effect?

LB
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 15th Dec 2007 14:00 Edited at: 15th Dec 2007 14:00
A simple question

use "SET SPRITE"command.
It is very slow
Why?

I show a program of Newsletter as an example.
TEST1: standard
TEST2: add "SET SPRITE"
I attach it.

Attachments

Login to view attachments
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 15th Dec 2007 14:29
OK, thank you.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Dec 2007 17:34
Quote: "You forgot to include the 'sync' command in your loop"


I'm not 100% certain with DBP, but (the previous reason for not requiring a Sync notwithstanding), doesn't Update Matrix automatically do a Sync anyway?

TDK_Man

da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 16th Dec 2007 01:15
But sync refreshes the screen, AKA showing everything. That is why I got mixed up.

Quote: "
No, he didn't. You don't call SYNC without turning sync on first. And if you don't turn sync on, you don't need SYNC at all."


Sync is always on, unless commanded otherwise, with the Sync Off command. The same with the backdrop.




-Dan


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 16th Dec 2007 07:51
A theory of SYNC is simple.
However, SYNC of DBP is complicated.
SYNC is handled automatically.
Works of SYNC are different by conditions.
A combination of (text, 2D,3D).
Somebody,
I want you to explain automation of SYNC.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th Dec 2007 18:28
Yup - I think of it as the MANUAL SYNC FLAG. "Manual" Sync On and "Manual" Sync Off

BigApe
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location: Greece
Posted: 20th Dec 2007 01:00
hey guys what this dealing???? ok thank you for all
pcRaider
17
Years of Service
User Offline
Joined: 30th May 2007
Location:
Posted: 21st Dec 2007 08:39
A simple question

A part to a manual without explanation.

CLONE OBJECT ObjectNumber, SourceObject, Shared_Data_Flag
What is a meaning of "Flag"?

COMPILE CSG Input X File, Output X File, Epsilon
What is a meaning of "Epsilon"?

Login to post a reply

Server time is: 2024-09-27 08:32:03
Your offset time is: 2024-09-27 08:32:03