Hey again, I have a few question in differnt points.
My FPS seems to be perty low so I ran PStatClient.connect() to see whats up. When I saw it, I compared it to the ones I seen on the forums and mine seems to be a little differnt so i’m not sure whats up. img165.imageshack.us/my.php?imag … 444sd5.png
I also tried to node.flattenStrong() on my biggest part of my world, witch is the world (self.environ).
9 total nodes (including 0 instances); 0 LODNodes.
3 transforms; 11% of nodes have some render attribute.
12 Geoms, with 3 GeomVertexDatas and 1 GeomVertexFormats, appear on 3 GeomNodes.
40299 vertices, 40299 normals, 0 colors, 40299 texture coordinates.
GeomVertexData arrays occupy 1270K memory.
GeomPrimitive arrays occupy 165K memory.
25 vertices are unreferenced by any GeomPrimitives.
8644 of these are on 2682 tristrips (3.22297 average tris per strip).
21622 of these are independent triangles.
11 textures, estimated minimum 2176K texture memory required.
Can panda only open up 1 of it self at a time on a PC? I know the server code I posted on the forum wasnt “panda-own” and when I tried to open up the client again using “panda-own” it gives me.
The process cannot access the file because it is being used by another process.
By Panda own I mean like something setup for panda and not just normal python coding.
But thanks i’ll see what will hapens when I put sync-video 0 into my Config.prc file.
Edit: Hmm it seem to work but not fully, only on some parts. There still seems to be alot of wait when I look around my town. I’ll try and twink it more and see what happens. Could the wait tho be cus of my code or the map?
After a little code twinking I got like 20 more FPS but thats not alot and working with small scale sizes. I find out you can click on the wait and I saw this. Not sure what a Flip is ^^: img167.imageshack.us/my.php?imag … 667oz6.png
“Flip” is time spent waiting for your graphics card to finish drawing the frame, before we can begin to issue commands for drawing the next frame. A lot of time in Flip usually means your shaders are too complex for your graphics card’s performance.
You can prove this: try reducing the size of your window. If it improves your frame rate, it proves that you’re pixel-limited, that is, your graphics card is spending all its time drawing pixels. If that’s the case, you need to reduce either the number of pixels you’re drawing, or reduce the amount of work it has to do per-pixel.
In other words: simplify your shaders, or stop using shaders altogether.
Oh, and if reducing the window has no effect on your frame rate (and no effect on the “flip” time), then rather than pixel-limited, you’re presumably vertex-limited. That is, your graphics card is spending all its time transforming vertices. This is less common than being pixel-limited, though it does happen. In this case, you’ll need to reduce the number of vertices, or separate the geoms better into different pieces so that culling can be more effective (for instance, call flattenMedium() instead of flattenStrong()).
Ok I change the sreen from 800 600 to half that, or 400 300, and got a boost in frame rate and the wait went down alot. Maybe it is pixel limited, but I dont really use shaders and the sorta shaders, if they even are shaders, I use is the fog and the waterfall code. That I have turn on and off but nothing happens. I know I dont have the newist GPU out there=) but I mean I can play FEAR and WOW so I know my simple little map cant be that hard on my GPU.
Antialiasing has a high per-pixel cost, though. Make sure you don’t have full-screen antialiasing turned on. Transparency has a smaller per-pixel cost, but it’s not free–make sure you don’t have transparency on unnecessarily. (You can put “show-transparency 1” in your Config.prc file to make it flash the polygons that have transparency enabled. Makes it easy to see where you goofed. Red is the most expensive kind of transparency, yellow is second-most expensive, and green is the practically-free kind. No flashing at all means it doesn’t have transparency.)
There are also other little things that help a tiny bit. For instance, turning on mipmapping (“gl-force-mipmaps 1”, if you’re using opengl) can sometimes help a little bit, as can enabling texture compression (“compressed-textures 1”).
If it’s not any of the above, and you’re not using shaders–not even the auto-shader provided by Panda (you didn’t turn on auto-shader, right, or per-pixel lighting?)–then you’re just drawing too many pixels. That is to say, you’ve got too many layers of things that fill up the entire screen.
If, for instance, there is a large wall in front of the camera, and another large wall behind that, and another large wall behind that, well, you’ve just filled the entire screen full of pixels three times (even though you only end up seeing the one in front). This is called having a high depth complexity–it means each pixel gets redrawn several times, because there are lots of things behind other things. Make sure you don’t have this situation going on.
Yea I didnt use any shaders or the auto ones by anymeans. That may be the problem right there tho, thats why I was using the fog and base.camLens.setFar() to limit the use. I think I got it or I increased it by alot over 60-70fps, so I was limiting-out on pixels. I used these to help out on the fps.
This is called visibility, and there is a whole art to doing it well. The short answer is, yes, it can be done. Generally, not automatically–you have to do it yourself. It takes a lot of work, and the best approach has to be chosen based on the particular application.