1209
« on: April 29, 2016, 01:59:17 pm »
Many level editors support adding objects in this way (it's the same process as creating/placing NPCs, the only difference is they have no scripts or have different types of scripts associated with them). It is rare to find engines that support tile-based non-grid "sprites" out of the box these days; it always seems to require custom code, but it can be done.
The reason it isn't done more often is because it creates a performance hit compared to doing everything grid-based, since it requires more sorting (per FRAME as different characters weave between the static objects) and more pixel-position calculations as the camera moves. You'd think that with modern computers the performance on 2D games shouldn't be an issue, but it still can be, especially if you're making a browser-based or mobile game. Also, for a well-designed tileset and map, the quality difference is often not that noticeable.
And of course, grid-based levels reduce the complexity of the code and the work a level designer has to do.
World tiles can be animated, even dynamically (e.g. to react to wind caused by a player's attack), so for something like wind animation, there's no need to turn things into game objects unless there's another factor requiring it, e.g. if you really want to erase the grid beyond an artist's capability, or those objects are also something the player can walk around and that you can't handle with clever layering. Keeping static objects as part of the world layers, even if they're animated, helps with performance since it avoids unneeded depth-index calculations and reduces the number of draw calls.
Truly interactive objects, such as piles of rocks that can be shoved apart by a player attack or by walking into them, should of course be game objects. Whether they're grid-aligned or not depends on the look you want, but assuming you want a very naturalistic world, why not have them off-grid? That is already how it's done in most games I think, although many keep their interactive objects grid-aligned for aesthetic and gameplay reasons.