MrIslomaniac Posted March 14, 2010 Posted March 14, 2010 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 Quote
Flexman Posted March 14, 2010 Posted March 14, 2010 Nothing obvious comes to mind. Dunno but you might want to look into SetWorldSize() here's the wiki entry... SetWorldSize wiki Your video suggests it's some odd lighting/shadow quirk. But try SetWorldSize something large. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo
MrIslomaniac Posted March 14, 2010 Author Posted March 14, 2010 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 ... Quote
Masterxilo Posted March 14, 2010 Posted March 14, 2010 Try a size smaller than 100000. Quote Hurricane-Eye Entertainment - Site, blog.
DaDonik Posted March 14, 2010 Posted March 14, 2010 No problems here World size: 50000 Camera Range: 6000 (if that matters...maybe??) A model at Vec3(6000.0F) looks exactly the same as Vec3(3000.0F), no matter if there is a light or not... Have you tried it with a smaller model? Mine are max 20 units across. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)
MrIslomaniac Posted March 14, 2010 Author Posted March 14, 2010 http://rapidshare.com/files/363342107/Files.rar This is the model I am using Quote
Canardia Posted March 14, 2010 Posted March 14, 2010 Works fine with gamelib also. Gamelib does a few billion things to get the Editor scene loaded right, so I'm not going to guess what it could be Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■
MrIslomaniac Posted March 15, 2010 Author Posted March 15, 2010 Well try to put any model on 0/0/37408 and you will see that there are just too many problems =( (in the editor) Quote
Canardia Posted March 15, 2010 Posted March 15, 2010 That's where you need intelligent game design. You can't just throw all arbitrary ideas into a game and expect that they work. About 90% of every game is faked, but faked so well that people don't notice it. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.