No sign of any uploads recently... Still working on it?
That might be a question going through some people's minds. The answer is "yes" I'm still working on it. Just much slower than before.
At the start of the project everything was working brilliantly, I'd got as far as adding an external newton into the project. I'd even got it to correctly build the physics shapes from wavefront obj files on-the-fly, and force and torque was all working too. So where did progress suddenly freeze?
The answer was the player controller. I would have to write my own so that it could be processed by a dedicated without the leadwerks graphics. Problems keep coming in when I find that I've built something that ends up needing entities. Because of course, if you have not called Graphics() and CreateWorld() you can't create entities... So far I've been able to work around, but anyone who's active on the boards will have noticed my most recent problem, posted as a status message last night.
...The problem now is that Newton always adds forces in global space. So when I want to move my player forward, I have to transform a Vec3 of (0.0f,0.0f,1.0f) into whatever the correct vector would be for the angle the entity is facing. There is the problem, TFormVector's second and third parameters are entities, so graphics needed. Josh came to the rescue with some source code in an email. I believe it's meant to be private, so I won't post it here. The problem is it's BlitzMax code, so it doesn't translate exactly.
- The code has a TMat4 data type, but my version of the engine does not. From reading the wiki, I have changed these to TVec16 but then there's another problem
- It does something like this:
TVec16 TempMatrix; TempMatrix.inverse();
- TVec16 in the C interface does not have an inverse function, and I can't seem to find command in the wiki that would do this. In fact, if you press the "dot" key after a declared matrix, visual studio will show you 16 fields: A0, A1, A2, A3, B0, B1, B2, B3, C0, C1, C2, C3, D0, D1, D2, D3 ... A TVec16 does not seem to have any other members that I can find.
The other problem is that I can't build an inverse function myself because I have no idea what it is supposed to do. One thing about me is that I did not do A-level maths. My uni course covered matrices very briefly. We were taught, as an example "Here are two matrices -> this is how you multiply them together" . That much, I can do, but we were never shown what they might actually be used for. I have no idea what the inverse of a matrix is... Reverse the order? Flip the rows and the columns with each other? I just don't know.
I would ask Josh, but he has already provided enough help, even when he didn't have to. I'm sure he's busy enough with the next version of the engine, that he doesn't really have time to spoon feed what is probably basic level stuff, and so it would be just plain wrong (and selfish) to ask ('nag' may be a more appropriate word).
It's depressing stuff, which has brought the development speed of my project almost to a complete stop. But I've not totally given up on the project... Not yet.
9 Comments
Recommended Comments