|
-
Sep 28th, 2002, 02:56 PM
#1
Thread Starter
Lively Member
Directx 8
what are some ways of improving your fps in directx 8 ?
I am loading a mesh from a file and i get 40 fps at max with hardwarevertex processsing.
what something like culling improve the fps ?
I program in: vb6,vb.net,html,c++,java/script
-
Sep 28th, 2002, 04:00 PM
#2
Lively Member
reduce the number of faces (triangles) in the mesh, use lower quality bitmaps to texture it, lower the screen res, make sure u cache values:
e.g.
for i=0 to 100
j=object.function+5
next i
bad code instead use
k=object.function
for i=0 to 100
j=k+5
next i
especially do this in loops
reduce render state changes. e.g. U can stick 4 128*128 textures in one image file instead of using 4 image files and changing the texture 4 times over.
put as much code as u can in initialsation. Any values that are used in the game loop where possible calculate in initialistion.
the number of faces in the mesh if it goes to high will seriously drop FPS keep an eye on that. Lower ur graphics quality if u have too.
Dont use bitmaps to texture use the TGA format.
it goes on and on thats all i can thnk off from the top of my head.
Dan
PS Meshes are famous for being slow if u look at games 90% of things are made up of flat stuff, they just use alpha blending and the like so it doesnt look like it.
PPS Keep a serious eye on loops
-
Sep 29th, 2002, 03:09 PM
#3
Lively Member
PS Yeah culling is good as well. Set the cullmode to clockwise CW or CCW and set up your geomnetry to render clockwise (CW) or counter clockwise (CCW). Also if something is off screen dont render it. Use D3DVec3Project to determine if a vertex is on or off screen. Draw an imaginery box (8 points) around some geometry. If all of the 8 vertexes making up the box are to the left of the screen then u know that all the geometry is to the left of the screen so do not render it.
-
Sep 30th, 2002, 01:47 PM
#4
Use C++ 
Not really, if you're at 40 FPS when only showing a mesh there's something really wrong, C++ wouldn't help you there. It does help you when you have more game logic but as long as you have mainly DX calls VB isn't that much slower.
How complicated is that mesh? Try replacing it with the tiger mesh that comes with DX8 and see if it is still that slow.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|