wow now that is lag

ya ok im working on that remake of Quake 2 and im almost done got the weapons set up got the scripting mostly done(for the first level) and i turn it on and wow 11fps im on a custom built gaming pc i play FEAR on max with no lag please help here is the .blend
http://www.savefile.com/files/102402

thanks
Joel

awesome! nice remake work, i remember that level :slight_smile:

I think part of the problem is that everything is being rendered at tteh same time…

the quake engines use a zome type of culling with portals… this way only the zone that you are in and the next zone are the only parts being rendered.

I dont think BGE supports this… you will need to make some way to stop the game engine from rendering eerything at once.

perhaps make small pieces of the map in diffrent scenes, so when the player goes thru a door they are moved to the next room scene?

nice work on the textures and models :slight_smile:

fps is around 50

but it down to 30 when i see in a direction (near the second door) , i don’t determinate why :confused:

is there a way in python to render things only in a certain distance of the camera
that should so be a feature in the next relaese a little slider that sets ur render distance

First, This is a really nice .blend.

From what I can see the problem is that the physics and logic are taking up too much time 23% physics 60% logic. and the rasterizer(which does the drawing) only gets 4%. thats why your getting slow framerates.

I really like this file though, so I’ll play around with it and if I come up with any solutions, I’ll send a .blend file to ya.

-late:cool:

Someone should really make a tutorial on pre development planning.

It could be several things. The best I can do for you is guess:

  • Your textures may not be sized in powers of 2, therefore blender has to take up additional cycles to resize them (Or so I’m told)
  • Your textures may be too high res. 256^2 is somewhat of a BGE standard, I would personally try to stay on that level, making exceptions only for special objects that really need to be 512^2 (Like a skybox). Also try not to go overboard with seamless repeating, because having even a 64^2 texture repeating 100,000 times can put a considerable strain on performance.
  • All the on screen debug info could be sucking up cycle time. Try turning most of the debug counters off and see if performance improves. Also don’t forget to go over your scripts, and optimise, optimize, optimize (Then when your done optimizing, optimize some more). Remember it’s not C code, don’t leave things just lying around. Especially when you don’t really need them. Even if working, sloppy python code can hurt your performance quite a bit (Optimize).
  • You may have too many things dynamically lit. Dynamic lighting takes up alot of cycles, that’s why many developers simply use vertex colors to bake effects. (There was a pretty good tutorial by OTO on the matter). You can light several moving objects without many problems, but try not to use dynamic lighting to light static objects (Like walls, and most of the environment)
  • Poly count may be too high. Sometimes things can look low poly, but you should really take the time to examine any more complex meshes, how many of those are on screen at any given time etc (results may surprise you). Think in cubes, keep it simple.If your looking for good, solid performance, the key is optimization. Usually it’s good to make very solid plans before you actually begin anything. If you don’t, things will tend to get messy, and you end up having to comb through your half completed project several times in order to find the kinks.

10-30 fps on my computer

It gets very slow even in wireframe, it has something to do with logic.

Make sure that you aren’t using near/radar/ray sensors, and that there is nothing else like that updating every frame.

I can’t download it. Savefile says something about the HTTP server not being online… try back later. Social’s suggestions are all very good, and I couldn’t have put it better myself. Here are some more good tips from NaN (the old Blender company, before Blender went open-source).

I’m very concerned by reports of Logic taking 60% processor speed. That’s horrific, and I guarantee that’s where the problem is. Check the console at runtime to see if you are generating any errors. If not, then you’re probably running a ton of CPU intensive scripts or using lots of logic bricks instead of a script. Also, too many “Always” sensors will drag you down.

The script “AIray” is returning errors.

Use an if statement to make sure getHitObject returned an actual object and not a None type(When the ray isn’t hitting an object):


        Obj = Ray.getHitObject()
        
        if Obj:
            # Now use Obj

Once I fixed the script I was getting 100-200 fps. The game would eventually slow down to 20 fps without the fix.

Yeah. I just dl’ed the file, and Lagan’s right on. The frame rate is back up at 1.8 fps on my piece of junk graphics card instead of .6 fps. I really like what I saw of the game. I never played much of the original Quake, so I can’t offer much in the way of comparison, but I can say that you’ve got a nice looking game going. Keep it up.

o thanks Lagan back up to top end u fixed it
logic back down to 19%

WOOT
Joel

I’m not sure about that. Logic bricks are coded in C++, scripts are in Python, and Python is by nature slower than C++ (since Python is “higher level”, that is farther from machine language). I don’t know exactly what the speed difference is, but I know that some scripts can get pretty heavy on the CPU. Anyway, I’ve heard a lot of “scripts are faster than bricks” but I can’t remember hearing it from anyone reliable.

What I meant by “you might be using a lot of logic bricks instead of a script” was that you shouldn’t try to substitute a lot of logic bricks for a complicated task that could be easily handled by a relatively simple script.

ummm… sorry but your setup is totally f***** up :slight_smile:

i like the level and stuff though but…

and it runs like 9-16fps on my comp

did u fix the python here is the fixed vertion http://www.savefile.com/files/103574

cant download the first 1 and when i download the fixed 1 it has nothing in it.

0KB

I suggest using http://www.snapdrive.net, as it is much better.

Your game runs much better now for me.

The reason why it lags on your computer is that Blender’s game engine it not made to create big games like Quake or something else, because the programmers never took peformance as number 1 when coding on the game engine.

Althought you can make your game run faster by doing a lot of things as keeping in mind the filesize of textures, sounds and another things, but things that really speed up your game are things like creating culling, level of detail script that show objects only when in close distance or increase detail when comming closer. Also splitting up your game in more then 1 blend file increase speed, no idea why but I think it has to do with the overall filesize of 1 blend containing a complete game.
The technic about sector culling was included in the game engine around version 2.1 or something, but this same technic can be archived with python.

Personally I hope someone will look into the game engine performace problem and update the engine on that part, maybe Ogre will do a significant chance in the game engine render performance, but I’m not 100%, we just have to wait a little while, but for so far I was the test build runs a way faster then the game engine does now. :slight_smile:

[quote=Social;714634]Someone should really make a tutorial on pre development planning.

I think you are sooo right.

But better yet a thread or sticky on planning would be a great asset, I just don’t know why you haven’t done it yet:)