68 Actions

How do I use tiles and sprites together in an isometric scene?@Sidar Much of what we're discussing here in the comments seems very specific to your particular game though, so I don't think I'll be able to give good, precise answers that couldn't be found more easily by waiting until there's a problem and then trying out different ways to fix it. (That's assuming you're not making a mobile game. If you are you should probably (no experience here) cache as much as possible of the rendered scene to avoid draining the battery too quickly, even if you don't hit immediate performance problems.)

May9

comment

How do I use tiles and sprites together in an isometric scene?@Sidar That should be fast enough for almost any application then. If you use linked lists as buckets you can reduce the amount of "empty" space allocated, if the amount of sprites per bucket varies more than an implementation specific amount. Since you can usually remove or insert linked list nodes, you don't have to destroy and reallocate any objects when moving an item from one list to another. With a doubly linked list you also have a reference to the previous item, so if a sprite knows about its list item you can pick it from the old position and insert it into the new bucket very quickly

May8

comment

How do I use tiles and sprites together in an isometric scene?@Sidar If you never move anything from the midpoint of a tile then the pigeon hole algorithm should be viable, but a better option might be organizing your scene in such a way that it updates when sprites move between tiles and has a persistent ready-to-render structure, like a grid of the tiles. If you reuse (doubly) linked list items this can be done fairly efficiently.

P2P card game: Shuffling without knowing the final order?Side note: "verifiable + difficult to guess" can be applied to all situations where secrets have to be "locked in place", so in theory it's possible to create a strategy game with fog of war similarly, signing the partially secret actions as the game goes on and revealing them after it ends, when no unfair advantage can be gained.

How to draw efficiently large number of objects with alpha blending?Occlusion checking between trees won't work, as the textures are at least partially transparent and the target tree is a billboard and not a point. Occlusion checking against other objects may work though. Z-buffer sorting doesn't work properly on semi-transparent pixels, wich is why they must be drawn back to front. Culling is a good idea if you do it before sorting the trees.

Heightmap, Voxel, Polygon (geometry) terrains@MartinSojka Thanks for pointing this out, I've corrected my answer. Now that I've thought about it, the reason why so many games use heightmaps is probably that they work well for collision detection and that they're really easy to edit.