Jump to content

xtreampb

Members
  • Posts

    321
  • Joined

  • Last visited

Posts posted by xtreampb

  1. Hey all,

     

    I'll tell you what i'm trying to do. When a body gets below a certin y value i want to remove it. However, i have multiple bodies falling at once. How would i determine if a random body has fallen past lets say -5. I don't know the object in the code, it is a random object so i can use a specific 'box3.getpos().gety'. I need to use a more generic form of code. so that if any body falls, i can catch it. I could use another 'ground' that has collisions type of 2. But i don't know how do use the collisions callback functions. Do anyone else have an idea, and/or can some one show me how to set up the collisions callback?

     

    Thanks

     

    ~Xtreampb~

  2. So i finally updated to LE 2.5 and updated my graphics card drivers to the lastest (nVidia 7900 gs) but it says that i'm still using GLSL 1.2 which isn't supported. Any one got any ideas how i can manually update my GLSL driver.

     

    Thanks in advance

     

    ~Xtreampb~

  3. I fixed my issue. My updateframework();, RenderFramwork();, and Flip(0) was inside the second if statement. I moved them all down approx 3 lines to outside the if statement and that cleard up all issues

  4. Great! I tried reading up on CSG but was only more confused. Is there a tutorial on how to programmatically break a CSG brush? What is the difference between a CSG Brush and a GMF Model?

     

    Thank you everyone for your help,

     

    ~Xtreampb~

  5. I know that josh said something in one of his blogs about having rubble like broken boards and such. I would like for there to be a destructive component for the engine. Similar to what can be found in the battlefield series. Destruction on that scale would be intense to integrate. This might be my ignorance speaking, but couldn't the GMF models have like destruction models. Something similar to the LOD already in place. Maybe AOD (amount of destruction). I guess a fix for now would be for a building model already have parts cut our and when the "health" gets low, some pieces fall off. Something like destruction 3 found in frostbite would be insane to have because everyone likes to blow things up, and a destruction component always makes games better in my opinion.

  6. I copied and pasted your code and got an runtime error at Flip();

     

    here is my entire code

     

    #include "engine.h"
    
    //#include "Level1.h"
    
    #include <math.h>
    
    #define PI  3.141592654
    
    
    
    void ChangeColor(float &, float &, float &, int );
    
    
    
    static int count=2;
    
    bool add=true;
    
    
    
    int main(int argc, char** argv)
    
    {
    
    Initialize();
    
    
    
    Graphics(800,600);
    
    
    
    CreateWorld();
    
    if(!CreateWorld())
    
    {
    
    	MessageBoxA(0,"ERROR","FAILED TO CREATE WORLD",0);
    
    	goto exitapp;
    
    }
    
    
    
    
    
    TCamera cam=CreateCamera();
    
    CameraClearColor(cam,Vec4(0,0,1,1));
    
    MoveEntity(cam,Vec3(0,0,-5));
    
    
    
    TLight light=CreateDirectionalLight();
    
    RotateEntity(light,Vec3(65,45,0));
    
    
    
    TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL);
    
    
    
    TBody body=CreateBodyBox();
    
    SetBodyMass(body,1);
    
    TMesh box1=CreateCube();
    
    EntityParent(box1,body);
    
    
    
    float red=0.0;
    
    float green=0.0;
    
    float blue=0.0;
    
    
    
    DebugPhysics(true);
    
    
    
    TBody ground=CreateBodyBox(10,0.1,10);
    
    TMesh groundMesh=CreateCube();
    
    ScaleEntity(groundMesh,Vec3(10,0.1,10));
    
    EntityParent(groundMesh,ground);
    
    
    
    TBody ground2=CreateBodyBox(10,0.1,10);
    
    TMesh groundMesh2=CreateCube();
    
    ScaleEntity(groundMesh2,Vec3(10,0.1,10));
    
    EntityParent(groundMesh2,ground2);
    
    EntityType(ground2,1);
    
    
    
    PositionEntity(ground2,Vec3(10,-20,0));
    
    RotateEntity(ground2,Vec3(0,0,45));
    
    
    
    TBody ground3=CopyEntity(ground);
    
    PositionEntity(ground3,Vec3(0,-25,0));
    
    
    
    //SetFluidPlane(Vec4(0),1);
    
    
    
    TBody box2=CreateBodyBox();
    
    SetBodyMass(box2,1);
    
    TMesh BoxMesh=CreateCube();
    
    
    
    EntityParent(BoxMesh,box2);
    
    PositionEntity(box2,Vec3(0.5,100,0.5));
    
    EntityType(box2,1);
    
    
    
    PositionEntity(ground,Vec3(0,-3,0));
    
    
    
    EntityType(body,1);
    
    EntityType(ground,1);
    
    EntityType(ground3,1);
    
    Collisions(1,1,1);
    
    
    
    
    
    //DebugPhysics(true);
    
    
    
    PositionEntity(cam,Vec3(0,5,-10));
    
    RotateEntity(cam,Vec3(45,0,0));
    
    float x=0;
    
    float z=0;
    
    dropBox:
    
    {
    
    	for(int i=1; i<=100;i++)
    
    	{
    
    		body=CopyEntity(box2);
    
    		x=-5+((float)rand()/RAND_MAX)*10;
    
    		z=-5+((float)rand()/RAND_MAX)*10;
    
    		ScaleEntity(body,Vec3(x,1,z));
    
    		SetBodyMass(body,i);
    
    		PositionEntity(body,Vec3(x,i,z));
    
    	}
    
    }	
    
    while(!KeyHit(KEY_ESCAPE))
    
    {
    
     		if(KeyDown(KEY_SPACE))
    
    	{
    
    		if(count==24)
    
    		{
    
    			add=false;
    
    		}
    
    		else if(count==1)
    
    		{
    
    			add=true;
    
    		}
    
    
    
    		TurnEntity(ground,Vec3(0,0,-10));
    
    
    
    		ChangeColor(red, green, blue, count);
    
    		if (add)
    
    			count++;
    
    		else if(!add)
    
    			count--;
    
    
    
    		CameraClearColor(cam,Vec4(red,green,blue,1));
    
    	}
    
    	if(KeyHit(KEY_ENTER))
    
    		goto dropBox;
    
    
    
    	UpdateAppTime();
    
    	UpdateWorld();
    
    	SetBuffer(buffer);
    
    	RenderWorld();
    
    	SetBuffer(BackBuffer());
    
    	RenderLights(buffer);
    
    	Flip();
    
    }
    
    exitapp:
    
    Terminate();
    
    return 0;
    
    }
    
    
    
    void ChangeColor(float &red, float &green, float &blue, int count)
    
    {
    
    float x=PI/count;
    
    
    
    red=sin(x+PI/2);
    
    //green=cos(x+PI/2);
    
    blue=sin(1.5*x);//==sin((PI/count)-PI);
    
    /*
    
    if(red<0)
    
    	red=0;
    
    if(green<0)
    
    	green=0;
    
    if(blue<0)
    
    	blue=0;
    
    */
    
    }
    

  7. I've got an interesting little problem here.

     

    my CreateCube() functions don't seam to want to create a mesh. idk if it's the VM i'm using or what. bellow is my code

    DebugPhysics(true);
    
    TBody ground=CreateBodyBox(10,0.1,10);
    TMesh groundMesh=CreateCube();
    ScaleEntity(groundMesh,Vec3(10,0.1,10));
    EntityParent(groundMesh,ground);
    
    TBody ground2=CreateBodyBox(10,0.1,10);
    TMesh groundMesh2=CreateCube();
    ScaleEntity(groundMesh2,Vec3(10,0.1,10));
    EntityParent(groundMesh2,ground2);
    EntityType(ground2,1);
    
    PositionEntity(ground2,Vec3(10,-20,0));
    RotateEntity(ground2,Vec3(0,0,45));
    
    TBody ground3=CopyEntity(ground);
    PositionEntity(ground3,Vec3(0,-25,0));
    

     

    here is the engine log

     

    Leadwerks Engine 2.5

    Initializing Renderer...

    OpenGL Version: 2.1 Chromium 1.9

    GLSL Version: 1.20

    Render device: Chromium

    Vendor: Humper

    DrawBuffers2 supported: 0

    16 texture units supported.

    GPU instancing supported: 0

    Shader model 4.0 supported: 0

    Conditional render supported: 0

    Loading shader "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//query.vert", ""...

    Loading shader "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//guide.vert", "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//guide.frag"...

    Loading shader "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//mesh/mesh_shadow.vert", ""...

    Loading shader "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//mesh/mesh.vert", "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//mesh/mesh.frag"...

    Loading shader "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//postfilters/postfilter.vert", "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//postfilters/depthblit.frag"...

    Loading texture "incbin::noise.dds"...

    Loading shader "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//postfilters/postfilter.vert", "zip::c:/documents and settings/tss llc leadwerks/desktop/leason 5/leason 5/shaders.pak//lighting/directionallight.frag"...

    Terminate function

     

     

    anyone got any ideas. My VM is Virtual box. 3D accelleration is on as well as 2d and have 128 MBs of VRAM and 2.5 GBs of RAM. anyone got any ideas of how to solve this issue

     

    thanks,

     

    Xtreampb

  8. I'll try to use Virtual Box again. It was giving me problems before so i switched to VMWare fusion when i could get it for $10. The reason i don't use a windows partition is because i'm switching between OS X and Windows too frequently. I have my models and such on OS X but the engine is in windows. That is one of the biggest reasons i can't wait for LE 3. Any news on a release date if you don't mind me asking.

  9. VMWare Fusion. that is the latest virtual graphic driver that is available for the virtual machine. maybe parallels will work.

     

    I'mm currently deployed so i couldn't take my desktop with me so i got my mac book pro. and i'm trying to get it to work on that so :/

     

    Edit:

    Spelling correction

  10. iOS is similar to the mac apps. any folder with the ".app" extension automatically because an app based on apple's framework. The Info.plist is what determines the location in the folder the icon is at as well as the executable. For an example, go to your applications folder and right click on any app. Select show package contents and you should see a finder window appear with a fold called contents. Once opened you will see a property list file called "Info.plist", a resources folder, and a folder called MacOS. (actual names may vary based on developer). To get more information and details, open xCode and click on help, developer documentation, search for bundles or iOS bundles. Those should put you in the right direction to everything you may need to know.

×
×
  • Create New...