I'm attempting to make my first Lua game. Its a side scrolling shooter and I'm trying to get the background to scroll. the approach I'm trying to use seems sound but I think the problem is that I'm not understanding the functionWell I understand that the first x,y and image source is the size of my background and the background image itself. Its the second part I'm kinda fuzzy about. I also understand what the alpha is for.Code:nil image:blit(x, y, Image source, [sourcex, sourcey, width, height], [alpha = true])
Can someone clearly explain what the second part is? My idea for scrolling the background is to do this:
1. clear the screen
2. blit the background minus 8,272 of the background image
3. blit the missing 8,272 at the end of the previous blit.
If someone know a better way to scroll the background I'm all ears :)