Re: [SOLVED] Best Way to load a level
Posted: Mon Feb 18, 2013 6:00 am
I see what you mean too.DistortedLance wrote:There are, of course, disadvantages with this approach. It's not quite as flexible when it comes to having multiple tiles with the same graphic but with different collision bounds, so depending on the scenario, a separate collision layer could easily be reasonable. You could do various things like bit-masking the collision type in the "tile index" (if you already had spare bits available) rather than fixing the collision types when loading the tilesheet if you wanted specific collisions per-layer, or just read in an additional value per map-location if you wanted this additional flexibility. If you're using the bit-mask approach, there's no additional memory usage, while the per-location method is a relatively small number of kilobytes. It's probably better for him to decide what the realistic needs of the game would be, rather than simply choosing a method for a constraint that might not necessarily apply.lalacomun wrote:Now your goal is to handle multiple layers, like tiles, objects, collision etc...
Just a tip for your engine, i dont recomend having a "Collision layer" it uses more RAM and more HDD space, you may say that 1 mb of ram doesnt matter but when you are working with low resources hardware that meg of ram makes the difference i recommend you that each tile have a simple boolean value that sets if its colidable or not, this way you can have something like "colliders" like the ES engine that sets what part of the tile is colidable ex: upper half of tile, left half tile etc...atleast thats the way i handle collision in my engine
But I'd say the collision boolean is probably more suited for my kind of game.
But I think I saw your approach in a game called Limbo