Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Moldawsky on Tue 06/04/2010 10:44:51

Title: How to use more backgronds images than standart 5?
Post by: Moldawsky on Tue 06/04/2010 10:44:51
It is possible to switch this parametr up inside the prog code?

Thanx for assist.
Title: Re: How to use more backgronds images than standart 5?
Post by: Khris on Tue 06/04/2010 11:12:36
No, you can use screen sized sprites and draw them on the background yourself via script though.
Look up the DynamicSprite and DrawingSurface commands. You'll also need Room.GetDrawingSurfaceForBackground().
And SetTimer() and IsTimerExpired().
Title: Re: How to use more backgronds images than standart 5?
Post by: Moldawsky on Tue 06/04/2010 12:45:32
Thanx for the tip!
May i use this commands & scripts to create advance backgrnd animation?
Title: Re: How to use more backgronds images than standart 5?
Post by: monkey0506 on Tue 06/04/2010 12:47:05
Quote from: Moldawsky on Tue 06/04/2010 12:45:32May i use this commands & scripts to create advance backgrnd animation?

Quote from: Khris on Tue 06/04/2010 11:12:36you can use screen sized sprites and draw them on the background yourself via script

In simpler terms, "yes".
Title: Re: How to use more backgronds images than standart 5?
Post by: Moldawsky on Tue 06/04/2010 13:48:42
One question about gif.
Can i use animated gif files for background?

PS
I tryed this, but animation is not playing. Maybe error or corrupted gif?
Title: Re: How to use more backgronds images than standart 5?
Post by: Crimson Wizard on Tue 06/04/2010 14:13:44
Quote from: Moldawsky on Tue 06/04/2010 13:48:42
One question about gif.
Can i use animated gif files for background?

PS
I tryed this, but animation is not playing. Maybe error or corrupted gif?
What you should understand, basically, it is not GIF that plays animation. It is program that plays animation, described in GIF. If and only if the program is able to play animation, it will play it. If there's no such possibility implemented in program, it will only show first frame of GIF.

Besides, AFAIK, when anything is imported in AGS, it becomes BMP. If it was animated GIF, all animation is discarded.

To answer your question about more advanced background animation - you can either draw new frames manually using DynamicSprites and DrawingSurfaces, as was mentioned above, or using a large Object or even Character, which covers all room; such object can have unlimited animation (manual states though that this may slow game down).
Title: Re: How to use more backgronds images than standart 5?
Post by: Matti on Tue 06/04/2010 15:32:21
You can import animated gifs, but they will be split into the single frames. If you want to make an animation you have to assign the frames to a view.
Title: Re: How to use more backgronds images than standart 5?
Post by: Moldawsky on Wed 07/04/2010 05:38:50
Ok, a large Object or even Character, which covers all room.
That is i can use the animation of the Char for backgrnds without standart backgrnds?
Now i have a new question.
There are about 150 rooms in game.
And aprxmt 25-45 frames of animation for each room. 
It is possible?
Title: Re: How to use more backgronds images than standart 5?
Post by: xenogia on Wed 07/04/2010 05:51:21
What you could do Moldawsky is use the ags_theora plugin and set is a Background overlay.  Not only would you save space, but you would generally get smoother animation.  So in other words you can have FMVs as backgrounds :)

I use this plugin extensively in my game, not only for background animations but for overlays also.
Title: Re: How to use more backgronds images than standart 5?
Post by: Moldawsky on Wed 07/04/2010 06:11:57
2Xenogia

Thanx !

My general problem - im drawing backgrnds in Photoshop by aplication method.
Next - export to jpg as a 5 diffirent frames with little animation.
Next - import to AGS backgrounds and set the delay of anim. between backs.
Rain is going, tv is noisly flashing, lamps is lighting and flashing - good.
5 frames is enough.
BUT i want more movements... Clouds, water, wing, fog... They need more frames to do.

Title: Re: How to use more backgronds images than standart 5?
Post by: xenogia on Wed 07/04/2010 06:17:21
Why not just composite the whole scene with those animations in an ogg theora video.  Trust me it will save CPU and hard drive space.
Title: Re: How to use more backgronds images than standart 5?
Post by: Moldawsky on Wed 07/04/2010 07:59:56
ogg theora video?
What is this?
Sorry i dont know...
Title: Re: How to use more backgronds images than standart 5?
Post by: xenogia on Wed 07/04/2010 10:06:33
Quote from: Moldawsky on Wed 07/04/2010 07:59:56
ogg theora video?
What is this?
Sorry i dont know...

Check out this link and look at the demo
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34910.0 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=34910.0)

If you need help using it I am more than happy to help.
Title: Re: How to use more backgronds images than standart 5?
Post by: Moldawsky on Wed 07/04/2010 10:53:35
2Xenogia
do u have an ICQ num?
Title: Re: How to use more backgronds images than standart 5?
Post by: xenogia on Wed 07/04/2010 11:57:23
I don't use ICQ but do you use MSN?