Jump to content

VeTaL

Members
  • Posts

    1,272
  • Joined

  • Last visited

Everything posted by VeTaL

  1. VeTaL

    Low FPS

    This is trouble forme too. Working on the same thing: trying to optimize level to make fps higher. http://www.leadwerks.com/werkspace/topic/3728-fentinor-build/ It would be nice if Josh and other experienced guys would write a collection of tips for modelling, ligtning and leveldesign.
  2. VeTaL

    Fentinor build

    Made simple tests for Cegui. Hope, they would be usefull for someone. 1) New application, created with LEBuilder (rotating cube, C++): 280-282 FPS TurnEntity( mesh, Vec3( AppSpeed()*0.5f ) ); UpdateFramework(); RenderFramework(); Flip( 0 ); 2) Rotating cube + simple Cegui render (taken here): 262-265 FPS TurnEntity( mesh, Vec3( AppSpeed()*0.5f ) ); UpdateFramework(); RenderFramework(); glPixelStoref(0x806E, 0); glPixelStoref(GL_PACK_ROW_LENGTH, 0); glPixelStoref(GL_UNPACK_ROW_LENGTH, 0); CEGUI::System::getSingleton().renderGUI(); Flip(0); 3) Rotating cube + simple Cegui render + cegui cursor: 265 FPS if( xMouse != MouseX() || yMouse != MouseY() ){ CEGUI::System::getSingleton().injectMousePosition( (float)MouseX(), (float)MouseY() ); yMouse = MouseY(); xMouse = MouseX(); } TurnEntity( mesh, Vec3( AppSpeed()*0.5f ) ); UpdateFramework(); RenderFramework(); glPixelStoref(0x806E, 0); glPixelStoref(GL_PACK_ROW_LENGTH, 0); glPixelStoref(GL_UNPACK_ROW_LENGTH, 0); CEGUI::System::getSingleton().renderGUI(); Flip(0);
  3. VeTaL

    Fentinor build

    my code: 1) _stateReturns = _activeState->UpdateState(_deltaTime); this is int StateGame::UpdateState( float _deltaTime ) { SingletonOisManager.Update(); // ois input SingletonLevelManager.Update(_deltaTime); // this contains UpdateFramework();, now it is empty return GameState; } 2) __raise updateEvent->UpdateEvent( _deltaTime ); camera and player updates are subscribed there 3) _activeState->RenderState(_deltaTime); is doing nothing. Previously, RenderFramework(); was there, but now its also empty 4) __raise renderEvent->RenderEvent( _deltaTime ); this called imgui debug panels (player and camera had their own debug panels), also disabled for now Also, i'm planning to change "__raise" to http://www.codeproject.com/KB/cpp/FastDelegate.aspx
  4. VeTaL

    Fentinor build

    Do Cegui render takes 0 in your test?
  5. VeTaL

    Fentinor build

    Looking like that code is almost not affecting fps. The mostly fps are eaten by UpdateFramework(); and RenderFramework(); Also, i found my mistake (if be honest till the end ), i rendered Cegui two times.. well, tha's fixed fast enough... and i'm thinking about another gui instead of Cegui. Idk, how Metatron get so large difference in running with and without content. Edit: just tested game without logger: got the same fps with and without Cegui: about 25-30
  6. VeTaL

    Fentinor build

    // Update framework SingletonProfilerManager.SetTime(timeGetTime()); UpdateFramework(); SingletonProfilerManager.PrintTime("Updating Framework", timeGetTime() ); // Update state SingletonProfilerManager.SetTime(timeGetTime()); _stateReturns = _activeState->UpdateState(_deltaTime); __raise updateEvent->UpdateEvent( _deltaTime ); SingletonProfilerManager.PrintTime("Updating World", timeGetTime() ); // Render framework SingletonProfilerManager.SetTime(timeGetTime()); RenderFramework(); SingletonProfilerManager.PrintTime("Render Framework", timeGetTime() ); // Render state SingletonProfilerManager.SetTime(timeGetTime()); _activeState->RenderState(_deltaTime); __raise renderEvent->RenderEvent( _deltaTime ); SingletonProfilerManager.PrintTime("Rendering World", timeGetTime() ); // Render GUI state SingletonProfilerManager.SetTime(timeGetTime()); _activeState->RenderGuiState(_deltaTime); __raise guiRenderEvent->RenderGuiEvent( _deltaTime ); // _activeState->RenderGuiPostState(_deltaTime); SingletonProfilerManager.PrintTime("Rendering Gui States", timeGetTime() ); // Render cegui SingletonProfilerManager.SetTime(timeGetTime()); SingletonCeGuiManager.RenderWithImgui(_deltaTime); SingletonProfilerManager.PrintTime("Rendering Cegui", timeGetTime() ); SingletonProfilerManager.Submit(); *VeTaL is ready for searching bottlenecks* Something like this
  7. VeTaL

    Fentinor build

    You're right, Pixel: i just forgot about Tools folder with openal installer and redistr 2010.
  8. VeTaL

    Fentinor build

    Now i have 35-40 fps in Editor (all included), 35-40 fps in client (without shadows), 25-30 fps in client (all included). Thanks a lot, Loom. Next step is profiler and code optimization
  9. VeTaL

    Fentinor build

    Lights, that are in the second floor of tavern are dynamic+static, as static only doesnt cast a shadow Lights, that are near player, are dynamic+static+buffered Also, minimal resolution is 256, so i left it. Got some additional fps, trying to remove torches looking like i really need to decrease light radius there: as differed shading is used, 16 additional small lights cant drop fps from 25 to 15, i think
  10. VeTaL

    Fentinor build

    You was right: I changed it to and have some fps boost Now level is looking like this, is that ok, or i should decrease torches light radius?
  11. VeTaL

    Fentinor build

    0_0 Quite strange: i loaded level with this template code (get 6 fps) // ==================================================================== // This file was generated by LEBuilder // http://leadwerks.com/werkspace // ==================================================================== #include "engine.h" #include <iostream> #include <string> const int ScreenWidth = 1024; const int ScreenHeight = 768; const char* MediaDir = "Z:/Leadwerks Engine SDK"; const char* AppTitle = "Test"; void ErrOut( const std::string& message ) { std::cerr << message << std::endl; } // ------------------------------- int main( int argn, char* argv[] ) { // Initialize if( !Initialize() ) return 1; SetAppTitle( AppTitle ) ; RegisterAbstractPath( MediaDir ); // Set graphics mode if( !Graphics(ScreenWidth,ScreenHeight) ) { ErrOut( "Failed to set graphics mode." ); return 1; } // Create framework object and set it to a global object so other scripts can access it TFramework fw = CreateFramework(); if( fw == NULL ) { ErrOut( "Failed to initialize engine." ); return 1; } // Set Lua framework object SetGlobalObject( "fw", fw ); // Set Lua framework variable BP lua = GetLuaState(); lua_pushobject( lua, fw ); lua_setglobal( lua, "fw" ); lua_pop( lua, 1 ); // Get framework main camera TCamera camera = GetLayerCamera( GetFrameworkLayer(0) ); PositionEntity( camera, Vec3(0,0,-2) ); // Create cube TMaterial material = LoadMaterial( "abstract::cobblestones.mat" ); // TMesh mesh = CreateCube(); // PaintEntity( mesh, material ); LoadScene("abstract::SoulHill.sbx"); TEntity cam=CreateCamera(); PositionEntity(cam,Vec3(0,2,-10)); // Create ground TMesh ground = CreateCube(); ScaleEntity( ground, Vec3(10,1,10) ); PositionEntity( ground, Vec3(0,-2,0) ); PaintEntity( ground, material ); // Add some light TLight light = CreateDirectionalLight(); RotateEntity( light, Vec3(45,45,45) ); TVec3 camrotation=Vec3(0); float mx=0; float my=0; float move=0; float strafe=0; // Spin cube until user hits Escape while( !KeyHit() && !AppTerminate() ) { if( !AppSuspended() ) { //Camera look 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); //Camera movement move=Curve(KeyDown(KEY_W)-KeyDown(KEY_S),move,20); strafe=Curve(KeyDown(KEY_D)-KeyDown(KEY_A),strafe,20); MoveEntity(cam,Vec3(strafe/10.0 *(1 + 20*KeyDown(KEY_LSHIFT)),0,move/10.0 * (1 + 20*KeyDown(KEY_LSHIFT)))); // TurnEntity( mesh, Vec3( AppSpeed()*0.5f ) ); UpdateFramework(); RenderFramework(); Flip( 0 ); } } return Terminate(); }
  12. Here they are Maybe they are a little mess ) Its my "Templates" folder Just dreamed to have that templates in LEBuilder and make them in one click Viewer.cpp SkyCube.cpp
  13. No, i mean some gameplay examples. - Viewer (just camera control around mesh, so user can load and see any model) - Spectator (camera, that fly free through the level... like a Viewer, idk id they are needed to be separated) - FPS (physic player + camera control) - SkyCube - *** maybe some framework/pure templates
  14. It would be nice to have pack of templates for updater
  15. VeTaL

    Fentinor build

    With the same settings, in editor i have 20 fps
  16. VeTaL

    Fentinor build

    I also think so: taking into account that the only gui is in the red rectangle... anyway, its not a problem to turn it off Moreover, fps are nice if player is standing nearg green zone on the picture So, i think that its because of models.. or lights
  17. VeTaL

    Fentinor build

    This is without LoadScene // Update state SingletonProfilerManager.SetTime(timeGetTime()); _stateReturns = _activeState->UpdateState(_deltaTime); __raise updateEvent->UpdateEvent( _deltaTime ); SingletonProfilerManager.PrintTime("Updating World", timeGetTime() ); // Render state SingletonProfilerManager.SetTime(timeGetTime()); _activeState->RenderState(_deltaTime); __raise renderEvent->RenderEvent( _deltaTime ); SingletonProfilerManager.PrintTime("Rendering World", timeGetTime() ); // Render GUI state SingletonProfilerManager.SetTime(timeGetTime()); _activeState->RenderGuiState(_deltaTime); __raise guiRenderEvent->RenderGuiEvent( _deltaTime ); // _activeState->RenderGuiPostState(_deltaTime); SingletonCeGuiManager.Render(_deltaTime); SingletonProfilerManager.PrintTime("Rendering Gui", timeGetTime() ); SingletonProfilerManager.Submit(); Here is my main loop. the results are next: Next step is to separate GameLogic from UpdateWorld
  18. VeTaL

    Fentinor build

    Yep, now i'm making second try without LoadScene Also, i had imgui profiler, but now i'm outputting results to the file.
  19. VeTaL

    Fentinor build

    Just runed Code Analysis for MSVS, get this:
  20. *get ready to defend the Earth agains the army of marching robots* xD
  21. VeTaL

    Fentinor build

    Hm, i'll check that once more time. But on my home PC ( GeForce 9600 ), i have: about 30 in editor and about 20 in the game Previous buid used SDL+imgui for debug purposes, i thought if i'd drop down SDL, i'll have a little perfomance boost. I'll post here profiler's results That's what i'm interested in too. I hope, there is a trouble with models, or, at least, in code. If i can cut down code and check its perfomance, i can do nothing with models- thats why i posted this post here: maybe someone have some recommendations about that. The solution of "The program cannot start because MSVCP100.DLL is missing" is to install Microsoft Visual C++ 2010 Redistributable Package yep Added this to web-silte report
  22. VeTaL

    Fentinor build

    About a week ago we (me, leveldesigner, who is working on one PC with me, and some modellers) had finished first build of the level. Then i showed build to a number of people and was really shocked by extremely low fps. Modern AAA games uses textures 1024*1024 and 2048*2048, and this demo used only 512*512 FPS: GeForce 8600M gives 6 FPS, which is epic fail, i think: that laprop runs more complete levels using other engines GeForce 9600 gives 20-30 FPS without shadows and 7-8 FPS with shadows (<ShadowQuality>0</ShadowQuality> in Configuration.xml) ATI Radeon M 56xx 1Gb, IntelCore i7 1.6GHz (boost up to 2,5+), gives 23-26 fps, while Crysis 2 gives 20 fps on maximum settings Top-quality PC: i5 760 2.80, GeForce GTX 460 SE, 4 Gb shows only 45-50 fps, while Crysis 2 gives 70 fps on maximum settings ati mobility radeon hd 5700 - 10 fps gtx 560 ti - about 100 fps The most fail is trying to run build on my laptop: i5 480M 2.66, GeForce GT540M 1 Gb, 4 Gb - that gives me 30 fps without shadows and about 10 FPS with shadows (like on my PC, 9600) Can you look at the models and give us some advices? I believe that modellers made their models in not-optimized-for-this-engine way. Maybe they used too much materials or something like that. Demo is here: http://www.speedyshare.com/files/29762947/Fentinor.7z Also take a look into Configuration.xml Updated: What about current models, here they are: http://www.speedyshare.com/files/29762947/Fentinor.7z password: nOde46repLY30zOA47yak! PS: got some errors with banner uploading in Chrome, so i had attched them here
  23. Just wanted to drop 5 cents (share own experience)... Maybe obvious things, but just in case someone would find it usefull. As mentioned before, language is almost not playing a role in LE application: 99% of time is engine.dll I spend some hours, trying to resolve some CRT problems (i couldnt build release version), get a lot of additional experiense and... see no differ between debug and release builds in C++ The scene is not too high loaded, but there are amount of code already in usage.
  24. What about layout editor? )))))
×
×
  • Create New...