Monday, July 18, 2011

Screens of the day 12 - Not that big

In the above video you can see a map with a playable area of 4500 square meters.

I wanted to create a 10 square kilometer area as a first test, followed by a 20 one. I reckoned that there would be some problems when a large area needs to be updated, like when grass need to grow. And I was right. I do encounter a big snag every time there is a seasonal or daily change. This can be fixed by breaking up the update operation into smaller chunks and executing them in order on consecutive cycles. I won't implement this since I am not planning on allowing such massive maps. I am only doing some tests.

But small snags were just the beginning of the problem. After a certain threshold maps start to randomly segfault on creation. This does not happen every time. Figuring out why everything works fine on let's say 4800 size maps but breaks on 4801 is no easy task.

And there is a secondary threshold after which hardware acceleration fails to kick in. Luckily, Irrlicht is graceful about this failure and falls back to software rendering.

I will be slowly fine tuning the process and make sure that 10 square km maps work fine, but for now I'll abandon the more ambitious 20 square km ones. After my investigation I can tell with certainty that the 20 one would be pushing the limits of a 32 build. Probably even exceed them.

On the other hand, I no longer have guests :(. So back to regular schedule. I have two important posts planned for the week and I'll keep you updated with "Screens" posts in the meantime.

No comments:

Post a Comment