![]() Tile.draw(draw_x, draw_y, z, = draw_y, c, draw_x+ts, draw_y, c,ĭraw_x, draw_y+ts, c, draw_x+ts, draw_y+ts, c) Gosu::Color.rgba((hex= unless %= += if y = unless %= += if x < 0ĭraw_x = x * ts - layer in = y, layer] For speed we maintain a separate list of GOSU::Color ,, , ĭEFAULTS = īmp.splice(k % 2 * 16, k / 2 * 16, autotile, = autotiles VP = 2 # Number of tiles beyond viewport to refreshįA = 64 # Alpha value of the color of flash dataĪutotile_Speed = 20 # Number of frames between autotile animations # - autotiles : Array of Autotile Filenames # - is_a_plane : Behaves like a Plane (loops around edges) # - tilesize : Zoom value as size of individual tile (normal is 32.0) ![]() # - priorities : 3D Table of Tile Priorities # - flash_data : 3D Table of Tile Color Data The only part that needs explaining is that `Gosu::Image.load_tiles` creates an array of textures, in this case all 32x32 pixel tiles, row-by-row (so the first row would be tiles 0-7, the next 8-15, etc).Įvery time I come back to this I am again disappointed that I did not do the GL calls myself in this way. You probably don't want to split the images into individual textures like this, you want to load it as one texture (if you can) and draw with UVs. will probably take some modification, because the viewport code uses other systems I wrote and it is designed for GOSU rather than plain OpenGL. Tileset! I've got an RMXP implementation for you right here.
0 Comments
Leave a Reply. |