Jump to content

TylerH

Members
  • Posts

    525
  • Joined

  • Last visited

Everything posted by TylerH

  1. By law, the guy who wrote Awesomium can't legally charge money for it. You can't wrap a library that is entirely open source, publicize your source code, and then force people to pay $5,000 for it. You could simply use the library with any disregard for the guy's license, considering, last time I checked, Google > Single Programmer, atleast in legal power.
  2. If you follow the way RakNet does it: Server and Client extend Peer. This way servers and clients can both connect to other servers/clients, offering both client-server setup and peer-to-peer without any additional coding.
  3. Yay for no one looking at my debug.Trace library I posted a month or so ago?
  4. There is a difference between the Red Maestro cards and the Blue Maestro cards, one being that security code, if I recall correctly. And for anyone unaware, I believe Maestro is a Mastercard subsidiary for non-US countries?
  5. Awesome Chris. Glad to see you got everything working
  6. Where do you get your facts Josh? UDK uses Lightmass, and it also utilizes model instancing AND texture streaming, with no problem. So there is a way to overcome your "instancing is impossible situation".
  7. The easiest way to do this is to use a Lerp function on the entity position and just call PositionEntity.
  8. Just to let everyone know I am BACK to working on this wonderful little project. I found that the bugs were infact that issue with the editor and AppSpeed starting to become a little messed up after a while (seems like after opening and closing Leadwerks Editor or Leadwerks-based app 25 or so times it occurs), but a simple restart or even log off and re-logon fixes it, so I can continue bug free where I left off: Bullet Penetration. I had also kind of been tied up experimenting and porting some stuff to UDK for a new project experiment, and it was taking up a bit of time. Cheers, Tyler
  9. They are more complex than that, since the W component can be imaginary. The beauty of quaternions is: x^2 == y^2 == z^2 == x*y*z == -1
  10. I lost track of this thread. There are helper functions that convert Quats to Euler Angles, among other things. I did not implement conversions because that is up to the end user. Internally it makes calls to STL math functions that take radians, however, the actual parameters a Quat stores aren't Euler Angles in either degree or radian form, so the difference wouldn't exit. The only time you need to deal with Rad/Deg conversion is with the Euler Angles To/From. Glad to hear you got it working. I haven't been very involved lately due to some school stuff.
  11. Maybe you guys can create a combined version that takes the best of both for an official version that can be stickied?
  12. Someone has recently been playing with UDK. Did you read my MSN status and decide to try it out? The only thing(s) I found cool were the fracture tool and the fluid surfaces, both of which could be done in Leadwerks by the community if you tried hard enough.
  13. Ryan forgot to mention that the model is animated. Also, we know that the model is dark because the artist did not setup smoothing groups properly.
  14. All of your DLLs, content, etc. usually needs to be in the same directory or be relatively loaded from the invoker (in this case the Lua script).
  15. Attached is the ZIP with all the code. Locomotion.zip
  16. You need the Transform struct as well: #include "SVector3.h" #include "SQuaternion.h" struct Transform { Transform(TEntity entity) { this->entity = entity; TVec3 v; v = EntityPosition(entity,1); this->position = Vector3(v.X,v.Y,v.Z); v = EntityPosition(entity,0); this->localPosition = Vector3(v.X,v.Y,v.Z); v = EntityScale(entity); this->scale = Vector3(v.X,v.Y,v.Z); v = Vec3(0,1,0); v = TFormVector(v, entity, NULL); this->up = Vector3(v.X,v.Y,v.Z); v = Vec3(0,0,1); v = TFormVector(v, entity, NULL); this->forward = Vector3(v.X,v.Y,v.Z); v = Vec3(1,0,0); v = TFormVector(v, entity, NULL); this->right = Vector3(v.X,v.Y,v.Z); v = EntityRotation(entity,1); this->rotation = Quaternion(Vector3(v.X,v.Y,v.Z)); v = EntityRotation(entity,0); this->localRotation = Quaternion(Vector3(v.X,v.Y,v.Z)); } TEntity entity; Vector3 position; Vector3 localPosition; Vector3 scale; Vector3 up; Vector3 forward; Vector3 right; Quaternion rotation; Quaternion localRotation; }; And the math classes too. So if you don't have any, let me know and I will zip them up for you.
  17. It isn't done, but this will IK solve hella-fast: void IKSimple::Solve(std::vector<Transform> bones, Vector3 target) { float num6; float num7; Transform transform = bones[bones.size() - 1]; std::vector<Vector3> vectorArray; std::vector<float> numArray; std::vector<Quaternion> quaternionArray; for (int i = 0; i < (bones.size() - 2); i++) { vectorArray[i] = (bones[i + 1].position - bones[i].position).Cross(bones[i + 2].position - bones[i + 1].position); vectorArray[i] = (Vector3) ((bones[i].rotation.Inverse()) * vectorArray[i]); vectorArray[i].Normalize(); numArray[i] = (bones[i + 1].position - bones[i].position).Angle(bones[i + 1].position - bones[i + 2].position); quaternionArray[i] = bones[i + 1].localRotation; } std::vector<float> numArray2; float num2 = 0.0f; for (int j = 0; j < (bones.size() - 1); j++) { Vector3 vector = bones[j + 1].position - bones[j].position; numArray2[j] = vector.Magnitude(); num2 += numArray2[j]; } this->positionAccuracy = num2 * 0.001f; Vector3 vector2 = transform.position - bones[0].position; float magnitude = vector2.Magnitude(); Vector3 vector3 = target - bones[0].position; float num5 = vector3.Magnitude(); bool flag = false; bool flag2 = false; if (num5 > magnitude) { flag = true; num7 = 1.0f; num6 = 0.0f; } else { flag2 = true; num7 = 1.0f; num6 = 0.0f; } int num8 = 0; while ((abs((float) (magnitude - num5)) > this->positionAccuracy) && (num8 < this->maxIterations)) { float num9; num8++; if (!flag) { num9 = num7; } else { num9 = (num6 + num7) / 2.0f; } for (int k = 0; k < (bones.size() - 2); k++) { float num11; if (!flag2) { num11 = math::Lerp(180.0f, numArray[k], num9); } else { num11 = (numArray[k] * (1.0f - num9)) + ((numArray[k] - 30.0f) * num9); } float angle = numArray[k] - num11; Quaternion quaternion2 = Quaternion::Quaternion(vectorArray[k],angle) * quaternionArray[k]; bones[k + 1].localRotation = quaternion2; } Vector3 vector4 = transform.position - bones[0].position; magnitude = vector4.Magnitude(); if (num5 > magnitude) { flag = true; } if (flag) { if (num5 > magnitude) { num7 = num9; } else { num6 = num9; } if (num7 >= 0.01f) { continue; } break; } num6 = num7; num7++; } bones[0].rotation = Quaternion::Quaternion(AngleAxis::AngleAxis((transform.position - bones[0].position).Cross(target - bones[0].position), (transform.position - bones[0].position).Angle(target - bones[0].position))) * bones[0].rotation; }
  18. TylerH

    collisions

    I was doing pretty much the same thing. I was creating a trigger entity a few weeks ago, and this was the same problem. To be honest Rick, every problem you are just now posting about, Vex came around and dropped because of stupid bugs like this (or missing features I should call them).
  19. Possibly, I assume I have you on Windows Messenger already?
  20. Pretty interesting. I had to remove the Vec3(0,0,0) from SetBallJointLimits for it to compile though.
  21. Removing the recreation of the char* buffer every frame and turning on asynchronous rendering only gained me a few frames.
  22. Muahaha. In-game advertising anyone?
  23. I agree that Leadwerks is the best, I do think that chart is a bit unfair though. For the price, you are getting many times over the cost of your investment in Leadwerks Engine.
  24. Just to do some splainin: That web view listener could be much more robust. Right now, I use a hacky static boolean so that we don't try blitting the web view to the texture while it is loading (if you do, it will hang the program), and simply disable rendering while loading, and re-enable it when finished (this is infact what most browsers will do unless streaming the page). There is no keyboard input, becuase it requires you to use some Win32-style structures that I don't know much about. The mouse input is slightly dodgy. This is rendered in realtime, and the FPS is kind of horrid as you an tell. Ways to improve this would include not re-creating the huge char* buffer every frame, utilizing Awesomium's asynchronous (Stream) rendering, using Awesomium's Rendered Rect to determine what parts of the web page have changed and need redrawn, among other things.
×
×
  • Create New...