new irrlicht lib

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
val

new irrlicht lib

Post by val »

Code: Select all

///*=============================================================

//Ejemplo usando  Valkiria 

//By Victor

//==================================================================

#include <valkiria.h>           //la libreria



int main()
{

// create device

ValSetMode(800,600,16,false);         //crea el driver de video

   ValCls();                                 //borra la pantalla
ValLoadIntro("../../media/intro.jpg",1,1);  //carga imagen intro
ValFrame();           //la hace visible

IdItem item1=ValLoadItem("../../media/centercon.jpg");  //cargamos grafico item
ValItemAlpha(item1);      //lo ponemos canal alpha para trasparencias

   ValLoadMap("../../media/pak0.pk3","../../media/q3ctf3.bsp");  //carga el mapa que esta dentro del zip
   ValLoadFont("../../media/font1.bmp");            //carga la fuente  de letras
   ValCaption(L"Valkiria Game");   //nombre en la ventana
   ValSetCursor(false);                         //oculta raton
   
   ValUnloadIntro();   //descarga la intro
   
   //***************creamos el cielo **********************
   ValSky(                                
   "../../media/space1_up.jpg",
"../../media/space1_dn.jpg",
"../../media/space1_lf.jpg",
"../../media/space1_rt.jpg",
"../../media/space1_ft.jpg",
"../../media/space1_bk.jpg");

//ponemos efecto de iluminción falta por encapsular en la libreria

   node->setMaterialType(video::EMT_LIGHTMAP_ADD); 
            
           
            
  // ValMapCollision();      //ajusta las colisiones del mapa
  
  
  
     ValFpsCam(100.0f,300.0f);    //creamos una camara fps
    ValFpsPos(0,100,700);        //posicionamos la camara
    ValFpsRot(180);              //rotamos la camara
   ValFpsGra(-3);               // aplicamos gravedad 
 
 
    //======================================================
        
    //   creamos una entidad 
    //=======================================================   
   
    IdMd2 sy = ValLoadMd2("../../media/sydney.md2");  //cargamos modelo
       IdModel symo = ValCreateMd2(sy);   //creamos entidad
           ValMd2Collision(sy,symo);    //hacemos que la camara no lo traspase
           ValMd2Texture(symo,"../../media/sydney.bmp"); //aplicamos la piel
           ValMd2Pos(symo,0,50,800);  //la posicionamos
           ValMd2Rot(symo,0,90,0);    // la rotamos 
           ValMd2Sca(symo,1,1,1);     //la scalamos
           ValMd2AniName(symo,"flip"); //le aplicamos animacion
           ValMd2AniSpeed(symo,30);     //velocidad de la animacion
     
       //============================================================
       //   creamos un arma 
       //===========================================================
          
           
           
           IdMd2 sy1 = ValLoadMd2("../../media/gum.md2");
           IdModel symo1 = ValCreateMd2(sy1);
           ValMd2Texture(symo1,"../../media/gum.bmp");
           ValMd2Pos(symo1,20,-20,40);  
           ValMd2Rot(symo1,0,-90,0);  
           ValMd2Sca(symo1,1,1,1); 
           ValMd2FrameLoop(symo1,0,0);   //no queremos animacion
      
           ValFpsGum(symo1);  //aplicamos el arma a la camara fps
           
            
while(device->run())
{
 driver->beginScene(true, true, 0);
 smgr->drawAll();
 guienv->drawAll();
 
 
   
  //sacamos textos y item
  ValText(L"Point:",10,510,200,50,0,255,0);
   ValText(0,150,510,420,50,255,0,0);
   ValItem(item1,0,0,128,128);
   
   ValFrame();
device->drop();

return 0;
}
Image
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Does it have any new functions or capabilities?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
val

valkiria lib

Post by val »

I am constructing a set of librerias based on irrlicht, as they see is already very outpost, as they can see I am avoiding the classes and creating functions, I do not know if triviality will be one but for the programming of simple games it is easier I create.
In any case I need aid with libreria, so I appear here with all humility requesting your aid, I already have the Web site to be able to ubucar once is finished it.
I am now in a point that I cannot continue by the subject of the collisions, if they pay attention to I cosay the models use a leader to identify them.
IdModel symo = ValCreateMd2(sy); I would like that they helped me with this and other questions for the collisions that are a very important aspect wanted to do something thus
IdModel symo = ValCreateMd2(sy);
IdModel2 symo = ValCreateMd2(sy);
These are one of the functions that profit not to create.

if Valcollision(Idmodel, Idmodel2)
{...........
}
Good if it interests to somebody east welcome sera project to him, since I need aid, to finish libreria and to publish it gratuitously.
A hug to all I wait for buestra aid,


victorengine@hotamil.com
Post Reply