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 Professional Discussion / Any chance of some help with the 3d maths commands?

Author
Message
Darclyte
23
Years of Service
User Offline
Joined: 13th Jun 2003
Location: Cydonia, Mars
Posted: 3rd Sep 2003 01:09
I've been working away with DBPro for a while now, and I'm getting along fine. But I can't help feeling I'm missing something:

The help files are great with the exeption of the 3d maths section. There are reams and reams of commands in there with very little explanation as to what they actually do! I can't even work out if they're useful or not. What are Matrix4, Vector2,3 & 4, LH FOV Matrix4 and suchlike all about eh? What on earth would they be used for?

Anybody?

Strings are PChars ??????? What a World
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Sep 2003 01:12
It's not just the math helps, it's all of the help concerning 3d, the help files are horrid! It makes it difficult for a good programmer, new to db and 3d, to find useful commands and full explanations. It's like you have to already know DB to learn DB



-RUST-
Darclyte
23
Years of Service
User Offline
Joined: 13th Jun 2003
Location: Cydonia, Mars
Posted: 3rd Sep 2003 01:16
I must admit, I have been using DB Classic for ages so DBPro wasn't such a big leap. So you may be right. Trial and error were my best friends for a long time. But I can't even work out what to try the 3d maths stuff on???

Strings are PChars ??????? What a World
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Sep 2003 01:23
I know what you mean. I program in VB6 and VB.NET so learning DBC and DBP was no big leap (a step backward in most cases) but I never really heavily explored db until now (DBP) and I am finding great commands by accident, or coding long-winded routines only to find later that there was a built in command for what you wanted. I am not sure but it seems to me that the documentation/help for dbp was written by programmers which is a mistake (if true) because the will write it from a coders point of view, where it should be written by a documentation specialist - Even though the audience is going to be mainly programmers, DBP n00bs like me won't find what we need because the doc/help is seriously lacking full explanations

just MHO

-RUST-
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 3rd Sep 2003 16:41
Neither of you is alone. One of the constant refrains I have read in these forums are numerous complaints about the abject lack of proper explanation of the powerful 3d maths commands.

For my part, I agree entirely. I am not new to programming. Moreover, I have what I would modestly describe as a good grasp of 3d maths as I understand vector maths and matrix maths. However, even I find the 3d maths commands practically incomprehensible due to their lack of detailed explanation.

To my mind this is a serious flaw with DB Pro as it impacts adversely in the functionality programmers can get easily out of the language. This is all the more the case given that TGC hold out DB Pro as being easily accessible and usable even by the novice programmer, let alone by more experienced people.

