I’ve got a really big problem with my framerate in my landschape demo. When I run the demo in blender, the framerate will start at 60 f/s, but afther 1 minute it only 10 f/s. So why goes my framerate down like that?
I tryed the demo of Saint_pill, and that one is around 40 f/s and stays like that, but mine is much more smaller, and it has 10 f/s. But I use the same technic as Saint_pill did. It this a bug, pc lag, or did I something wrong?
So could some help me with this? Or is it just my computer which is 1,5 ghz, 512 mb ram, Gefroce 2, 64 mb ram. I’ll hope I can fix it.
I know why it is, (finally I know why something is) and I had the same problem, but I fixed it!! Ok here’s what the problem is: when you link an object to the tile_list script, your ALWAYS actuator probably has the TRUE pulse mode on. You MUST NOT HAVE EITHER OF THE PULSE MODES ON! Because what happens is the always actuator keeps adding it to the list, causing a gradual drop in framerate. If you have both pulse modes off, then it will only add the object to the list at the start of the level.
lemmy: You MUST NOT HAVE EITHER OF THE PULSE MODES ON!
That’s the problem, I have them all off. And still the game drops from 60 to a framerate of 10/11 frames a second. SO that’s not the problem I think.
I turned all the pulse buttons in the always sensors off, but there’s one I can’t put off. That’s the one which has got the sensor for the culling script. If I put it off, it will load the landschape, but with lag, or even forget loading sections, but the framerate is fixed then. But when I put it on, the framerate drops.
lemmy: Because what happens is the always actuator keeps adding it to the list, causing a gradual drop in framerate.
So if I could make a script to empty the list every 1 second, the framerate will be fixed, right? And is this possible, to create a python script which empty the list? :-?
unfortunatly the scripts very sensitive to the number of objects it has to work with, too many and it makes things worse. I’m working on the next version which should see a pretty major speed increase…but you’ll have to wait for that, i’m trying to make a game as well
dont know… havent seen saint_pills culling script… but i don’t see how there could be a better way of doing it… i mean, the script could probably be a little refined, but this way is even better than a Tree that someone was talking about in another thread. (for some reason they called it a binary tree)
Basically there is an “active” piece of terrain.
Every five frames it checks if the player is within its boundries.
when the player is outside its boundries, it checks if the player
is within the boundries of one of its neighbours.
when the neighbour is found, it ‘passes the buck’ and the neighbour
becomes the active object.
when this happens all but the neighbour and the last piece of terrain
are deleted.
the neighbours of the new active object are added
GOTO 1
see its simple…
The problem is you have to give each level section the position and size of its neighbours. if you look at my terrain objects in layer 2 you will find a field called neighbours.