Ok so I got my png sheet with 20x40 pixel tiles for whatever tileset I want to build.
Great so now I turn this into an array of like 76 images. awesome
ok we're in the TilSet class.. we are writing our own draw method. but wait a sec. how am i going to draw the proper coordinates? I know I'm missing a few things here.. one of which is using the window object in the initialize possibly and using those attributes for width and height to divide by the dimensions of the tile. Besides that I don't know what steps to take.
A lot of tutorials online show you how to use a gem to do it or a JSON file. but I'd like to learn the native way of doing it with Gosu first before getting fancy with yaml or something similar to handle large data collections.
also the @grid data collection is containing 0's because this is the walkable area. it's going to contain 0's and 1's for walkable and non-walkable area. Right now I'm trying to get a map to render correctly for one large walkable area.
Any advice is appreciated!
p.s. I know the x,y coordinates that are being drawn are just indices. I'm wondering if they should be pointing to a value perhaps? and that would be the x,y coord of each cell? I'm self taught but have been learning ruby for almost a year and opening computers since my ibm ps/2 at age 12..https://gist.github.com/genericlady/d89056eed4dca91f9516