Speed up - any advise
Blitz3D Forums/Blitz3D Programming/Speed up - any advise
| ||
Hi, Does anyone know of a method to speed a game up with out using lower poly models, like storing the stuff in arrays or something like that. if anyone knows of any way to speed up games in blitz please help me if you can. If this is unclear please tell me so, so i can try and make it clearer, cause i'm not very good at english so it doesn't help me alot when asking questions. |
| ||
There are lot of things that can speed down your game. MultiTexturing, lot of surfaces, lot of useless math calculations, bad programmed routines, too much polys, etc... This problem has no easy solution. The best way is to calculate the time required to call your functions to see where is the bottleneck. For example: rendertime = Millisecs() RenderWorld() rendertime = Millisecs() - rendertime Then Check rendertime to see how many milliseconds it takes, to see if the problem are your graphics... |
| ||
yeah.. the slowdown might not be the rendering :) Ive added a few FPS by cutting corners and instead of having: Function GetValue() ;Lots of maths and loops n stuff here. Return Value End Function and having that run 300 times each loop, I have Function UpdateValues() ;calculate values and store in an array End function Function GetValue() ;Get value from array we stored it in and return it Return Value End Function This gave me a 10-15!!!fps speed increase in an ODE Car racer project where there were 8 cars and lots of AI. This difference is what made the difference between a scrapped project and a decent framerate :) |
| ||
ok well i'm not using multitextureing at the moment, but yes i do have a lot of polygons for detail, i'm not using any functions at the moment so it must be that i'm using alot of polys, but i dont want to decrease the amount of polys used, I'm using a radeon 9800 xt - 250mb graphics card, at the moment i'm not using textures it's just a blank mesh. any idea of what i can do to make it faster, not sure if blitz can do it but it would be nice to do some speed up thing like eidos and such. |
| ||
I just had an idea, is it possilbe to stop memory being used on polygons not in view, like get the polys writen to a file till needed or something like that. |
| ||
A common mistake is to do everything every frame, instead of doing only what needs to be done in every frame. An example is an asteroid field of a hundred asteroids. Many people would rotate every asteroid every frame, but it would be more efficient to rotate just one or a few asteroids every frame. Andy |
| ||
Goober, split your scene and use HideEntity to hide unneeded parts and ShowEntity to display the needed parts. |
| ||
If your scenen is made of multiple meshes, reduce the camera range to the min, so it may skip things out ouf the camera range automaticly from rendering. You can also use Fog to reduce the required camera range. |
| ||
Another thought: when I first started because I couldn't make my own models so I downloaded a model of a skull which I needed. I was so green that I didn't realise that a single highly detailed model (in this case a medical mode, 100,000+ faces) could bring the system grinding to a halt. |
| ||
A have a few Speed tips on my programming tutorial. It doesn't have much yet. I need to add a lot... |
| ||
Pray doth tell us good sir how many polys thou art chucking about in thee first-most place? |
| ||
...yup..and my suggestion will be...forget about hi poly models..and be focused on excellent texture on low poly models...good texturizig can hide a lot of things on low poly mesh... |
| ||
Tell us exactly what your game is doing, and the poly count you have. You have a pretty decent graphics card. |
| ||
Also because there is no strict rule like convex hull Meshes for BSP, you can often remove a ton of polys that will never be seen from within the play area. You will be amazed with just how few polys you actually need to produce the same result as a BSP friendly equivalent in a 3D app. sometimes 2-3 times less. Just takes parctice to figure out how to optimize your art assets. |
| ||
ok well i'm using rhino to make my models, at the moment all my game does is load a scene and allow you to move the camera. the scene is supposed to be a church hall but i only did the enterance of it and a small hall. exported so it was quite details it was 84626 polygons and 47427 vertexs alot i know but there aint many tools which i can find which will allow me to create good levels easily that wont be to primitive. I've tried to use milkshape for levels but it is not good for that sort of thing. the main problem is that i dont have any good source of textures and even when i do get some i'm not very good with placing than onto levels, i think that is the main reason for me not using low poly models. I think i'm starting to blaber abit now. |
| ||
just wandering if DeleD is any good? |
| ||
deled is okay. Nothing special, but gets the job done. The lite-version at least has some issues, but nothing you couldn't forgive. After all, it's free. But I think you really need to cut down those polygons. 84000 polygons for church entrance is really, really too much. Check www.planethalf-life.com/wadfather for q3 and hl textures. Also, make sure you are not checking for collisions on those 84000 polygons. |
| ||
man..thats hude...DOOM3 level has around 25000 polys... |
| ||
Ok Thanks for the link, I'll used deled for now possibly with some help from rhino, and i'll make sure i dont use as many polygons from know on. thanks again all for the advise. |
| ||
don't try to compensate the lack of good textures with high level of detail in the mesh. Instead go the opposite way. Most small (to about 10 centimeter depth) details can be faked with textures. Take some time to get your colletion of nice textures in a quality that would make even a cube look like something in a hollywood movie. If you have a digital camera, you may make a trip and shot your own material, then use some texture tools to make them useful for your game design. Alternatively you can find a lot of useful photo rough material in the web. EG. pictures of churches and cathedrals, mosaics etc. If you don't plan to publish your game, you may use Textures from other games too. |
| ||
ok, thanks for the advise, i think i will go and take some pics because my game is hopefully going to be similar to gta but based in my area. thanks again for the help. |
| ||
While 85,000 polys is a lot, that's not responsible for any slowdown alone. I've had scenes with over 100,000 poly's going with animated characters, shadows, physics, AI and a lot of other stuff without dropping any frames on a videocard a lot slower than a 9800 XT. So while I'm not advocating leaving the scene as high poly as it is ( though it's hard to judge without seeing it ) there must be other issues here too. |
| ||
Sybixsus are you talking about a small scene like a church door and hall or a complete map with culling? If it's a small scene with all that going on then I'd love to see a demo if possible because you must surely have few good tricks up yours sleeve there...and which slow card did you test it on at what fps? |
| ||
Sybixsus are you talking about a small scene like a church door and hall or a complete map with culling? Well small in the sense that most/all poly's were being drawn at one time. If it's a small scene with all that going on then I'd love to see a demo if possible because you must surely have few good tricks up yours sleeve there...and which slow card did you test it on at what fps? No tricks of any kind, that was an unoptimized early demo. Running at refresh rate on a 9500 Pro. |
| ||
I'd still love to see a demo. I can't get anywhere near that mark on a 2.2gig athlon with a geforce 4 TI card with characters animated...let alone with physics, shadows and whatever else you had running there. And this was in Blitz3d?...what poly count were the characters? ..and was it all textured etc.? Sorry to bug you but performance issues are what caused me to put on hold one of my games - this is of great interest to me. |
| ||
I'd still love to see a demo. I've modified the scene quite a bit since then, and it's down to only (!) 50k polys though more AI and general calculations have been added since. It's still running above refresh rate on my 9700 Pro, even in debug mode, though I don't know about anything lower yet. I do plan on releasing a demo soonish though, as I need some feedback on the controls early on. It'll scale down from 50k polys to probably 10 or 12k on lower machines though, just to be on the safe side. Yes, Blitz3d. Characters between 2000 and 5000 poly's each. Only two characters on screen at a time. Two shadow casters ( the characters ) one shadow casting light and one shadow receiver ( the ground. ) All textured. Surfaces kept to a real minimum. Maybe 20-25 surfaces total. |