I'm working on an intense isometric game, currently with a fully-functioning isometric map generator and platform physics engine. Unfortunately because of all the objects it lags like crazy on even a 20x20 map.
Besides hardware acceleration, is there a special object I can use to optimize efficiency? An average map has about 1000 objects on it.
n/a
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
4th September, 2007 at 13:01:35 -
Well, giving a bit of information on how you generate the maps and how many objects one tile requires would be nice.
I don't know much about the overlay object, but perhaps you can paste stuff on it and have all collision being regulated by an array object... That'd cut the amount of objects needed for the map system to 1... (or 2, or 3 etc if you have layers).
I've always thought it might be possible (though rather coding-intensive) to use a Text Blitter object for in isometric engine.
You'd have one Text Blitter, and every frame it'd load every visible map tile and every sprite as a character in the order that they'd be layered, as well as storing the calculated X and Y position (along with anything else) for each one.
Then you'd use the Text Blitter's "callback" function to place each character in its appropriate spot, and maybe change its X/Y source, or transparency, or whatever else you'd want.
However, this would require thorough knowledge of how the Text Blitter works, and would mean that every single ground tile, character, animation, or whatever, would need to be a tile in the Text Blitter object.
And even so, you'd run the risk of slowing things down or even crashing the program by overloading the Text Blitter's callback function.
...but if it DID work, it'd be a really sweet, solid engine.
The engine consists of a 2D "real" map which handles the collisions(invisible to the player) and an isometric map.
Sensors around the player return the height from the 2D map tiles they're overlapping. The player is then allowed to move around based on the height values returned from the sensors. The maps are loaded from an array at the beginning of the level.
-Edit: ---------------
I realized that I hardly used the 2D "real" tiles for handling collisions, so I just converted them into grabbing information from the array instead.
My 20x20 map now only has about 500 objects on it(consisting of isometric ground tiles, isometric water, isometric bridges, the player, and all the 2D "real" player objects.