Quote from: sthomannch on Mon 14/07/2025 19:27:32Hey! Quite long demo with interesting puzzles, it was fun to play. Good graphics with nice little details.
I assume that the demo ends afterHide the ending in the text above for an unexpected endingSpoiler
the gory scene and when the students leave B4 when Ashley tells them what happened.[close]![]()
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).
// 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;
}
}
int size[3], level[3]; // three glasses: [0] is the size 12 glass, [1] is the size 7 glass and [2] is the size 5 glass
// when puzzle starts
size[0] = 12;
size[1] = 7;
size[2] = 5;
level[0] = 12;
UpdateGlasses(); // call helper function that draws the glasses
function Pour(int from, int to) { // from, to = 0, 1 or 2
if (from == to || from < 0 || from > 2 || to < 0 || to > 2) return; // prevent errors
int space = size[to] - level[to]; // how much space is in the target glass
// transfer either space or level[from] units, depending which is less
int transferred = (level[from] > space) * space + (level[from] <= space) * level[from];
// do the actual transfer
level[from] -= transferred;
level[to] += transferred;
UpdateGlasses();
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.030 seconds with 10 queries.