Jump to content

MrIslomaniac

Members
  • Posts

    103
  • Joined

  • Last visited

Posts posted by MrIslomaniac

  1. Hey JT

    FPS is about 30

    Render device: GeForce 9600 GT/PCI/SSE2

    video and sound just as aggror said a minute ago :)

    fullscreen does not work here =(

    WGL returned bad format - emergency shutdown

     

    hope this helpy you =)

  2. Hey guys.

    My particles are changing their intensity. When i look into the direction of my directional light, they become brighter.

    I tested the fire in the editor and it works as it is supposed to. I am also setting the world to 1:

    SetWorld(GetLayerWorld(GetFrameworkLayer(1)));
    //and after the creation of the emitters
    SetWorld(GetLayerWorld(GetFrameworkLayer(0)));
    

    This is how I create the framework:

    FrameWork = CreateFramework();
    SetGlobalObject("framewerk",FrameWork);
    SetWorld(GetLayerWorld(GetFrameworkLayer(0)));
    

    I also put tzhe directional light in the layer 1.

    Maybe anyone else has had this problem in the past and can help me?

    Greetings

  3. Thank you for that quick answer =)

    Unfortunately that doesn't work. But it has to be something in my code, cause in the editor there is no such problem...

    The best is that it happens with and without lights ...

    SetWorldSize(Vec3(100000.0f,100000.0f,100000.0f));

     

    //EDIT

    I put the model in the editor, no problems. I loaded that scene in code and i got the same bug as before. I must be missing something that the editor has ...

  4. Hey guys, it's me again

    I just found a really strange and hard bug. I positioned an entity at 0,0,4100 and then it went crazy ...

    Here's my code and a video:

    int main(int argc, char** argv)
    {
    Initialize();
    
    //Create a graphics context
    SetAppTitle("Dustin's Solar System");
    Graphics(600,800,0,60,1);	
    
    //Create a world
    if (!CreateWorld()) {
    	MessageBoxA(0,"Error","Failed to create world.",0);
    	goto exitapp;
    }
    CreateFramework();
    
    //Setup the camera
    cam=GetLayerCamera(GetFrameworkLayer(0));
    PositionEntity(cam,Vec3(1,0,0));
    CameraRange(cam,0.0001f,10000);
    
    TEntity Mercury = LoadModel("abstract::Mercury.gmf");
    PositionEntity(Mercury,Vec3(4100,0,0));
    
    int move=0;
    int strafe=0;
    
    while(!AppTerminate()) {
    
    if(MouseDown(1)){
       if(!camrotmode){
           camrotmode=true;
    	mmx = MouseX();
    	mmy = MouseY();
           MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2);
       }
    }else if(camrotmode){
     camrotmode=false;
     MoveMouse(mmx,mmy);
    }
    
    if (KeyDown(KEY_L)){
    Hud::ShowPlanetInformation();
    }
    
    if(camrotmode){
    MouseMovement::Update();
    RotateEntity(cam,camrotation);
    }
    if (!MouseDown(1)){
    ShowMouse();
    }
    
    move=KeyDown(KEY_W)-KeyDown(KEY_S);
    strafe= KeyDown(KEY_D)-KeyDown(KEY_A);
    if (KeyDown(KEY_LSHIFT)){
    	move *= 10;
    	strafe *= 10;
    }
    if (KeyDown(KEY_SPACE)){
    	move *= 50;
    	strafe *= 50;
    }
    MoveEntity(cam,Vec3(strafe/1.0*AppSpeed(),0,move/1.0*AppSpeed()));
    
    UpdateFramework();
    RenderFramework();
    
    Flip(0);
    }
    exitapp:
    return Terminate();
    }
    

    And here the video:

     

    Need fast help pls, it's a project for school which has to be finished in 1 and a half week -.-

    Thanks

    Dustin

  5. I just did another calculation, i could make the scale much smaller but I don't know what would happen if i load an object that is 0.1137 meters and i zoom very close...

    of cause i need to slow down the camera and say that it should not stop rendering whats in front of it ...

    i'll try that later today, hopefully it will work =)

    Thanks again

  6. Well the distance between the sun and pluto is 5913520000 km.

    I already divide every value by 4.000.000 and take the result for the engine in Units ...

    So for pluto that would be 1.478.380 meters, since you can set the camera view range to 3.000.000 i thought that would work ...

  7. When I change the pointlight line to this:

    TLight miau = CreatePointLight(1000,0);
    

    it happens again ...

    I know that in the editor you can only set it to 100 but i need it to light for a distance of 15000000 LE units ...

    Solar system ftw ^^

  8. Got a little problem here guys. I see the edge of an invisible cube through the shadows of my model, any clues?

    #include "engine.h"
    
    int main(int argc, char** argv)
    {
    Initialize();
    
    //Create a graphics context
    Graphics(800,600);	
    
    //Create a world
    if (!CreateWorld()) {
    	MessageBoxA(0,"Error","Failed to create world.",0);
    	goto exitapp;
    }
    CreateFramework();
    
    //Create a camera
    TEntity cam=CreateCamera();
    CameraClearColor(cam,Vec4(0,0,1,1));
    PositionEntity(cam,Vec3(0,2,-10));
    
    //Create a light
    TEntity Map = LoadScene("abstract::TestSystem.sbx");
    TLight miau = CreatePointLight(100,0);
    PositionEntity(miau,Vec3(0,0,0));
    
    //Create a render buffer
    TBuffer buffer=CreateBuffer(800,600,BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL);
    int move=0;
    int strafe=0;
    TVec3 camrotation=Vec3(0);
    float mx=0;
    float my=0;
    
    //Main loop
    while(!AppTerminate()) {
    
    //Camera look
    if (MouseDown(1)){
    	HideMouse();
    	mx=Curve(MouseX()-GraphicsWidth()/2,mx,6);
    	my=Curve(MouseY()-GraphicsHeight()/2,my,6);
    	MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2);
    	camrotation.X=camrotation.X+my/10.0;
    	camrotation.Y=camrotation.Y-mx/10.0;
    	RotateEntity(cam,camrotation);
    }
    else if (!MouseDown(1)){
    	ShowMouse();
    }
    RotateEntity(cam,camrotation);
    
    //Camera movement
    move=KeyDown(KEY_W)-KeyDown(KEY_S);
    strafe= KeyDown(KEY_D)-KeyDown(KEY_A);
    MoveEntity(cam,Vec3(strafe/10.0,0,move/10.0));
    
    UpdateFramework();
    RenderFramework();
    //Swap the front and back buffer
    Flip(0);
    }
    exitapp:
    return Terminate();
    }
    

    here are the files you need: http://rapidshare.com/files/355513076/Test.rar.html

    Thank you =)

×
×
  • Create New...