Hey guys,
Sorry, I’ve been working on an HTML5 game project for the past week and then i have the GCD next week–so I won’t be back on Ceramic until April.
However, I had an great idea on how do do the culling without having to change anything with how a user loads a map and should only take me a few days to get working.
Here’s the concept… When you load a map it will return a big transparent display group the size of the map. Inside that display group there will be enough images to cover the screen with and extra row or column on each side. The display group will have an enterFrame() event that tracks it’s x,y vs the screenBounds and will shift the extra row or column around if the x,y changed enough that the any row went offscreen.
So at most you will only need to update a couple of rows and most of the enterFrame() events will be invalid anyway.
I think this will give the maximum performance and will allow for large maps that can be moved easily. Plus no map.update() event would be needed so it would be easy to implement.
@Caleb, I think this is kind of like your approach, but it looks at relative position of the map, rather than rendering the tiles at a position.
@cjc83486 I don’t know how physics objects would be handled yet, but I imagine they would need to be around regardless of where the map is being drawn. You can’t have a floor that’s holding a bunch of objects up dissapear just because it scrolled of screen