Jump to content

PHASER: Is there any tutorial on how to do an isometric game?


DWboutin
 Share

Recommended Posts

On 13/04/2016 at 9:31 PM, Milton said:

There's not that much math actually. Depth-sorting is the real pain...

The maths is fairly simple - a good understanding of trigonometry really helps however, as it does with most games programming. The depth sorting can be simple; it depends on what you're trying to do. If you have a rigidly grid-based game, it can be a simple matter of sorting by the objects' Y positions on the screen. If you start having objects come quite close to one another or otherwise not totally respect the grid layout (which tends to be the case) then you may need some more complex sorting (this is a good implementation which I've adapted for my plug-in).

If you want objects to have full 3D positioning, with the ability to be stacked on top of one another, have arbitrary sizes and so on, then welcome to a world of pain; as some stuff is either incredibly hard or in some rare cases, near impossible with sprites in an isometric layout. It's often better in these cases to find ways to cheat, such as splitting large objects up and moving objects to different depth planes to simulate certain depth effects. It's all interesting stuff though, so by all means go look at the work that's been done elsewhere and come up with your own solutions - the world is made a better place with more minds working on the same problems :)

Link to comment
Share on other sites

  • 9 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...