problem with isometric tutorial

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
greentiger
Prole
Posts: 16
Joined: Tue Mar 11, 2014 6:48 pm
Location: united states

problem with isometric tutorial

Post 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.
Attachments
test3.png
test3.png (3.62 KiB) Viewed 2132 times
test3.love
(994 Bytes) Downloaded 109 times
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: problem with isometric tutorial

Post 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.
Attachments
test3_new.love
(1.52 KiB) Downloaded 132 times
greentiger
Prole
Posts: 16
Joined: Tue Mar 11, 2014 6:48 pm
Location: united states

Re: problem with isometric tutorial

Post 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.
Attachments
screenie.png
screenie.png (17.38 KiB) Viewed 2109 times
test4.love
(2.78 KiB) Downloaded 153 times
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: problem with isometric tutorial

Post by micha »

Looks good.

Good luck with your project.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], rabbitboots and 5 guests