Page 1 of 1

problem with isometric tutorial

Posted: Thu Mar 27, 2014 8:44 pm
by greentiger
I got the isometric tutorial to work after some tries since there seemed to be a few details omitted, but now that I have it working it seems squished--so there's something i'm missing about the camera aspect of the whole thing. specifically i'm asking why is the grid not centered?

tangentially I would like help to figure out how to pan the view and rotate the field.

Re: problem with isometric tutorial

Posted: Thu Mar 27, 2014 10:33 pm
by micha
In the drawing function you divide by 2 one time too much. That is why the y-coordinate looked squished.
I took the liberty to replace the blocks by isometric tiles and correct the drawing function.

The tiles are always drawn in the place you draw them. If you want the map to be centered you either have to shift the map or use some sort of camera functionality. There are some libraries out there. For example Gamera. Also some tutorials.

I implemented a very simple camera into your game by hand. See the attached .love file. Use wasd to control.

Re: problem with isometric tutorial

Posted: Thu Mar 27, 2014 11:50 pm
by greentiger
based on your updates I came up with this (using my tiles I made earlier).
I was going to try to add scaling(zooming in/out) next and then probably grid rotation and try to figure out a camera offset so the map's centered. The next thing after that would be to add a Z component for the tiles.

Re: problem with isometric tutorial

Posted: Fri Mar 28, 2014 12:01 am
by micha
Looks good.

Good luck with your project.