How do I - several elements of iso game

0 favourites
  • 5 posts
From the Asset Store
Several elements of the game interface hidden objects
  • Hi ppl,

    Working on isometric game and have several questions about it:

    • What would be mest way of isometric map building?
    • How would you go about elevations of terrain in relation to distance of projectiles?
    • How would you handle z-ordering?
    • How would you go about doing half-transparent fog of war: terrain is visible but npc are not?

    Thx!

  • 1.

    Probably a grid based approach. I might use tiled and a parser to read the iso grid, but that may be an overkill. Or I might just place objects in the editor or make an editor so I also get sorting. The level design is just data and it should be possible to convert it to any format that's needed to use.

    2.

    The isometric view is just smoke and mirrors, I'd use a 2d array with the heightmap info for the grid, and compare the projectile isometric positions with that.

    3.

    I've devised complicated sorting before to find what order to draw the object's based on their isometric size and position, but it's not very fast as i boils down to being a topographical sort. For most isometric games it's acceptable to do sorting like this:

    For each sprite sorted by 10000*isoX+100*isoY+isoZ

    ---- send to front

    Well not exactly, you may need to change the positions around. Basically it reads that more y will be infront of more z and more x is infront of everything.

    4.

    I'd store the fog in an array like the heightmap and set the units to be invisible if they were on grids with fog.

  • R0J0hound Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Arima Hi, I know you had some successes with rts type formations and avoidance of moving characters. Could you help me with that? Thx!

  • Getting that working was crazy complicated. Basically it involved using physics to push units out from each other as it's the best push out method for crowds.

    Details if I remember them correctly, it's been a while since I worked on it:

    Physics is cpu intensive so I was activating and deactivating physics for each unit depending on the distance to the next closest unit.

    Had two movement methods, one updated physics velocities for movement when physics was on, event driven movement when physics was off

    Was going to implement path obstruction via updating the path finding collision grid, stopped working on it before that feature was implemented

    Had an idea for units to take turns getting though a small passageway if going opposing directions, some units would be designed to ignore that on purpose and shove everything it could out of the way

    Used path finding, stored nodes in array

    Would cycle through instances and have them reevaluate if they've made progress on their path since the last check. If not, check for path again. If still no progress after some amount of time, move somewhere else.

    This was pretty hard to implement and it wasn't perfect either, but it was the best I had managed.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)