Stencyl 3.4.0 is now out. Get it now!

Isometric Coordinate Conversions Extension

merrak

  • *
  • Posts: 1605
Isometric Computation Tools
Works on Flash and Linux. Untested on iOS, Android, and Mac

This is an extension to perform routine calculations when converting from scene (screen) coordinates to coordinates in an environment with isometric projection. It allows for quick conversion back and forth between both coordinate systems. It also supports isometric tiles, rows and columns, and custom placement of the environment's origin in the scene.



Example game using this extension: http://www.stencyl.com/game/play/30916

You can download the packages at my site (see "Documentation" section), or at the links below:

Get it

- ZIP file
- TAR.GZ file

(How to Install and Update an Extension)


Documentation

The full documentation is on my site: http://www.anorthogonaluniverse.com/public-code/isometric.php, and includes a full function reference.



Version History

Use this section to record updates and changes to the extension.

« Last Edit: May 23, 2015, 10:54:07 am by merrak »

mdotedot

  • *
  • Posts: 1260
Hello Merrak,

This looks awesome. Thank you for your work. I ran the demonstration you have in your profile/arcade and I suggest you put that in the post as well so that we can see what we can make with this cool extension.

Right now I have a lot on my plate, but maybe a future Ludum Dare would be perfect to play with this!

Thanks again for your efforts.

Best regards from
M.E.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

merrak

  • *
  • Posts: 1605
Hello Merrak,

This looks awesome. Thank you for your work. I ran the demonstration you have in your profile/arcade and I suggest you put that in the post as well so that we can see what we can make with this cool extension.

Right now I have a lot on my plate, but maybe a future Ludum Dare would be perfect to play with this!

Thanks again for your efforts.

Best regards from
M.E.

Thanks for taking a look! I added a link to the arcade game, although it is using an older version of the extension that had a hard-coded origin.

merrak

  • *
  • Posts: 1605
Update - Version 0.91

Released an update to this toolset.

* Bug fix: xSceneAtRC and ySceneAtRC had row/col flipped. These functions are at lines 86 and 91, and should read:

Code: [Select]
    /*
        Convert from grid row,column to scene coordinates
    */

    public static function xSceneAtRC( row:Int, col:Int ):Int
    {
        return xSceneAtGridXY( col * tileSize, row * tileSize );
    }

    public static function ySceneAtRC( row:Int, col:Int, level:Int ):Int
    {
        return ySceneAtGridXYZ( col * tileSize, row * tileSize, level * levelHeight );
    }

Correction has been applied to the download on my site.

LIBERADO

  • *
  • Posts: 2436
Thank you so much, @merrak. This useful extension really facilitates the work.

« Last Edit: January 24, 2016, 09:18:53 pm by LIBERADO »
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

merrak

  • *
  • Posts: 1605
You're welcome! This extension is due for an overhaul; once I get to a good stopping point on my current project, I'm going to revisit the isometric game (and this extension). If you feel any features are missing, please let me know :)