Gridlock Movement Tutorial Advancement

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
connordelaneyy
Prole
Posts: 1
Joined: Thu Nov 27, 2014 10:20 am

Gridlock Movement Tutorial Advancement

Post by connordelaneyy »

Hi all, sorry if my post is somewhat incorrect and such as I am new to these forums. I was following the tutorial here: https://www.love2d.org/wiki/Tutorial:Gridlocked_Player, it is great however at the bottom it states the map can be added at 0, 0 rather than 32, 32. If you can help me make the map start at 0, 0 rather than 32, 32 it would be much appreciated
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Gridlock Movement Tutorial Advancement

Post by bobbyjones »

Try switching

Code: Select all

love.graphics.rectangle( 'line' , x*32 , y*32 , 32 , 32 )
With

Code: Select all

love.graphics. rectangle( 'line' , (x-1)*32 , (y-1)*32 , 32 , 32 )
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Gridlock Movement Tutorial Advancement

Post by bobbyjones »

Then do the same in the test map function

Code: Select all

map[((player.grid_y/32)-1)+y][((player.grid_x/32)-1)+1] 
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests