Hey folks, I’m working on a first person game. Right now, it’s nothing more than an environment of walls and sprites that you can wonder around in. However, I find I’m running into way more problems with framerate than I’d have expected. I was averaging 32, occasionally dipping down to 16, and this is way before I’ve tried ot put in any of the fancier graphics, AI, and colision tests(!). I implemented face culling, frustum culling, and sorting my walls, but found it to have a negligable improvement. Using a profiler, I found that if I just sort sprites, I’m spending 18% of my cpu on sorting lists and 30% on “WindowsOnscreenGLContext.swapBuffers.” When I start sorting walls, I essentially trade, to 28% on sorting lists and 18% on swappin’ buffers. I’m sorting using a bubble sort which stops once the list is sorted. I’m hardware accelerated and dubble buffered. I guess it could be an issue that I’m running at 1280 x 1024 resolution, but if at all possible I’d rather not mess with that.
Thanks,
Nick
[EDIT: It’s interesting to note, if I set the window size to just 800 x 600, it runs at a steady 64. BUT, if I take that 800x600 window, and enter fullscreen mode via device.setFullScreenWindow( this ), it still flickers to 32, and occasionally even 16 in narrow corridors. After a bit of tinkering, I’ve got a suspition that the size of the window before you enter fullscreen mode that way doesn’t matter. I know I’ve seen JoGL programs which make that distinctive click when it changes you’re resolution.]