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.
problem with isometric tutorial
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 16
- Joined: Tue Mar 11, 2014 6:48 pm
- Location: united states
problem with isometric tutorial
- Attachments
-
- test3.love
- (994 Bytes) Downloaded 109 times
Re: problem with isometric tutorial
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.
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
Check out my blog on gamedev
-
- Prole
- Posts: 16
- Joined: Tue Mar 11, 2014 6:48 pm
- Location: united states
Re: problem with isometric tutorial
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.
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
-
- test4.love
- (2.78 KiB) Downloaded 153 times
Re: problem with isometric tutorial
Looks good.
Good luck with your project.
Good luck with your project.
Check out my blog on gamedev
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Google [Bot] and 8 guests