tl-engine Matrices HELP!

This is a discussion on tl-engine Matrices HELP! within the Game Programming forums, part of the General Programming Boards category; Hi everyone, Im a complete newbie to C++. Im would like to know what the Matrices script is to rotate ...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    17

    tl-engine Matrices HELP!

    Hi everyone,

    Im a complete newbie to C++.
    Im would like to know what the Matrices script is to rotate a 3d character us the TL-Engine.

    This is the script that i have used so far it it helps.

    Code:
    // quake.cpp: A program using the TL-Engine
    
    #include <TL-Engine.h>    // TL-Engine include file and namespace
    using namespace tle;
    
    //--------------------------------------------------------------------------------------
    
    void main()
    {
        // Create a 3D engine (using Irrlicht engine here) and open a window for it
        I3DEngine* myEngine = New3DEngine( kIrrlicht );
        myEngine->StartWindowed(1284, 768);
    
        // Add default folder for meshes and other media
        myEngine->AddMediaFolder( "C:\\Users\\tecmeister\\Documents\\TL-Engine\\Media" );
    
    //--------------------------------------------------------------------------------------
    
        /**** Set up your scene here ****/
    
    //--------------------------------------------------------------------------------------
    
        //quake map
        IMesh* quakeMesh;
        IModel* quake;
    
    //---------------------------------
    
        // marine player
        IMesh* playerMesh;
        IModel* player;
    
    //---------------------------------
    
        // key press movement
        bool KeyHit( EKeyCode );
        bool KeyHeld( EKeyCode );
    
    //---------------------------------
    
        // place the quake map into the game
        quakeMesh = myEngine->LoadMesh( "Quake3Level.pk3" );
        quake = quakeMesh->CreateModel();
    
    //---------------------------------------------------------
    
        playerMesh = myEngine->LoadMesh( "Marine.md2" );
        player = playerMesh->CreateModel(1400, 88, 1350);
    
    //---------------------------------------------------------
    
        ICamera* myCamera;
        myCamera = myEngine->CreateCamera(kFPS);
    
    //---------------------------------------------------------
    
    
        // The main game loop, repeat until engine is stopped
        while (myEngine->IsRunning())
        {
            // Draw the scene
            myEngine->DrawScene();
    
    //---------------------------------------------------------
    
            /**** Update your scene each frame here ****/
    
    //---------------------------------------------------------
    
            if(myEngine->KeyHit(Key_Escape))
            {
                myEngine->Stop();
            }
            if(myEngine->KeyHeld( Key_W ))
            {
                player->MoveLocalZ(1);
            }
            if(myEngine->KeyHeld( Key_S ))
            {
                player->MoveLocalZ(-1);
            }
            if(myEngine->KeyHeld( Key_D ))
            {
                player->MoveLocalX(1);
            }
            if(myEngine->KeyHeld( Key_A ))
            {
                player->MoveLocalX(-1);
            }
    
    //------------------------------------------------------
    
        }
    
        // Delete the 3D engine now we are finished with it
        myEngine->Delete();
    }
    
    //-------------------------------------------------------
    Thanks for your help.

    swink

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Learn how to program before attempting anything game related.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. adding matrices, help with switches
    By quiet_forever in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2007, 08:21 AM
  2. Game Engine Link Prob
    By swgh in forum Game Programming
    Replies: 2
    Last Post: 01-25-2006, 11:14 PM
  3. Ultra chess engine contest
    By yodacpp in forum Projects and Job Recruitment
    Replies: 8
    Last Post: 11-21-2004, 06:58 AM
  4. Updated sound engine code
    By VirtualAce in forum Game Programming
    Replies: 8
    Last Post: 11-18-2004, 11:38 AM
  5. Problem multiplying rotation matrices together
    By Silvercord in forum A Brief History of Cprogramming.com
    Replies: 20
    Last Post: 03-04-2003, 08:20 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21