Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Grapefruitologist on Fri 06/01/2006 13:48:48

Title: Problem with AGS, Importing background
Post by: Grapefruitologist on Fri 06/01/2006 13:48:48
It says when I try to import the background, "Image width and height do not match main background size:
Main background: 320 x 200, imported background: 199 x 106"
Title: Re: Problem with AGS, Images
Post by: DoorKnobHandle on Fri 06/01/2006 13:53:43
Well, what's the size of the image that you're trying to import as a background into AGS? It has to be atleast the size of the resolution, that you are using. You probably use 320x200 as resolution, so then your background image must be ATLEAST 320x200 pixels big!
Title: Re: Problem with AGS, Images
Post by: Ashen on Fri 06/01/2006 14:03:52
That sounds like it's from trying to import a frame for an animation.
Note that while the main background must be at least the same as the resolution, as dhk said (actually, I think it can be smaller, it just looks odd padded out with black), all animation frames have to be exactly the same size as the main one - even if you're only animating a part of it.
Title: Re: Problem with AGS, Images
Post by: DoorKnobHandle on Fri 06/01/2006 14:08:27
Ashen is right, you probably want to have a small portion of the screen animated. Please use either objects, characters or gui's for that purpose.

Animated backgrounds only support 5 frames and you have to redraw the whole screen with your paint program - you can't just update a small portion of the original image!
Title: Re: Problem with AGS, Importing background
Post by: Grapefruitologist on Fri 06/01/2006 14:36:29
Yeah, I somewhat knew I was adding an "additional frame" or something (But I thought I'd try anyway). But the tutorial I'm using for AGS is for an earlier version, so it's pretty confusing. I don't know how to set the main background...
Title: Re: Problem with AGS, Importing background
Post by: Ashen on Fri 06/01/2006 14:38:42
You mean just setting the initial background graphic, no animation involved?
'Room' menu from the menu bar, 'Import background'.
Title: Re: Problem with AGS, Importing background
Post by: Grapefruitologist on Fri 06/01/2006 15:51:23
Um, okay, that worked, but now I have a different problem. (I should probably just post this different problem in the same thread instead of creating a new one?) I would have just edited my post, but then you would still think it was still solved. Er-I tested my game, and it worked fine, the way it was supposed to. Then I realized there was a big black place where the character was walking where he shouldn't have been (because it was too small a small background) so I changed the background and moved the floor to the bottom. But unfortunately, after I finished part 3 of the tutorial, I tried to test the game again, but the character was in the air, and I couldn't move him. By the way, I re-set the walkable areas and everything after I changed the background.
Title: Re: Problem with AGS, Importing background
Post by: Ashen on Fri 06/01/2006 15:57:02
Did you reposition the character? "the character was in the air" makes it sound like you didn't, so he's sort of floating in the background. If you've moved the 'floor' of the room, you also need to tell the character where it should now be. Redrawing the Walkable Area (while important) won't do that.
Title: Re: Problem with AGS, Importing background
Post by: Grapefruitologist on Fri 06/01/2006 16:06:11
How do you position the character?
(Ignore below post, sorry about that)
Title: Re: Problem with AGS, Importing background
Post by: Ashen on Fri 06/01/2006 16:17:10
From the Tutorial in the manual (Lesson 2):
QuoteIf the player is stuck and won't move, he probably didn't start on a walkable area. If this is the case, go to the "Characters" mode in the editor, and change the "Starts at X" and "Y" boxes. You can find out co-ordinates from the Room Settings pane (as you move the mouse, the co-ordinates are displayed above the background image).

Alternatively, you could use the Character.PlaceOnWalkableArea (http://www.adventuregamestudio.co.uk/manual/Character.PlaceOnWalkableArea.htm) function, in 'Player enters screen - before fadein'.

And please, try reading the manual before you ask in the future - this answer really wasn't that hard to find.
Title: Re: Problem with AGS, Importing background
Post by: Grapefruitologist on Fri 06/01/2006 16:35:44
Gah, yeah, I did read that in the tutorial a while back, but I forgot it was in there. Thanks.
UPDATE: It works! IT WORKS!! He can walk!! He's no longer a cripple! Hallejuah!
Title: Re: Problem with AGS, Importing background
Post by: Volcan on Tue 30/05/2006 04:51:08
I have the same problem:

Image width and height do not match main background size.
Main background 320x200 imported graphics 800x600.

IÃ,  set up my game to 800x600 but I still get this message.

I just want to add a background, not to animate it.
Title: Re: Problem with AGS, Importing background
Post by: Gilbert on Tue 30/05/2006 05:14:13
Whay did you mean by "adding" a background?
Did you mean:
1. Discard the current room background and change it to another?
2. "Add" one more background to a room, so you can switch between them.

For 1, you shouldn't even touch the background frame feature at all, just select 'room --> import background...' from the pull down menu.

For 2, you CANNOT have two backgrounds of different sizes in a single room, no matter you want it animated or not, you need a different room for backgrounds of different sizes.
Title: Re: Problem with AGS, Importing background
Post by: Volcan on Tue 30/05/2006 14:04:18
I found the problem

The last version AGS I used was 2.56a. There was an import icon on the room setting.

Now with 2.71, the import icon is moved to pull menu confused me.

Thanks