Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


BitMaster

Member Since 08 Aug 2000
Offline Last Active Today, 02:13 PM

#5162720 TILED/LUA - Integration with C

Posted by BitMaster on 25 June 2014 - 12:41 AM

That appears to be a simple Lua table definition.


#5162716 Is this multiplication formula in linear algebra true?

Posted by BitMaster on 25 June 2014 - 12:12 AM

But that is not possible since xT=!=x. What I find strange though (for example, dot product of x and xT is defined, thus their subtraction is defined, but thus subtraction of x and xT can never be a zero vector)

First, you cannot have a dot product of \(x\) and \(x^T\) (unless \(x \in \mathbb R\)). The dot product is for two column vectors \(u, v\) is commonly defined as \(dot(u, v) := u^T \cdot v\). Trying \(dot(x^T, x)\) would once again be impossible because you would have to multiply an element of \(\mathbb R^{n \times 1}\) with and element of \(\mathbb R^{n \times 1}\) which is not defined for \(n \neq 1\).
 

To every vector (matrix) exists addition neutral vector (matrix) Z
To every vector (matrix) exists multiplication neutral vector (matrix) I such that V*I=V
To every vector (matrix) exists multiplication inverse vector J (matrix) such that V*J=I

You are thinking of the ring axioms but that applies only to square matrices. You cannot even multiply general vectors together like that (as already said above), so talking about multiplicative neutral and multiplicative inverse elements for vectors does not make any sense.
In some fields (like GLSL) it can be convenient to define a component-wise vector multiplication. However, that is something completely orthogonal to standard linear algebra. The presence of this extra operator does not change anything about the theory of matrices nor does it negate associativity of matrix multiplication.

I can only reinforce Álvaro's suggestion to "go learn some math", ideally under supervision. You apparently heard of several concepts but you are lacking the attention to detail and strictness required in the field.

Álvaro: I often smell troll on these forums but with him I'm more inclined to believe he actually believes what he is saying.


#5162630 Is this multiplication formula in linear algebra true?

Posted by BitMaster on 24 June 2014 - 02:16 PM

Well, that was my argument to him in the original thread, but as he says now

I would cite now "but then you would have to test a row and column vector for equality, which just does not work.". I am comparing vectors of the same majoring (dimensions).

which has me a bit at a loss for words.




#5162515 Why does this matrix multiplication order matter?

Posted by BitMaster on 24 June 2014 - 06:17 AM

a helping true algebraic statement:
P*V*M*p=p*M*V*P  (becouse P*V*M=(M*V*P) T)


How is that even supposed to work? A matrix multiplication M1 * M2 is only defined if M1 is a (n x k) matrix and M2 is a (k x m) matrix. The result is then a (n x m) matrix. One side effect of this is that you can transpose M, V and P but the only place the vector (a (4 x 1) matrix) can be is at the right-most side. You could multiply it from the left as a row-vector p^T (a (1 x 4) matrix) but then you would have to test a row and column vector for equality, which just does not work.


#5161294 Code::Blocks: Process terminated with status -1073741819

Posted by BitMaster on 18 June 2014 - 06:25 AM

I would strongly suggest learning to work with your debugger.


#5160265 Qt Widgets resizing incorrectly

Posted by BitMaster on 13 June 2014 - 05:00 AM

I can't be certain since I don't know the widgets in question but I would assume they set different preferredHeights depending on what data they contain. It should be probably be enough to set the same non-zero stretch factor for each row.


#5160047 Why does this not compile?

Posted by BitMaster on 12 June 2014 - 08:55 AM

Well, the OP uses g++, so worst case he needs to add --std=c++11 depending on what his defaults are. Unless his gcc is really old.


#5160024 how do I create a small multiplayer game?

Posted by BitMaster on 12 June 2014 - 06:44 AM

Since you do not seem to have any experience in the area you might as well start with the ancient but still relevant Beej's Guide to Network Programming. I would strongly advise forgetting about game related usage for now and do something simple (like a very simple file server or chat program).


#5159706 White Screen Using GLEW functions

Posted by BitMaster on 11 June 2014 - 02:30 AM

That cannot work. GLEW requires an active OpenGL context before you can initialize it. I'm not sure when GLUT guarantees you an active OpenGL context (check the documentation), but certainly not before the first GLUT call.

Edit: You should really get into the habit of checking return values. Checking the result of glewInit() would have put you onto the right track much sooner.


#5159592 Why can't I access any input devices?!

Posted by BitMaster on 10 June 2014 - 02:35 PM

A) For the 15th time, I can't give you much specific information at this moment because I'm not at home and so I don't HAVE it available, except from memory, and trust me, that's very unreliable.

I'm well aware of that fact. You mentioned it several times. Still, you post pages of text without content instead of doing the reasonable thing: saying "I will post the information asked for after the next time I got home, pasting the actual errors and as much information I can gather into a file on [my USB stick equivalent] and will then paste more detailed information when I then regain Internet access on [some time].
That said, considering what you already are having problems with, doing anything in this area without some kind of Internet access will be an uphill struggle. Extremely uphill. You wouldn't even need much Internet, even a phone with a very limited datarate will do. Mostly just enough to Google a bit and having a way to post in forums like this while you work.
 

B) There IS a fair amount of information in the e-mail correspondence.  I stated the exact windows I opened and what I clicked and what I typed where.

