Recent posts

#1
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 after
Spoiler
the gory scene and when the students leave B4 when Ashley tells them what happened.
[close]
Hide the ending in the text above for an unexpected ending  :smiley:

Hey thanks for giving it a try, I'm glad you enjoyed it  :-D  Yeah that's as far as the demo goes, a message should have popped up to say so?
#2
I agree, the graphics are really gorgeous  (nod)
#3
Hey! Quite long demo with interesting puzzles, it was fun to play. Good graphics with nice little details.

I assume that the demo ends after
Spoiler
the gory scene and when the students leave B4 when Ashley tells them what happened.
[close]
Hide the ending in the text above for an unexpected ending  :smiley:
#4
AGS Games in Production / Re: Manhunter: Toronto
Last post by brushfe - Yesterday at 17:23:26
July is here, and despite the summer distractions, progress continues!

This has been another month of artwork, which is indicating to me that the scope of the game might be too big. I'm going to continue as planned for now, and let the playtesters for Day 1 decide how the scale of it feels. Time will tell if this is a sound approach...

In the meantime, here are a few of the latest additions:

--


Another Orb briefing, another rude awakening...


Share a savoury beverage with an unsavoury character.


Find some time to enjoy the city's culture.


But don't get too comfortable... there's still an alien invasion going on.

--

There's a lot more to show, but I'm starting to worry about spoilers!

Work continues on the engine. I'm taking a detour to join the July MAGS contest as a refresher on proper AGS coding; I don't want this game to be the guinea pig, so I think the time spent on a short game will save a lot of trouble later on.

It's also been great to get back into the adventure/puzzle genre for inspiration and modern standards. Games like Blue Prince and the fantastic entries in June MAGS have been really inspiring!

Thanks for stopping by, and I hope to see you all again for July MAGS (if I can make the deadline). Otherwise, the goal is to be back in August with a more interactive update. Until then!
#5
Critics' Lounge / Re: Using Music and Sound from...
Last post by stu - Yesterday at 15:52:40
I was considering music from Pixabay for a potential future project.

Though I've noticed a lot of the tracks have a Content ID. So my understanding is if a streamer plays your game on YouTube (or you create promotional material for YouTube) and that track plays, they'll likely get Content ID Claim and the original artist can either; choose to ignore it, share monetisation on the video or request the video be blocked.

If you like the idea of a streamer playing your game, this could become a bit of a potential roadblock. Though I'm not an expert so someone please correct me if I'm wrong.
#6
Fascinating, thanks very much! It's really instructive to see how you've built this in such a flexible fashion that also keeps it error-free.

I really appreciate it, thank you again!
#7
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).

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.

Code: ags
// 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;
  }
}
#8
The 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).
#9
Regarding the math side of things, here's how to code this:

Code: ags
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

Next we need a function that handles pouring water from glass A to glass B:

Code: ags
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();
}

Now all you need to do is call Pour(0, 2); to handle the player pouring from the 12 glass to the 5 glass.
#10
In retro game systems, tiles are stored in memory with an extra tile offscreen. This would be an offset of 0,0



You would move the offset of the blue box to display additional tiles. When you reach the edge of the additional tile (i.e. x = 40 or x = -1), you'd shift all the tiles to the left/right by 1, load an additional columns worth of tiles, and move the blue box offset back to x = 0, if that makes sense? Same for vertical (y = 40 or y = -1) Doing that lets you have rooms much larger than the visible screen but only storing what's immediately accessible in memory.

It's the system we used in my GBA programming class and well although the GBA has dedicated hardware for the tiles, I wanted to simulate it using software.

The problem I am having is that Game.Camera.Y = 20; doesn't seem to be affecting the offset's position on the screen as expected.



When I'd expect the visible window to be showing what's off screen



Specifically I am asking what about overlays and cameras/viewports that I'm not understanding, and how to fix. Thanks :)

Quote from: Crimson Wizard on Yesterday at 08:56:59
Quote 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.
SMF spam blocked by CleanTalk