Jump to content

Shard

Members
  • Posts

    293
  • Joined

  • Last visited

Everything posted by Shard

  1. We weren't. We were informed ex post facto. In the 2.23 release thread and the update log file. However, it seems that it hasn't been dropped but rather integrated into the core engine itself.
  2. So got a new question: how do I use it? I looked at this post: http://leadwerks.com/werkspace/index.php?/topic/741-video-playing-example/page__view__findpost__p__6579 to see if I could use it as an example but Visual Studio says that it can't find the .h files. And rightly so, they aren't in the download. So how do I include the stuff so that I can actually use em?
  3. So what happened to Framewerk? I had several Framewerk pointers all over my code because several different classes needed access to it but its now gone. I think I read somewhere that it has been integrated with the engine. How do I access it now? Edit: The log says that Framewerk has been integrated with the engine but not how to access it.
  4. Thanks for your suggestions. I took your idea and added a static Level pointer to the Trigger class. That solved all my problems. On a lesser note, where did you get the images in your signature?
  5. I don't need physics. I just need the model position, rotation and size (after scaling) so that I can parse those in my code and then create a physics body in code. Is there some way I can do this now? The project is due in two weeks >,>
  6. Ok, so I've got a small mess in code here.] Basically, I'm creating a trigger system where the player collides with a box body and activates the events that are stored with that Trigger. So below is the Trigger Class: struct Trigger { TVec3 pos; TSound *music; TSound *speech; string scene; TBody body; int usable; int characterLoadID; Trigger() { this->music = NULL; this->speech = NULL; } }; So when I create the box body, I SetEntityUserData(trigger->body,(byte*)trigger); and then SetEntityCallback(trigger->body,(byte*)TriggerCollision,ENTITYCALLBACK_COLLISION); And thats where I start to face my problems. I need to check if the player collides with the box body and then activate the ActivateTrigger Function inside my Level class. But it seems like I can't put the TriggerCollision Callback inside my Level handler class because when it tries to cast to the byte* it says it can't cast to a class bound function. So I had to remove it from my level class. But only the TriggerCollision Callback function can ActivateTrigger function, but that is inside the Level Class. Confused? I am. Hopefully this helps: What I Need Initializing: Load::LoadTriggers -> CollisionCallback -> Level::TriggerCollision Running: Level::TriggerCollision -> Level::ActivateTrigger What I'm Forced To Do Initializing: Load::LoadTriggers -> CollisionCallback -> TriggerCollision //Note that TriggerCollision isn't inside a class so that I can CollisionCallback to it Running: TriggerCollision -> ?? //I need Level::ActivateTrigger but I don't have anyway to access it! I'll attach my .h and .cpp files so that you can take a gander at it but I've only included the relevant files (Load and Level) so there will be some missing files. Problems.zip
  7. So what happened to Framewerk? I had several Framewerk pointers all over my code because several different classes needed access to it but its now gone. I think I read somewhere that it has been integrated with the engine. How do I access it now?
  8. Thank you for uploading this, you are a life (and Project Grade) saver. Is this library usable for commercial games for us to make and sell, in case we ever decide we want to pursue making a commercial version of our game in the future?
  9. You sir are my hero. If I had 50 golden stars, you would get 51 of them. Thank you for the speedy and accurate response. I owe you.
  10. How do you guys render your cut-scene videos (in C++) My teammate has been looking into using the library created by NeHebut the render quality is *horrible* (see attached image) and doesn't play any audio. I've looked into some other libraries, like Bink Video but I find that my bank account is $6000 lacking. Also, another thing that I'm thinking about is rendering to the window that the game is running in. For example, if we have a mission and a cut scene happens in the middle of a mission, it needs to be rendered to the same window. How would I go about doing that? I know that Josh isn't a fan of cutscenes (I vaguely remember an old Leadwerks forum thread), however we are required by our school to include some sort of narrative in our games and Porche has already begun the creation of the cut scene which he will render to into avi or whatever format we need it in. So, what do you guys use?
  11. Loss of collision is fine because I just parse in the object in code can create a Trigger object based off of it's properties. Edit: I just updated to 2.32 but the scaling was just the same, not working.
  12. Hey all. I know scaling has had issues in the past but I thought that particular problem was fixed. Currently I'm trying to run a trigger system that where I can drag and drop a semi-transparent box in the editor and then scale it however necessary to create a collidable trigger zone. Of course, the scaling doesn't stay after I close the window and everything in code goes to hell :/ How can I make the scaling stay correctly? In a situation like this, I can't create new objects in 3DS because each time the box is created is a variable size depending on the usage, i.e. a wide box for trigger on an outside map, versus a small box for a trigger on an inside level.
  13. Sorry, I meant team size.
  14. Thanks for the update. I've been trying to download the Update for a few days but every time I do, it stalls out and goes corrupt. Could you elaborate a little more the day-night cycle? I know Josh mentioned it in one of his blogs but, as above, I haven't had a chance to try it out.
  15. So for Naughty Alien, how *big* is your development studio?
  16. Just letting you know, I'm also getting a rendering issue. I believe this one has something to do with the buffer not being cleared before being draw to (but thats with my limited knowledge of rendering to screen). Maybe something in Framewerk? Attached is our character reloading in front of a boxcar.
  17. I love how you say its early in the engines life cause Leadwerks is the greatest thing since canned bread for me.
  18. This happens even before I start the animation. As for a demo, I'm going off of the Animation tutorial directly.
  19. Sorry for posting this here, but no one has come up with a working reply in the C++ thread. I have a character model whose head I need to parent the camera to. So I position the camera correctly, do a FindChild on "Bip01 Head" and Parent it. But when I run the game, the camera is titled side ways. So I tried to do a get/set rotation on the camera before and after the Parenting command with no luck. The reason I need to do this is because I want to turn the head in code and have the camera follow the head, so that when the player wants to look left, I turn the head left and the camera follows and turns left. Another major reason is that the head has some animations, like a head bob and reload, where the head moves and I want the camera to move with it. Current Steps 1) Load Model 2) Find Child Head 3) Position Camera To Head 4) Parent Head to Camera 5) Rotate Head Edit: I've found a way to make the screen turn back to the proper orientation but then I can't look around using the mouse anymore, and I've tried both TurnEntity and RotateEntity. What is the proper way to do what I need to do?
  20. Thanks Pixel. This is definitely a handy tool. Just a quick question, does it just measure the time doing the funtion?
  21. No luck. Same effect. Even tried a manual get/set pos and get/set rotation. No luck. Also, see the related thread here: http://leadwerks.com/werkspace/index.php?/topic/1927-find-child-entity-matrix-all-messed-up-bug/
  22. I've been trying to parent the camera to the head of my character (after failed attempts with my model, I'm now testing with Crawler from the tutorial) and after some debugging, I've found that the position and rotation for the child head is all messed up. The Y and Z positions are all off. This is code from the tutorial with my debug code in it. Using break points you'll see that the head pos and rotations are all off. #include "engine.h" int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR lpCmdLine, int nShowCmd ) { Initialize(); //Create a graphics context Graphics(800,600); //Create a world if (!CreateWorld()) { MessageBoxA(0,"Error","Failed to create world.",0); goto exitapp; } //Create a camera TCamera cam=CreateCamera(); CameraClearColor(cam,Vec4(0,0,1,1)); MoveEntity(cam,Vec3(0,0.85,-2)); //Create a render buffer for lighting TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL); //Create a spot light TLight light=CreateSpotLight(); RotateEntity(light,Vec3(20,45,0)); EntityColor(light,Vec4(2,2,2,1)); MoveEntity(light,Vec3(0,0,-5)); SetShadowmapSize(light,1024); AmbientLight(Vec3(0.1)); //Load the animated mesh TMesh mesh=LoadMesh("abstract::crawler.gmf"); TEntity head=FindChild(mesh,"Bip01 Head"); //Main loop while(!KeyHit(KEY_ESCAPE)) { TVec3 pos2 = EntityPosition(mesh); TVec3 pos = EntityPosition(head); TVec3 rot = EntityRotation(head); if (KeyDown(KEY_LEFT)) { TurnEntity(head,Vec3(0,0.5,0));} if (KeyDown(KEY_RIGHT)) { TurnEntity(head,Vec3(0,-0.5,0));} if (KeyDown(KEY_UP)) { TurnEntity(head,Vec3(0.5,0,0));} if (KeyDown(KEY_DOWN)) { TurnEntity(head,Vec3(-0.5,0,0));} //Animate the mesh //Animate(mesh,AppTime()/100.0,1.0,0,true); UpdateWorld(); SetBuffer(buffer); RenderWorld(); SetBuffer(BackBuffer()); RenderLights(buffer); Flip(); } exitapp: return Terminate(); } Please see the related thread here: http://leadwerks.com/werkspace/index.php?/topic/1916-parent-entity-screwing-up-entity-rotation/
  23. So I am trying to parent the camera to my characters head for a first person view. Of course I go ahead and find the child head and create a mesh for it and all that. When I go to parent the camera to the head, the camera get tilted into one side. When I comment out the parenting, then its just fine. //Parenting and Not Working EntityParent(frameWerk->GetMain().GetCamera(),head); Not much more to it than that. I even tried getting the camera rotation before parenting and then setting it back to that rotation but that didn't work. //Recording, Parenting and Resetting TVec3 rot = EntityRotation(frameWerk->GetMain().GetCamera()); EntityParent(frameWerk->GetMain().GetCamera(),head); RotateEntity(frameWerk->GetMain().GetCamera(), rot); What should I do to fix this?
×
×
  • Create New...