Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8153463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:01:22+00:00 2026-06-06T16:01:22+00:00

I am developing a axonometric (isometric, but with an angled view) tile-based game. I

  • 0

I am developing a axonometric (isometric, but with an angled view) tile-based game.

I have the tile system working just fine, and now i’m moving on to the input issues.

The tiles are not visually matching (unaligned/offsetted diamonds) with the logic behind them (array).

Between the many methods i found with my “google-fu”, applying a transformation (“rotation”) to the input seems to be one that is (code-amount-wise) easy to implement as well as good performance-wise.

The problem is, for all the sources i found, i can’t really grasp what numbers are coming from where, nor what the formula is doing with/to them.

So, i’d like an explanation of the math formula for “Affine transformation” (if this is it’s name, because i’m not sure…)


@Yochai_Timmer ‘s answer to this question is what i want to use, but i don’t understand where the values are coming from (mostly*), nor what is being done to them.

[mostly*]: “28” is half a tile’s width and full-height, “14” is half-height, and “56” is full-width…probably…but that’s pretty much all i got from it, so correct or not, i’m still stuck anyway.


In case it helps you give me a clearer answer, my own tiles are 80 width by 46 height, and i’m applying (rendering) them with the same method (top-right corner of tile 1x2y is located at the center of tile 1x1y, and so on…)

Also, what i’m using is Java and the API is Slick2D. So if you know any hidden functions/classes that help in the formula’s math (ex: Math.sen(), Math.cos(), …), or the issue in general, you are welcome to point them out too, as it might help me a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:01:24+00:00Added an answer on June 6, 2026 at 4:01 pm

    The key idea behind the transformation is to think of the tiles as normal rectangles having undergone a linear transformation. To understand this, suppose that you begin with a normal square, like this one:

      +-----+
      |     |
      |     |
      +-----+
    

    Given this square, you can think of two vectors that define what “up” and “right” mean by just taking two sides of the square:

      +-----+     ^
      |     |     |
      |     |     |
      +-----+     +----->
    

    Let’s call these vectors i and j. You can imagine transforming this square into a diamond by rotating and skewing the square. If you do this, you can think about what happens to those two vectors i and j:

       /\          ^
      /  \        /
     /    \      /
     \    /      \
      \  /        \
       \/          >
    

    Notice how i and j have been rotated and scaled a bit.

    The trick behind the math to determine what square a point is in under the projection is to try to reverse this process. Instead of starting with a normal i and j vector and ending with the skewed/rotated ones, you start off with the skewed/rotated i and j vectors, then try to under the transformation to convert the world back into a nice square grid. The calculations you perform work by saying “given that the mouse is at position (x, y) in the projection, what coordinate (x’, y’) would it have if we undid this transformation?” All the math behind this is standard linear algebra to convert between two coordinate spaces. For a description of how to do this, consider reading this Wikipedia article on transformation matrices, which describe how this process works.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Developing search utility to search a file entire computer system, works fine on windows
Developing iphone application using makkit framework. I have got the map view integrated in
Developing an MVC application, i now need to have test other browser versions. Installed
Developing iOS5 based cocoa app, below peice of comparison works fine if localization is
Developing an application, In which I have many user's account_id(skype id), Now what I
Developing for Android 2.3, I have a question regarding layouts. I use a vertival
Developing a project of mine I realize I have a need for some level
Iam developing one application.In that iam placing the radio buttons(uiimageview) on table view and
While developing an application using gwt in ecliplse crashed. Now the server is running
For developing an devices monitor system, I am using a InetAdress isReachable method to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.