Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Semi-worlds related, active object limit increase?


Recommended Posts

It seems that my bridges have stopped loading up when I try my stage, it's possible that i've hit an active object limit but in active objects I only have around 100 rings, 12 or so monitors and about 40 objects for animated waterfalls, yet now bridges refuse to appear when I play test.

I remember in MMF1 you could change the limit but for MMF2 I can't find such an option, is there one? if not does anyone know the way to stop the problem? For a good example i'm probably using way less active objects then blaze has in his TFH demo.

Link to comment
Share on other sites

Be careful when increasing active object limits. If you are going over the limit, there is a good chance you are really going to lose out in performance. Whenever you have a gimmick or anything that uses a number of actives, make sure that you don't have all of its objects running until your character is within a certain range of it's triggering object (yes, you'll need to figure out how to make a triggering object). Don't use anything elaborate to do that, just use...

(x1 - x2)^2 < distance ^ 2

And make sure your distance squared is actually stored as a single number rather than as a number to a power (IE, calculate it yourself).

Also, you might consider using active loading zones... an experiment which Dami and I had originally wanted to include with Worlds but didn't due to the fact that... well, I got lazy. Sorry. But the concept is like this...

You have a qualifier for all objects that need to be loaded dynamically. These objects all need to be catalogued by type number in an array. Special attributes of these objects (individually) should be catalogued in another array if they apply.

Your level works as a series of x = 320 blocks.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Your character at any time can occupy only one of these blocks.

XXXXXXXCXXXXXXXXXXXXXXXXXXXXXXXX

The blocks your character starts on and are surrounded by are loaded at the start of the level.

CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Whenever your character changes position a new block, The blocks ahead two squares and behind two squares are unloaded

uACAXXXXXXXXXXXXXXXXXXXXXXXXXXXX

And in doing so, you are only adding objects from the array/removing objects by their zone ID as advance from block to block.

Still, that'd obviously take some time to make, so I wouldn't worry about all that just yet.

Link to comment
Share on other sites

I remember back in MMF1 you could do a nice invisible/visible trick to keep active objects off the screen invisible to speed up the frame rate, i'll have to apply something to this.

I upped the value from 1024 to 2000, I never realised the counter was for each level separately, it's why I missed it. I can understand that raising it too high will eat more ram or processing power but right now the game still runs butter smooth at 60fps with vsync on, and my pc is showing it's age quite a lot now.

Speaking of vsync I read on this forum that it was pointless for LCD/TFT monitors, I been on a widescreen samsung lcd for years now and vsync still does the job it's supose to do, sonic worlds as default for me had it turned off and the game would tear extremely bad.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...