Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: tilapisha on Thu 23/03/2023 16:14:33

Title: Background 1 Glitching?
Post by: tilapisha on Thu 23/03/2023 16:14:33
Hi, does anyone know why my Background 1 (not the main background) is glitching? I have two backgrounds, the first one, and after the character walks through one time, it's supposed to show Background 1. Instead, it glitches and shows this. It worked for one of the rooms, but not for two others. The code is the same. I tried renaming and reuploading the background but it's still glitching. Also, it doesn't glitch when first loaded in, only after I've Run the game.

(https://imgur.com/a/VB6C5Fv)
[link]https://imgur.com/a/VB6C5Fv[/link]
Title: Re: Background 1 Glitching?
Post by: Nahuel on Thu 23/03/2023 16:25:40
Quote from: tilapisha on Thu 23/03/2023 16:14:33Hi, does anyone know why my Background 1 (not the main background) is glitching? I have two backgrounds, the first one, and after the character walks through one time, it's supposed to show Background 1. Instead, it glitches and shows this. It worked for one of the rooms, but not for two others. The code is the same. I tried renaming and reuploading the background but it's still glitching. Also, it doesn't glitch when first loaded in, only after I've Run the game.

(https://i.imgur.com/sLDkXVy.png)


Hey there, do you have a script with some logic? It would be good to see what are you trying to achieve.

Can you share both room images please?

Another thing is, which version are you using?
Title: Re: Background 1 Glitching?
Post by: Crimson Wizard on Thu 23/03/2023 19:51:37
Does the background match the color depth of your game and another background?
Title: Re: Background 1 Glitching?
Post by: tilapisha on Tue 28/03/2023 09:26:33
Yes, the background matched the color depth of the game and other background.


// room script file

function room_LeaveRight()
{
  if(newMouth == false){
cGoby.ChangeRoom(17, 145, 145);
  }
}

function room_LeaveBottom()
{
  if (newMouth == true){
cGoby.ChangeRoom(11, 175, 175);
  }
}

function room_FirstLoad()
{
cMallory.FollowCharacter(cGoby, 0, 0);
}

function room_Load()
{
 if (newMouth == false){
   SetBackgroundFrame(0);
 } else {
   SetBackgroundFrame(1);
  }
}

Title: Re: Background 1 Glitching?
Post by: Crimson Wizard on Tue 28/03/2023 17:35:14
Quote from: tilapisha on Tue 28/03/2023 09:26:33Yes, the background matched the color depth of the game and other background.

Please tell, which version of ags are you using, what is the color depth of your game?

Could you post the backgrounds themselves for us to see how they are supposed to look like normally?