Quote from: Khris on Mon 14/07/2025 14:09:57The command fails because the camera rectangle cannot leave the room rectangle. With your approach you would have to use a room background as big as the tilemap.
However you don't really need Game.Camera offsets for this. Use a room as big as the screen, store your own offset variables and draw the visible tiles at an offset, directly to the room background (using DrawingSurface functions).
We solved this on discord - the problem I was having was that I assumed that setting the edges of the room would affect the room size, and it was the imported background image that determines the room size. (Previously the room did not have an image other than the default blank image.) Once I added in my background image, all works good

Did a quick test, and it scrolls as it should.
// room script file
Overlay* myOverlay[170];
function room_Load()
{
for (int x = 0; x < 17; x++) {
for (int y = 0; y < 10; y++) {
myOverlay[y*17+x] = Overlay.CreateRoomGraphical(x*40, y*40, 1);
}
}
}
function room_RepExec()
{
Game.Camera.X += 3;
Game.Camera.Y += 1;
while (Game.Camera.X >= 40) {
Game.Camera.X -= 40;
}
while (Game.Camera.Y >= 40) {
Game.Camera.Y -= 40;
}
}