Framerate, fixed. Checkout landschape demo, with culling.

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? :frowning:

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.

Here’s the .blend: http://home.tiscali.nl/jdvhulst/elysiun/landschape_demo.blend :-?

Ya it happened on my computer here at work too JD…started off at around 40 fps and slowly dropped until it was very close to 10fps.

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.

And no, it’s not you’re computer. My game runs at 25 fps on my 1.8GHz 256MB RAM computer, so It’s not you’re computer.

I got 60 all in 5 min and then it slows :wink:

lemmy: You MUST NOT HAVE EITHER OF THE PULSE MODES ON!

That’s the problem, I have them all off. :frowning: 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? :-?

That’s the problem, I have them all off.

hey jd, youre missing 2 =) the ‘grass over the cave’ tile, and the cave tunnel tile

nice landscape :stuck_out_tongue:

Oooh, you don’t belive this, I fixed it Blengine, great. But btw, I tought I had checked all the tiles. :-?

nice little landscape, i like the plants :slight_smile:

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 :stuck_out_tongue:

cheers
Piran

Working on a new version. Cool, great, then I’ll wait working further on the demo landschape. I’m just trying to test what I can do with it. :smiley:

Looking foward to new and improved culling solutions! :wink:

Gravedigger! :<
:wink:

I made this about 8 months ago. its for blender 2.25.

My culling script s running time is not proportional to the number of segments… however it takes a while to set the scenes up.

The reason i don’t release it is that i am the worst person in the entire world at making Landscape…

i’ll put it up on my web site as…
http://blender.colourmap.com/HugeWorldDemo.zip

it uses a object oriented system. not in the coding but in the interaction.

-Luke

How does it work?

Very interesting. Would love to figure it out (or read a tut ;)). How does this mrthod compare to Saint_Pill´s LandscapeDemo.blend culling script?

I get a 404 error on:
http://home.tiscali.nl/jdvhulst/elysiun/landschape_demo.blend

now I’m all disappointed

z3r0 d, be disappointed no more: grab this blend file, which is LandscapeDemo with comments by the author (Saint_Pill), making it easier to implement.

http://mysite.freeserve.com/liftstudios/Canyon_test.zip

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)

  1. Basically there is an “active” piece of terrain.
  2. Every five frames it checks if the player is within its boundries.
  3. when the player is outside its boundries, it checks if the player
    is within the boundries of one of its neighbours.
  4. when the neighbour is found, it ‘passes the buck’ and the neighbour
    becomes the active object.
  5. when this happens all but the neighbour and the last piece of terrain
    are deleted.
  6. 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.

-Luke