I read it, some bits several times and I see absolutely no hints to give more specific advice.


#5159548 Why can't I access any input devices?!

Posted by BitMaster on 10 June 2014 - 11:24 AM

Despite your claims you don't ever provide any specific information. Important bits of information are:

1) what have you done?

2) what happens (including the exact verbatim error messages you are getting)?

Considering we are most likely dealing with the typical problems of someone inexperienced trying to link a library even extremely basic information regarding (2) would most likely be enough to help you (for example "C1083: Cannot open include file: 'blabla.h'").

 

The basic procedure for linking a library is always the same:

a) make sure the compiler can find the include files (failure to do so correctly will for example result in a C1083)

b) specify the path where import libraries can be found (failure to do so correctly will cause problems with ©)

c) link the required import libraries (missing libraries will result for example in LNK2001s; messing up during (b) will result for example in LNK1181)

Really, as far as libraries go you have the simple case to deal with. You don't have to compile any library yourself to ensure the runtime and compile time options match. You just have to get something linked that dropped into your lap. You might have to observe specific documented restrictions in extreme cases (some compile time options that need to be set in a specific way, runtime libraries that have to be used or even exact compiler version numbers), but most libraries like that don't require anything like that.

 

The core issue is, that after four extremely verbose posts of yourself, you still have not provided any information to help narrow down your problems into one of the categories above. As a result, helping you is nearly impossible. Very general, unspecific problems will result in very general, unspecific answers.

 

There is a lot of self-pity and complaining but the signal-to-noise-ratio is frighteningly low.




#5159507 Why can't I access any input devices?!

Posted by BitMaster on 10 June 2014 - 08:07 AM

From what I can tell from the flow of conversation setting up the basic search paths for your IDE of choice is indeed the problem you seem to be having. It's not their job to teach you that - that is like buying a book from a store and then complaining to them that you are unable to read. When they say

We are sorry you are still having issues, but the use of our lower-level
type SDK requires comfort in using the visual studio environment and the
c++ language.

I can only agree with them. The should not even have to give you any special instructions. When a developer installs a library, they will usually immediately look for the headers, import libraries and DLLs and work with them as they work with any other library.

I see no chance for you to complete your project if you cannot even master to link to a library without exact screenshots and instructions guiding your way. If you have specific problems (not the 'it does not work' we get so far) then we are probably happy to help, although I would say practically all of your problems can be solved quicker by simply googling.


#5159344 Why can't I access any input devices?!

Posted by BitMaster on 09 June 2014 - 03:06 PM

As for the Razer Hydra, it seems that their API is also for C++ (although I heard something about a wrapper for C#.  Does anyone know about this or its progress?  BTW this is supposedly the same API that will be used by STEM.)  I seemed to be able to sloppily get their DLLs and garbage imported into a simple C++ test project, in which I then just called a function to check if the Hydra is connected, and wouldn't you know it - it doesn't compile!  I got a error that the DLL is invalid or some nonsense.  I tried it with the 32 and 64 bit DLLs and neither work, though they each say a slightly different position in the file which is invalid.  I got these files directly from Sixense (they created them) and I didn't have any error downloading them or installing anything.  The drivers and everything else work, and so should this.  I don't see how there could be a problem with the files, because they're the same ones that any developers would use.  It seems like something else must be going wrong but I can't imagine what.  Has anyone been able to get this to work, and if so, how?

You seem to be doing something wrong. DLLs don't feature during compilation at all (nevertheless you claim there are compile errors). You might be describing linker problems, but DLLs in almost all cases don't feature during linking as well (the import libraries do. You are not giving the linker the DLLs instead of the import libraries, do you?). The point where actual problems with DLLs usually happen is during runtime.
Unfortunately you are not describing what you tried nor the error message (What exactly did you do? What exactly is the error message? Do not try to paraphrase errors, copy'n'paste them).

By the way, for some reason, people often mistake me for a beginner

Yes, unfortunately I can see how that would happen. You do not describe what you did and what your exact errors are in any sufficient detail to allow helping you (I picked one of your paragraphs to write something about but I could have done something very similar with all of them).
As another example your problems with the Falcon sound like you just need more accurate descriptions on where to set the include directory/library search paths in modern MSVCs. That's the usual thing you need to do with libraries. Very occasional you need something more (like disabling exceptions for some reason). If that is truly the problem you are having (and if it is not, once again: What does the description say? What did you try? What happened?) then I would strongly suggest you spend some more time with C++ in simpler scenarios. Write some programs, work on linking with a library of your own creation.
Because right now it seems you are stuck on extremely simple things and you only have two choices:
1) wait for someone to write the C# wrappers you need.
2) get more experience with C and/or C++ and write them yourself.
Since you seem to committed to this, even if it takes 20 years, starting on (2) might not be a bad idea. Worst case, you learned some new stuff by the time (1) happens.


#5158707 Vertex Shader vs Pixel Shader - Where to do processing?

Posted by BitMaster on 06 June 2014 - 08:07 AM

That's basically the difference between Gouraud shading and Phong shading. They are not the same.


#5158704 Lib folder in SDL2 missing

Posted by BitMaster on 06 June 2014 - 08:03 AM

You don't have a suitable DirectX SDK installed. Either install it or investigate if/how you can build SDL without DirectX.




PARTNERS