Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Falsely

#1
I've got a room that uses graphical room overlays for faux lighting effects. Whenever the player turns a light on, the game takes a copy of the "lit" background, places "lit" versions of object sprites on it, copies the transparency of a lighting mask sprite, then applies the resulting image to an overlay to create the illusion of lighting.

This itself works fine. The problem arises when using Overlay.Remove() to turn a light off.

If the overlays are removed in the order they were created, the lights continue to work as expected. But if, say, you turn on the overhead light, then open the fridge, then turn the overhead light off and on again - everything breaks. Like so:


I've tested it with up to five lights and this only occurs when removing the non-newest overlay. My best guess is that the overlays are getting jumbled up, somehow? At the 0:18 mark you can just barely see the lamp's beam clip with the lamp itself, which implies it's gotten the fridge's z value of 220 instead of it's usual 1.

Any suggestions would be greatly appreciated!

Relevant bits of code (apologies for the spaghetti, things got progressively more chaotic the more things I tried/deleted):

Room Code
Code: ags
Overlay* lLamp;
Overlay* lFridge;

function oSwitch_Interact()
{
  if (kitchenState!="lit"){
  oLamp.Visible=true;
  oLamp.Graphic=223;
  lLamp=TurnOn(lLamp, 224, 1);
  kitchenState="lit";
  
  }
  
  else{
  oLamp.Graphic=239;
  kitchenState="unlit";
  lLamp.Remove();
  }
}

function oFridge_Interact()
{
  if (!oFridge.isOpen()){
    oFridge.Open();
    lFridge=TurnOn(lFridge, 240, 220);
    oFridge.Baseline=220;
  }
    
  else{
    oFridge.Close();
    oFridge.Baseline=1;
    lFridge.Remove();
  }
}


Lighting Script
Code: ags
DynamicSprite* litBG;

///Grabs the full "lit" version of the scene for later use
DynamicSprite* PrepLight(){  
  DynamicSprite* lightBG = DynamicSprite.CreateFromBackground(1, 0, 0, 320, 240);
  DrawingSurface* surface = lightBG.GetDrawingSurface();
  
  for (int i = 0; i<Room.ObjectCount; i++)
  {
    int sprite;
    if (object[i].isOpen()) sprite = object[i].GetProperty("spriteOpen");
    else sprite = object[i].GetProperty("spriteClose");
    
    if (object[i].Visible && sprite>0){
      surface.DrawImage(object[i].X, object[i].Y -  Game.SpriteHeight[object[i].Graphic], sprite);
    }
  }
  
  surface.Release();
  return lightBG;
}


///Crops the lightBG to a sprite mask, applies it to an overlay, then returns the overlay.
Overlay* TurnOn(Overlay* light, int mask, int z){
  PrepLight();
  litBG=PrepLight();
  litBG.CopyTransparencyMask(mask);
  
  Overlay* toReturn = Overlay.CreateRoomGraphical(0, 0, litBG.Graphic, true, true);
  toReturn.ZOrder=z;
  return toReturn;
}
#2
AGS Games in Production / Buy-R-Die
Fri 06/03/2020 11:27:30

A short visual novel about a completely ordinary shopping trip.


It's eleven o'clock on an October night, and you desperately need groceries.
The good news is that there's a convenience store still open at this hour, and the slightly-grouchy cashier is willing to take your money.
The bad news is that they're having trouble with the lights.

...And there's a weird green glow coming from the freezer...

Latest Screenshots:








(Probable) Features:

  • A short (30~60 mins long?) visual novel that's three parts nonsense and one part horror
  • Survive one strange night with the help of a person who sells cereal for a living
  • Point-and-clicky interludes for all your shopping and escape route-y needs
  • Teen rating (Moderate violence, mature themes, mild spookyness, strong language)
  • 1280x720 resolution




Latest Update:
2nd November, 2021)
(Delays due to other, more pressing commitments, but I'm back to work.

Previous Notes:
(13th November, 2020)
The first act of the game is coming along quite nicely and has since received a new coat of paint! It took some time to settle on a presentation style I wanted, but I think I've found something that works for me. Most of the game's dialog is going to be standard visual novel fare (i.e., dialog portraits and text boxes), but some scenes are presented in motion comic style instead. This should make the action scenes feel a bit punchier, and be good for a quick gag or two besides.

Wish I could show more of what I've already done off here, buuuuut that's the problem with such short games. Just about everything is spoilers.

(6th March, 2020)
While the skeleton of the game (story beats, mechanics, NPC portraits, some backgrounds, misc. thumbnails) is complete, it's still early days for the project. There's a whole lotta dialog left to be written, not to mention a lot of experimentation left to be done with puzzles.  I'm also not terribly happy with how some of the action scenes are currently being presented. While I'm not much of an animator, I'd like to do something beyond static images and text for this game. (I've got a few ideas in mind, but I'm not gonna get into that until I give it a try & see how do-able it is for a one person team!)

The extreme optimist in me is aiming for an October release, both because it's when the game is set and because it'll encourage me to keep things simple. But I'm also trying to finish up my degree this year, so 2021 seems much more likely.
#3

A Hand-Drawn, Late-Night Puzzler

It's just before midnight, and your clock has stopped moving. You should probably do something about that.



AGS Database Page || GameJolt Page

Features:

  • A short (10~20 minutes long) puzzle game
  • Explore a world that doesn't care much for the laws of physics
  • Hand-drawn graphics, right down to the fonts
  • Spy on your neighbors and take their stuff
SMF spam blocked by CleanTalk