[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: A newbie has problems with Lua
- From: "Joe Smith" <unknown_kev_cat@...>
- Date: Mon, 14 Aug 2006 16:19:08 -0400
"Cadé David" <firstname.lastname@example.org> wrote in message
From: "Joe Smith" <email@example.com>
Reply-To: Lua list <firstname.lastname@example.org>
Subject: Re: A newbie has problems with Lua
Date: Mon, 14 Aug 2006 12:15:11 -0400
"Vegetable" wrote in message email@example.com">news:firstname.lastname@example.org...
The error come in
for i=0,map_size_x-1 do
for j=0,map_size_y-1 do
That code looks odd...
Check that you really want
"(i-x_map)" and not "(x_map-i)".
Same with y_map.
>x_map and y_map is the position of the tile at the left and the top of the
Ok. And I assume i=0, and j=0 is also supposed to place at the top left of
the screen correct?
0-(top of screen) gives a negative number under normal programing
same with 0-(left of screen)
Perhaps I am wrong, but it looks like you will be drawing in places other
than were you want. If you end up drawing offscreen that could potentially
be a problem.