Jump to content

Fosef

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by Fosef

  1. try it without modifying the move and strafe variables...

     

    look at the wiki tut for Character Controllers and you will see that the code doesn't use any multiplier on the move or strafe

     

     

    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 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

  6. 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.

  7. 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();
    }

  8. 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();
    }

  9. 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 :)

  10. 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?

    post-1039-12729323322109_thumb.jpg

  11. This issue was recently brought to my attention. It just started occuring due to some optimizations that were made in version 2.31. It has been fixed for version 2.32. You can replace the spotlight with a directional light to see how it should work.

     

     

    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!

  12. Second issue resolved! Thanks

     

    First issue still there though...

     

    Tryed both...

    SetShadowQuality(SHADOW_QUALITY_HIGH);

    SetShadowQuality(1);

     

     

    The shadow of the box doesn't move...figure you can't see that in the screenshot.

    And the cone of my debug light appears nothing like the one in the tutorial.

  13. Ok, so just getting started, here are my specs...

     

    AMD Athlon 64 X2 4800+

    2GB RAM

    Nvidia GeForce 8800 GT (197.45 Driver)

     

    First Question:

    Following the 2nd tutorial, my final result doesn't look right...

    Attached is a screen shot, hopefully you can see everything. Everything appears very grainy...plus the debug light cone seems to be off from what the tutorial showed.

     

    Second Question:

    If you notice in my Visual Studio, keywords from Leadwerks SDK are not turning blue?

     

     

    Thanks All

    post-1039-12725897091573_thumb.jpg

  14. Thanks for the reply. Yeah, the Torque documentation sucks for sure.

     

    I work as a web applications developer using VB.NET and ASP.NET, so the C# wrapper is what got me here through google searching, although I'll probably just go with the C++ as I do have some remembrance of it from college.

     

    Yeah, I am an avid gamer and would love to get into game development at some point in the future. The community here does seem nice, and I'm pretty certain you'll be seeing me more in the future.

     

     

    *EDIT* Purchased!

  15.  

    This is a really good runthrough of things. A lot of stuff you mention is thing I wouldn't even think to explain, but when you do I can see how it would be useful for someone brand new to game development, or at least to Leadwerks.

     

    Nice stuff!

     

     

    Yes, Please don't skip on things you think people already know. I do not own Leadwerks "yet", but tutorials that explain the basics may be what ultimately lead me to purchasing. I purchased the Torque TGEA last year, and I've gotten absolutely nowhere (NOWHERE!!!) with it. That is why I am hesitant to purchase another engine. I am just a hobbyist, and I learn from seeing/hearing things, I need tutorials that explain.

     

    Like while exploring this site, I see the code snippet in the Lua section for a chase camera. What is the benefit of creating the camera using script over creating it in C++ or what have ya. I'm such a noob with game development, that is where I get lost, what ultimately decides when to script it vs code it?

×
×
  • Create New...