Skip to content

Isometric Map Coordinates #60

Description

@shipstar

I'm playing around with an isometric map I created with Tiled. As far as I can tell, Joybox (and maybe Cocos2D) doesn't handle the isometric angle when I make calls like contains_point? and coordinate_for_point.

isometric

In the map above, Joybox reports the very top-left corner of the screen (black space) as [0,0] in coordinate_for_point. The left corner of the actual map returns [0,4] or [0,5], depending on where you click. This makes sense, but it seems undesirable.

I would expect the left corner of the map (or some other sensible choice) to be [0,0], the bottom corner to be [0,9], the right corner to be [9,9], and so on. (I could also see the bottom corner being [9,0] -- as long as it's consistent, it seems fine.)

Staggered isometric maps would throw another wrench into these works. I'm not sure how I'd solve that yet, but I'm open to ideas.

Are there any plans to support this sort of coordinate system within Joybox? (Does Cocos2D support it?) I imagine that I'd need a lot of other methods on or coordinating with an IsometricTileMap for strategy-style games -- path-finding, for example -- so maybe it makes more sense as a separate gem if I get that far.

Thoughts?

Edit: To be clear, I have No Idea What I'm Doing™ when it comes to isometric games.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions