Jump to content

Fosef

Members
  • Posts

    22
  • Joined

  • Last visited

Fosef's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Arggh, the jerkiness was caused by lua scripts not loading again. When I set the abstract path to the LE SDK directory I thought it would take care of the scripts too. But I actually needed to move the scripts folder into MyGame folder? Anywho, thanks...got to see what a lot of the settings/parameters do trying to figure this out too, so the aggravation payed off a little.
  2. The rotation is fine, I can spin around 1080 without noticing any kind of jerking... I tried the curve...but I wouldn't doubt I didn't use it correctly, just seems to change the speed....but can still see the jerkyness UpdateController(player,camrotation.Y+rotate*-1,Curve(move*10,0,6),strafe*10,0,400,1,0); Are you guys getting the same results?
  3. Ok, it stops fast when I release the keys now...But is still very jerky moving and strafing #include "engine.h" int main(int argc, char** argv) { Initialize(); RegisterAbstractPath("C:/Program Files/Leadwerks Engine SDK"); Graphics(1280,1024); AFilter() ; TFilter() ; TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera cam=GetLayerCamera(layer); PositionEntity(cam,Vec3(0,0,0)); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); // Setup Initial Post Processing FX SetGodRays(1); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetStats(2); Collisions(1,1,1); //DebugPhysics(true); LoadScene("abstract::Test_Forest.sbx"); TController player=CreateController(); EntityType(player,1); PositionEntity(player,Vec3(0,20,0)); SetBodyGravityMode(player,1); SetBodyMass(player,1); SetBodyDamping(player, 100); SetWorldGravity(Vec3(0,-20,0)); TVec3 camrotation=Vec3(0); float mx=0; float my=0; float move=0; float strafe=0; float rotate=0; TPivot campiv = CreatePivot(); EntityParent(cam, campiv); PositionEntity(cam,Vec3(0,0,0)); // MAIN LOOP while (!KeyHit(KEY_ESCAPE)) { //Player movement move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe=KeyDown(KEY_Q)-KeyDown(KEY_E); rotate=KeyDown(KEY_D)-KeyDown(KEY_A); //Rotate Cam camrotation.Y=camrotation.Y+rotate; RotateEntity(player,camrotation,1); //Set controller input UpdateController(player,camrotation.Y+rotate*-1,move*10,strafe*10,0,400,1,0); //Position the camera TVec3 playerpos=EntityPosition(player); PositionEntity(campiv, playerpos); RotateEntity(campiv, EntityRotation(player)); MoveEntity(campiv, Vec3(0, 1.75, -5)); // Update timing and world UpdateFramework(); // Render RenderFramework(); // Send to screen Flip(0) ; } return Terminate(); }
  4. Isn't this grading system something that Microsoft tried with Vista? You ran a program and it gave you scores based on each of your main specs, and a final score. Games were supposed to have a number on them also. But with the failure of conception of Vista...well I guess it never caught on. Yeah, here is one article... Windows System Score Edit* Funny, I just read it...and at the time it was written is when my rig was considered the "sweetest new rig". Which it was when I built it!
  5. I like the idea of the additional exercises, nice work Aggror...keep them coming!
  6. I agree with Aggror about the coming home and plopping down on the couch thing. I love PC gaming, I remember how hard it was for me to bring myself to buy the 360 due to elitism of being a PC Gamer. But I too work in front of a computer all day, and there is just something about the relaxation of sitting/laying on the couch and being able to play comfortably that I don't get on the PC. In fact, I'm tempted to hook my PC up to the TV so that I don't have to go sit in the computer chair. B) Hmmmm
  7. Camera works as expected, but its very jerky when moving or strafing...rotation is fine. Also I can't figure out the Damping, I've tryed every number ranging from .1 to 100, it just keeps moving after releasing the keys.
  8. At work now, so will try it tonight Thanks guys!
  9. Ok I got it moving, but still having issues with getting the camera to follow the controller and rotate correctly, here is what I have now.... #include "engine.h" int main(int argc, char** argv) { Initialize(); RegisterAbstractPath("C:/Program Files/Leadwerks Engine SDK"); Graphics(1280,1024); AFilter() ; TFilter() ; TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera cam=GetLayerCamera(layer); PositionEntity(cam,Vec3(0,0,0)); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); // Setup Initial Post Processing FX SetGodRays(1); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetStats(2); Collisions(1,1,1); DebugPhysics(true); LoadScene("abstract::Test_Forest.sbx"); TController player=CreateController(); EntityType(player,1); PositionEntity(player,Vec3(0,20,0)); SetBodyGravityMode(player,1); SetBodyMass(player,1); SetBodyDamping(player,1); SetWorldGravity(Vec3(0,-20,0)); TVec3 camrotation=Vec3(0); float mx=0; float my=0; float move=0; float strafe=0; float rotate=0; // MAIN LOOP while (!KeyHit(KEY_ESCAPE)) { //Player movement move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe=KeyDown(KEY_Q)-KeyDown(KEY_E); rotate=KeyDown(KEY_D)-KeyDown(KEY_A); //Rotate Cam camrotation.Y=camrotation.Y+rotate; RotateEntity(player,camrotation,1); //Set controller input UpdateController(player,camrotation.Y+rotate,move*7,strafe*7,0,1,1,0); //Position the camera TVec3 playerpos=EntityPosition(player); TVec3 camerapos=EntityPosition(cam); camerapos.Y=playerpos.Y+1.75; camerapos=Vec3(playerpos.X,camerapos.Y,playerpos.Z-5); PositionEntity(cam,camerapos); // Update timing and world UpdateFramework(); // Render RenderFramework(); // Send to screen Flip(0) ; } return Terminate(); }
  10. For whatever reason, the controller code does not work for me...I copy it straight out of the .pdf. It runs fine, but the controller does not move.
  11. Trying to create a third person camera, not sure if I'm going in the right path code wise or not. I've been going off the code from Third person camera - ball game example by Aggror Not sure what I'm doing wrong...If I had to guess, its something with the Pivot? In the end I actually want to have an animated player model, not a ball, but figure the ball is good starting point, unless the physics of a ball are actually the issue? #1 Am I on the right path, or should I be using the controller somehow? (I can't get the tutorial code to do anything, no movement at all) #2 The camera doesn't stay with the "player" #3 The camera leans when I push the Q or E Not sure how to best attach a sandbox file yet, but all Test_Forest has is a flat terrain and a tree in the middle. #include "engine.h" int main(int argc, char** argv) { Initialize(); RegisterAbstractPath("C:/Program Files/Leadwerks Engine SDK"); Graphics(1280,1024); AFilter() ; TFilter() ; TFramework framework=CreateFramework(); TLayer layer = GetFrameworkLayer(0); TCamera cam=GetLayerCamera(layer); PositionEntity(cam,Vec3(0,0,0)); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); // Setup Initial Post Processing FX SetGodRays(1); SetHDR(1); SetSSAO(1); SetBloom(1); SetAntialias(1); SetStats(2); Collisions(1,1,1); DebugPhysics(true); LoadScene("abstract::Test_Forest.sbx"); TBody player=CreateBodySphere(); EntityType(player,1); PositionEntity(player,Vec3(0,20,0)); SetBodyGravityMode(player,1); SetBodyMass(player,1); SetBodyDamping(player,1); SetWorldGravity(Vec3(0,-20,0)); TMesh ball=CreateSphere(); PositionEntity(ball,Vec3(0,20,0)); EntityParent(ball,player); EntityType(ball,1); TVec3 camrotation=Vec3(0); float mx=0; float my=0; float move=0; float strafe=0; float rotate=0; TEntity pivot=CreatePivot(player); EntityParent(pivot,player); EntityParent(cam,pivot); // MAIN LOOP while (!KeyHit(KEY_ESCAPE)) { //Player movement move=KeyDown(KEY_W)-KeyDown(KEY_S); strafe=KeyDown(KEY_Q)-KeyDown(KEY_E); rotate=KeyDown(KEY_D)-KeyDown(KEY_A); //Rotate Cam camrotation.Y=camrotation.Y+rotate; RotateEntity(pivot,camrotation,1); //Add Force to move player/ball TVec3 force=Vec3(strafe*10.0,0,move*10.0); force=TFormVector(force,cam,0); SetBodyForce(player,force); // Update timing and world UpdateFramework(); //Position the camera TVec3 playerpos=EntityPosition(player); TVec3 camerapos=EntityPosition(cam); camerapos.Y=Curve(playerpos.Y+1.75,camerapos.Y,2.0); camerapos=Vec3(playerpos.X,camerapos.Y,playerpos.Z-5); PositionEntity(cam,camerapos); // Render RenderFramework(); // Send to screen Flip(0) ; } return Terminate(); }
  12. That helped, thanks!
  13. Doh! Actually I had them in the Projects->MyGame folder....moved them into the Projects folder and it loaded the paths correctly. Still no terrain and forest_grass layer though, but I am guess that is something I need to add to the ProcessScene() myself? Don't go to far, may need help figuring that part out too lol
  14. So trying to load my own sandbox file, like the loading a scene tutorial. I opened up the editor, I created a flat terrain, gave it the grass material, and added a Beech tree. Using the same code from the tutorial, I changed the LoadScene to my file name. Upon running all I get is a black screen with the Tree displayed proudly in the middle. No grass terrain, or from what I can tell light. Looking at the output screen, I noticed its looking for some script files, and the path is getting screwed up. Only setting I have different from the setting up tutorial is the Debugging->Working Path...I have it set to ".." if I have it as "../.." as the tutorials says, i get an access violation error, and it says engine.dll could not be loaded in the output window. So what do I got that is screwed up?
  15. Thanks, I felt like a kid on X-mas morning since I had just purchased, so I wasn't taking the time to search for anything. I seen the Visual Studio issue was in the wiki after the fact...not sure if anything was out there on the SpotLight issue. Anyways, great product, enjoying it so far!
×
×
  • Create New...