Page 1 of 1

Quake 3 Map Problem

Posted: Thu Mar 04, 2010 7:27 pm
by Inplse
Irrlicht I begin, there is barely a week, I managed to load a Quake 3 Map (use as one example in Irrlicht) and I try a different map and there are only walls by here and there that are not display the entire Map even disabling backface culling:

Image bug :

Image

Code :

Code: Select all

#include <irrlicht.h>

int main(void)
{

    irr::IrrlichtDevice* device = irr::createDevice(irr::video::EDT_OPENGL, 
        irr::core::dimension2d<irr::u32>(800,800),32,false,false,false);
    irr::video::IVideoDriver* driver = device->getVideoDriver (); 
    irr::scene::ISceneManager *sceneManager = device->getSceneManager (); // 


    device->getCursorControl ()-> setVisible (false); 


    
    device->getFileSystem()->addZipFileArchive("focal_p132.pk3"); // Ajout du fichier compresser de la map
    irr::scene::IAnimatedMesh* mesh = sceneManager->getMesh("focal_p132.bsp"); 
    irr::scene::ISceneNode* node = 0;

    if (mesh)
        node = sceneManager->addOctTreeSceneNode(mesh->getMesh(0));
    if (node)
        node->setPosition(irr::core::vector3df(-1300,-144,-1249));
    sceneManager->setAmbientLight(irr::video::SColorf(1.0,1.0,1.0,0.0));
    node->setMaterialFlag(irr::video::EMF_BACK_FACE_CULLING, false);


    
    irr::SKeyMap keyMap[5];
    //avancer
    keyMap[0].Action = irr::EKA_MOVE_FORWARD;
    keyMap[0].KeyCode = irr::KEY_KEY_Z;
    //reculer
    keyMap[1].Action = irr::EKA_MOVE_BACKWARD;
    keyMap[1].KeyCode = irr::KEY_KEY_S;
    //a gauche
    keyMap[2].Action = irr::EKA_STRAFE_LEFT;
    keyMap[2].KeyCode = irr::KEY_KEY_Q;
    //a droite
    keyMap[3].Action = irr::EKA_STRAFE_RIGHT;
    keyMap[3].KeyCode = irr::KEY_KEY_D;
    //saut
    keyMap[4].Action = irr::EKA_JUMP_UP;
    keyMap[4].KeyCode = irr::KEY_SPACE;

    
    irr::scene::ICameraSceneNode *camera;
    camera = sceneManager->addCameraSceneNodeFPS (0, 100.0f, 0.3f, -1, keyMap, 5, false, 0.4);


    while (device->run()) // 
    {
        driver->beginScene(true, true, 
              irr::video::SColor(0,200,200,200)); 
        sceneManager->drawAll (); // 
        driver->endScene (); // 
    }

    device->drop ();
    return 0;
}
Link of the map if you want to download and try:

http://www.filefront.com/15690927/focal_p132.zip/


Thank you in advance for your answers.
Best regards.

Re: Quake 3 Map Problem

Posted: Thu Mar 04, 2010 9:16 pm
by randomMesh
Looks like you're using an Intel gfx card on Ubuntu.
What are your specs?
PS: Look here

Re: Quake 3 Map Problem

Posted: Thu Mar 04, 2010 9:58 pm
by Inplse
I am not under Ubuntu, I'm on Windows Vista 32 Bits.

Best regards.

Posted: Fri Mar 05, 2010 5:58 am
by Inplse
Help ! :wink:

Posted: Fri Mar 05, 2010 6:25 am
by Inplse
I forget to mention that the map is not an example of Irrlicht, but one I should download her normally display its :

Image

Link :

http://lvlworld.com/#c=mSearch&d=27Feb2 ... 3440&m=All

Posted: Fri Mar 05, 2010 7:51 am
by karljoesen
I've not played Queck for so long but i think it's interesting to play it again. This Map have problem but it's fixed.

Posted: Fri Mar 05, 2010 1:58 pm
by Inplse
Hello,

I tested with another map and it works but sometimes there are holes like texture lost, looking after the stairs for example:

Image

Thank you in advance for your answers.
Best regards.

Posted: Fri Mar 05, 2010 2:51 pm
by Acki
I guess this is because of different map compilers for Q-maps that do slightly different formats or elemnts that Irrlicht doesn't support...
if you look at the Irrlicht examples you'll se there are 2 examples for loading Q3-maps, the 1st one (#2) shows the "normal" loading of the map and there are missing some elements like lava and torches...
the 2nd example (#16) loads also shader elements and such stuff (lava and torches)...

Posted: Sat Mar 06, 2010 8:39 pm
by hybrid
Try to load your maps with example 21, should show you everything that Irrlicht supports for q3 files.

Posted: Mon Mar 08, 2010 12:30 am
by karljoesen
There's actually some holes that sometimes appears when you move up or down and i think it could be the process of the pictures of your machine