Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
for i in [email=0...@array.size]0...@array.size[/email]
#code
end
#Instead you could do
@array.each {|i| #code}
#An example of the use could be
@sprite_back.each {|sprite| sprite.dispose}