Page 5 of 5

Re: Tile-based tutorials

Posted: Sun Jan 02, 2011 6:20 pm
by kikito
I've just finished Part I of the tutorial - both the code and wiki documentation.

I'll start coding Part II (entities) tomorrow.

In the meantime, please feel free to look around and help me fix any typos, unclear sections, etc:
Regards!

Re: Tile-based tutorials

Posted: Sun Jan 02, 2011 8:50 pm
by Ryne
kikito wrote:I've just finished Part I of the tutorial - both the code and wiki documentation.

I'll start coding Part II (entities) tomorrow.

In the meantime, please feel free to look around and help me fix any typos, unclear sections, etc:
Regards!
AWESOME!!!

Can't wait to continue!

Re: Tile-based tutorials

Posted: Sun Jan 16, 2011 6:12 pm
by StoneCrow
i have been working through this tutorial
on this page
the draw code doesnt work

it raises error:

Code: Select all

incorrect parameter type: expected userdata
in fuction drawq
and i beleive its being called over the "char" variable


i did hit another error earlier in the tutorial,
but it was easily corrected, simply to do with a change to

Code: Select all

Quads = {}
for i,quadinfo in ipairs(quadInfo) do
  -- info[1] = x, info[2] = y
  Quads[i] = love.graphics.newQuad(info[i][1], info[i][2], TileW, TileH, tilesetW, tilesetH)
end
thats all i can remember from the fix i did, it has been a while since i did that bit

Re: Tile-based tutorials

Posted: Sun Jan 16, 2011 10:40 pm
by kikito
Hi StoneCrow, thanks for taking the time to review the tutorial and comment here.
StoneCrow wrote:i have been working through this tutorial on this page the draw code doesnt work. It raises error:

Code: Select all

incorrect parameter type: expected userdata
in fuction drawq
and i beleive its being called over the "char" variable
Thanks for reporting this. I've made some changes in the code on that section.
StoneCrow wrote: i did hit another error earlier in the tutorial,
but it was easily corrected, simply to do with a change to

Code: Select all

Quads = {}
for i,quadinfo in ipairs(quadInfo) do
  -- info[1] = x, info[2] = y
  Quads[i] = love.graphics.newQuad(info[i][1], info[i][2], TileW, TileH, tilesetW, tilesetH)
end
thats all i can remember from the fix i did, it has been a while since i did that bit
I think neither of us where correct then :). The correct code is this one:

Code: Select all

  Quads = {}
  for i,info in ipairs(quadInfo) do
    -- info[1] = x, info[2] = y
    Quads[i] = love.graphics.newQuad(info[1], info[2], TileW, TileH, tilesetW, tilesetH)
  end
I've also updated that.

By the way, you know that you can download the source code from the tutorials from https://github.com/kikito/love-tile-tutorial, right?

I've changed the links on the wiki so the source code link is more visible (they are near the top of each section).

Re: Tile-based tutorials

Posted: Mon Jan 17, 2011 6:44 am
by RadagastTheBrown
Thank you so much! Part 1 was very fun, easy, and informative. Your exercises section inspired me to draw my very first tileset, which came out ok! I can't wait try part 2!! This is my first time coming into game programming, and I'm competing in the global game jam at the end of the month, where you try to build a game in 48 hours.

Re: Tile-based tutorials

Posted: Mon Jan 17, 2011 8:59 am
by kikito
Thanks, you are very kind!

I hope to be able to start with part 2 this week. I was busy with other stuff before, but now I have no excuse :P

Good luck with the competition!

Re: Tile-based tutorials

Posted: Mon Jan 24, 2011 10:10 pm
by StoneCrow
Hey i worked through the tutorial again, then combined everything into the main file
and now it works fine
thanks for the tutorial,
are you planning on writing a section on scrolling the tiles without getting those black lines appearing inbetween?

Re: Tile-based tutorials

Posted: Mon Jan 24, 2011 10:43 pm
by TechnoCat
StoneCrow wrote:scrolling the tiles without getting those black lines appearing inbetween?
When you draw, floor your x and y values.

Re: Tile-based tutorials

Posted: Tue Jan 25, 2011 4:28 pm
by StoneCrow
TechnoCat wrote:When you draw, floor your x and y values.
ahh brilliant, thankyou very much