For collisions (writing) I made such method:
def modify_mask(mask,method)
@mask[mask].render{
if method[0].class==Image
method[0].draw(method[1],method[2],0)
else
$screen.draw_quad(method[0],method[1],c=method[4],method[2],method[1],c,method[2],method[3],c,method[0],method[3],c,0)
end}
end
To explain it better: @mask is hash for Ashton::WindowBuffers (so probably OpenGL Textures, right?) and every object (tile,door...) by calling this method, draws an Image or quad onto Texture.
I know it's not too efficient (new render block each time), but I ported Ashton after the game was completed so I had to replace 'splice' and 'rect' quickly.
And collisions come by just reading pixels for proper mask (so it's color = @masks[mask][x,y]
and then true if color==Color::BLACK etc.)
And this ~5 FPS is rather OpenGL issue, because on this laptop even old RTS Tzar tends to lag. Maybe it's because of ATI gfx card?