Quote from: sthomannch on Yesterday at 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 Yesterday at 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();
}
Quote from: Crimson Wizard on Yesterday at 08:56:59Quote from: Kara Jo Kalinowski on Yesterday at 08:00:44There is an extra tile offscreen horizontally and vertically, the thing I am trying to do is create an offset so that the offscreen tiles will be displayed, but doesn't seem to work with overlays. Is there a way to do what I want without manually changing the coords of every overlay?
Please elaborate, maybe with screenshots, because I could not understand this part.
Overlays are no different from other objects in regards to how they are displayed in room or inside a camera. In the end engine gathers everything as a single group of sprites (room objects, characters, room overlays, walk-behinds), and camera displays them all as same.
EDIT:
One thing that I might mention is this: in AGS you cannot move camera outside of room bounds.
If you want to have a larger scrolling area inside a small room, then you cannot use camera, but have to move the room contents in opposite direction instead.
If you have a really big map, then don't create overlays for the whole map, but create only a portion, slightly bigger than the observeable area, move these around, changing their graphics dynamically. As overlay leaves an area, "teleport" it to the opposite side.
Well, there is more here, but I'd like to know more details about the system you are trying to create first.
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.029 seconds with 15 queries.