I also note generally that the help files have a number of problems. For example, the maths showcase example is actually incomplete (it ends with the incomplete command print "if a b is"; : if a" - what is that??) and there are help files missing for various commands. Print C is the classic example of that. The overall impression I am left with is that the documentation is, on the whole, shoddy. This is a very great shame as otherwise the product is excellent.

In summary, DB Pro is an excellent product which is sorely let down by the quality of its documentation. I think Lee should shoot whoever is responsible for this.

In terms of solutions, it is my hope that we can persuade some of our more enlightened brethren to post more detailed explanations of individual commands, together with commented examples, in the showcase.

Phil

What do you mean, bears aren't supposed to wear hats and a tie?
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 3rd Sep 2003 16:48 Edited at: 3rd Sep 2003 16:49
The thing is, to use the 3dmaths commands you need to know all about 3dmaths in general.
You don't just find a definition for each command, as the description is probably adequate for you if you're at the mathematical level when they're used.

(I'm no expert)

A matrix is a grid of numbers like so:
0 : 1
1 : 0


You can do operations to them to modify and manipulate a matrix.

To understand how they are used you need to know about really cmoplex maths, and I'm talking a-level here. I'll read up on them and report back.

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 3rd Sep 2003 18:39
and I'm talking a-level here

Bah! I have A levels in physics and maths, plus some even more advanced maths as part of my CompSci degree, and I haven't got a slightest clue as to what the hell the maths commands in DB do. They don't teach you about manipulating matricies and other 3D maths at A level.

The whole documentation needs a serious overhaul. Nuff said really. Even the commands that have a page of explanation (which are few and far between) are often badly worded and don't properly explain the functionality. To be fair, at least its in simple terms - if you look at context sensitive help for C++ environments for example, they go out of their way to confuse you as much as possible. Instead of saying "this commands adds a to b" they'll say something like "structurally, this process reassigns a combinational value of variables a and b to a addtional construct inserted into a with nobs on and a jar of pickle". So well done db team for keeping the manual in english .... just more english would be helpful.

Insiiiiiiiiiiiiiiiiiiiiiiiide!
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 3rd Sep 2003 18:51
I'm afraid I have now idea what's covered in a-levels it was just a passing thought.

OK, matrices in simple are a list of values:

a : b
c : d

You can perform simple functions on them like addition:

a : b + a1 : b1
c : d + c1 : d1

=

a+a1 : b+b1
c+c1 : d+d1

and the same goes for subtraction etc.

TRANSPOSING
----------------------

A matrix is transposed where the matrix values are swapped diagonaly with each other:

1 : 2
3 : 4

becomes

1 : 3
2 : 4

You can multiply / divide a matrix by a scalar, like so:

1 : 2
2 : 1 * 4

=
1*4 : 2*4
2*4 : 1*4

Okay now there are acouple of special matrices. They are the zero matrix and an identity matrix.
A zero matrix produces the followign result when added to any other matrix:
0 : 0
0 : 0

An identity matrix is one that produces the following matrid when added to any other matrix:
1 : 0
0 : 0


I'm not sure if even I understasdn that last bit not very clear in my Big Book of Game Developement Knowledgeâ„¢

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Kendor
23
Years of Service
User Offline
Joined: 31st Jan 2003
Location: Malta
Posted: 3rd Sep 2003 19:09
An identity matrix is:

1 : 0
0 : 1

When multiplied with another matrix, the result is the matrix itself.
(if something is wrong, it's not my fault , well actually it is )
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Sep 2003 19:47
I agree with what was stated above the DBP is an excellent product (aside from the help) I know in this, and other posts, I have been severely critical, but it comes from the frustrations of having this powerful "toolbox" in front of you but not being able to choose the right tool, or even see all the tools hidden way down in the bottom (sorry for the silly analogy) I just get ticked-off because I have some sick ideas but can't quickly unleash them in code (which dbp portends you can do - and is only true to a degree) Another point about dbp is that the IDE (which is 100 times better than dbc, and greatly improved over DarkEdit (I know guy wrote DE and this IDE-this is not a slam)) really needs to have some more features included commonly found in other development IDE's like Visual Studio6/.NET - just simple things like Invalid Cast Flagging, Option Explicit, Option Strict, Debug Assertions, a better Debugger Interface, and some sort of rudimentary Intellisense would be nice. Also variable scope is weak in dbp, and functions need to be retuned because as they are they are weak at best. Anyway, I know most of this won't happen but I was just venting, and hoping for the best. I'll gladly take rewritten Help Files if that's all I can get - and go from there.

Thanks - No disrespect intended to TGC/DBP Teams, if it wasn't for DBP I'd never be able to create any kind of 3d games for windows, so I am thankful, actually.

-RUST-
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 3rd Sep 2003 20:15
It would help if you are aware that all the commands in 3D Math are closely resembles to those 3D Math function in DirectX SDK (almost one to one mapping). So, you might wanna try to flip thru the MSDN help, find the related commands, and read it for more info.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 3rd Sep 2003 20:21
IMHO Option explicit / strict is something the compiler deals with, no?

Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Sep 2003 21:04
David89, not from my experience. If you have Option/Strict or Explicit ON, the IDE immediately flags Undeclared Variables and Invalid Casts as you type them - not when you attempt to compile and run the program.

maybe my terminology is wrong in the previous post, but this is what I meant as far as Visual Studio is concerned.



-RUST-
TheOneRing
22
Years of Service
User Offline
Joined: 28th Aug 2003
Location: Right here.
Posted: 3rd Sep 2003 22:08
That would be the compiler. I'm assuming you're referring to VB. The VB compiler probably (like most compilers today) uses a prescan. Checking for Option Explicit violations would happen in the prescan (more than likely).
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 3rd Sep 2003 22:49
option explicit could be done either by the compiler or some form of pre-processor or even the ide its self.

In visual basic (v4 at least) the ide does a lot of checking before the compiler is involved.
If for example you delclare MyVar when you type myvar in the ide scans the line sees myvar and changes it to MyVar giving a visual indication it's spelt correctly, if you spell it myvae it won't capitalise.

I would be possible to rename the dbpro compiler and repace it with a program that checked the input files then called the renamed compiler and reported any undeclared variables. This would work with the current ide.
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Sep 2003 00:32
The one ring

me thinks that's where the term Pre-Compiler comes from. I just call it the IDE as the precompiler is always running in the IDE. The "compiler" to me means the actual process of converting all the nice english-high level crap we typed, into the low level machine code, but, hey, who cares right? As long as the program runs as expected

-RUST-
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 4th Sep 2003 01:37
Quote: "I think Lee should shoot whoever is responsible for this."


HAR! Would Hari-Kiri not be more appropriate?

Pneumatic Dryll
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 4th Sep 2003 18:10
I read above some helpful comments about where further explanation can be found. The reference to DirectX on Microsoft's website being one such.

My point is that in a language which holds itself out as being high level (which it is) and easily accessible to novices, one should not have to wander elsewhere seeking written documentation assistance from external third parties.

I get the impression from what I have read of TGC that they are very entrepreneurial. I greatly admire that. I think one solution to the documentation dilemma is to use the same entrepreneurial flair. If TGC don't want to write really detailed explanations of the 3d maths commands, maybe they could find a skint but reasonably eloquent maths postgrad and bung him a couple of hundred quid to do this instead?

Phil

What do you mean, bears aren't supposed to wear hats and a tie?
Ermes
23
Years of Service
User Offline
Joined: 27th May 2003
Location: ITALIA
Posted: 4th Sep 2003 18:14
3d maths, i think only who make DBpro knows how it work.And i'm not sure of this.
There is here someone who really know how to use 3d maths???
If the answer is yes, please write a tutorial, or Lee, please, write a tutorial about it.Who already know 3d maths, don't need to program using dbpro, where they are professional programmer using c++ , delphi or whatever.

Free Download for a Free World

Login to post a reply

Server time is: 2026-07-23 14:56:24
Your offset time is: 2026-07-23 14:56:24