Isometric Game Design.

Awesome. I usually use OpenBroadcaster Software, but this program is even more easier to use. Hello, GFYCAT.

Also, I’d like to point out a much better way of transforming the mouse coordinates: using an OrthographicCamera

(rewrite of beginning of code from above)


Vector3 mv = camera.unproject(new Vector3().add(Gdx.input.getX(), Gdx.input.getY(), 0));

float mx = mv.x;
float my = mv.y;
		
// fixed the rounding on these for negative coords
int worldX = (int) Math.floor((mx / (TILE_WIDTH / 2) + my / (TILE_HEIGHT / 2)) / 2 - .5f);
int worldY = (int) Math.floor((my / (TILE_HEIGHT / 2) - mx / (TILE_WIDTH / 2)) / 2 + .5f);

<snip>

A lot of people only use y-down in libgdx. I use it exclusively. No need to change your calculations. Libgdx can be set to y-down with Camera.setOrtho(true)

Thanks for this thread guyz :slight_smile:

I was struggling to invent my isometric game model and gave up after few days. Now I have something basic in just few minutes :smiley:

NOW I SEE WHAT THE PROBLEM WAS.
I’m still using standard orthographic to get the hang of everything before doing all of the changes.
I was trying to use your Isometric code to get the position on a orthographic map and it was confusing me

[quote]Sorry, you can’t repeat a karma action without waiting 1 hours.
[/quote]

Also, I’d like to add, because of the resources you gave me (and a good nights rest of programming in my sleep), I woke up and I currently have a working tile-system that uses a fog-of-war type setting. (I implemented it just to make sure I understood, but I removed it already). I’m currently working on implementing A* Pathfinding for my player as I plan to make this a basic tile-based RPG.

(Similar to how fire emblem used to be with the movements.)

While you’re at it, since you’ve mentioned that resources on how to make isometric tile game is “hard” to find online, why not make a new resource (tutorial, etc.) and publish it via Java-Gaming.org’s latest “Article” feature?

It would not only be a valuable experience in understanding how the isometric tiles work, but also you have something to show to the world of your findings.

I will be doing so once I finish a game and it works properly.