Calimaw Posted May 7, 2010 Posted May 7, 2010 I need a bit of help on how to create a player using GameLib and LEO. #include "gamelib.h" int main() { Game game; Engine engine; engine.Create(); game.Initialize( 1024, 768); Engine::SetAbstractPath( "D:/Program Files/LWSDK" ); Engine::SetFilters( 4, 1 ); Collisions::Set(); game.scene.LoadMap( "abstract::murk01.sbx" ); Camera cam( CREATENOW ); // Game loop while( !Keyboard::I****() && !Engine::IsTerminated() ) { if( !Engine::IsSuspended() ) // We are not in focus! { // Render game.scene.Update(); game.scene.Render(); // Send to screen Engine::Flip(0); } } // Done return engine.Free(); } Quote
ZioRed Posted May 7, 2010 Posted May 7, 2010 There is the Power Tutorial to begin. 4) Adding the player After loading the map write this line: game.scene.SetCurrentPlayer("whateveryouwanttoname"); Then you can call the following in the game loop after the Update call: game.MouseLook(game.scene.cam); game.KeyboardMove(); game.PositionPlayerModel(); game.PositionCamera(); Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com
Calimaw Posted May 8, 2010 Author Posted May 8, 2010 Thanks, stuff is making a bit more sense every day Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.