Not logged inGosu Forums
Forum back to Help Search Register Login
Up Forum
Topic drawing tiles with Gosu... HELP By aktivb Date 2015-12-15 01:21
Instead of storing where the tile is on the image, use Gosu::Image.load_tiles and store the image as tiles/image objects.
Then instead of passing the coordinates of the tile and where to draw it to a function drawImage(..., x, y), you just pass
where to draw the tile to the tile itself, tile.draw(x, y)
Topic (Gosu.record).draw_as_quad issue By aktivb Date 2015-12-10 15:07
The following code:
yields, a tad unexpectedly, this:

I can post this as a github issue once I get confirmation that I'm not completely misunderstanding how this is supposed to work.

Gosu 0.10.4
Ruby 2.0.0
OSX 10.8.5


// Let's hope I never have to debug/understand this again! :D

Yeah, I can see why.

Here's something though, the corner ordering is off,
it's top_right, top_left, bottom_right, bottom_left:

Gosu.record(x,y) do
  x2, y2, WHITE,
  x1, y1, WHITE,
  x3, y3, WHITE,
  x4, y4, WHITE)

seems to get it right, as far as I can tell

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill