Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Icey on Mon 19/04/2010 02:12:14

Title: gui fade in & out. & pops outs
Post by: Icey on Mon 19/04/2010 02:12:14
in a game i would like to make it were when the player moves from room to room the screen to screen it fades like ff.7 or ff.8. a video on youtube will show you what i mean. 


and i want to have a gui come down from the top of the screen o the user can see but i want it to slide down.

can some tell me how to do that. ◎◇◎
Title: Re: gui fade in & out. & pops outs
Post by: Ryan Timothy B on Mon 19/04/2010 03:26:20
Yeah, you read the manual and tutorials.  Or even search the forums.  It's been answered multiple times and you're also quite vague with what you need.
Title: Re: gui fade in & out. & pops outs
Post by: GarageGothic on Mon 19/04/2010 03:51:13
The Tween module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=38015.0) should help you with the sliding GUI.
As for the screen fade effect, could you please link to a specific video and tell us at what minute:second the effect happens?
Title: cracking screen
Post by: Icey on Mon 19/04/2010 14:25:05
Youtube = Final Fantasy X - Walkthrough Part 11
(00:12)

I can give a url because I am on my phone so but what I needis the screen cracking with a clear view of room 1 on the inside then it breaks and behind is room 2

       
Title: Re: gui fade in & out. & pops outs
Post by: GarageGothic on Mon 19/04/2010 15:05:43
Yeah, it's possible, but an exact copy of the effect would take a lot of scripting. Since it happens pretty quickly you could probably do without the 3D transformations though - I'm sure nobody would notice if you faked it with 2D rotation and scaling. Still, it's not an easy thing to do, but the basic method would be something like this:

1) Take a screenshot before leaving room A and store it as a DynamicSprite.
2) Display the DynamicSprite as the background graphic of a full-screen GUI while you switch to room B.
3) Break the screenshot into a bunch of smaller DynamicSprites, apply some sort of transparency to make them shard-shaped (either draw simple polygon masks using COLOR_TRANSPARENT or CopyTransparencyMask from pre-made shard sprites).
4) And here comes the hard part: In the repeatedly_execute function, increment the rotation, scaling and x,y offset of each shard and draw them to the GUI background sprite every game loop.

Have fun :)
Title: Re: gui fade in & out. & pops outs
Post by: Icey on Wed 21/04/2010 04:08:28
Wow that's a lot to do....
    But I got one more thing...how do I print all text at the bottom of screen like suptitles in a movie?
Title: Re: gui fade in & out. & pops outs
Post by: xenogia on Wed 21/04/2010 09:22:19
You could set up a hidden character where it's co-ordinates are at the bottom of the screen.  That would be an easy way about it.
Title: Re: gui fade in & out. & pops outs
Post by: Icey on Wed 21/04/2010 16:45:56
How do I put transparency on an object + how do I remove the (esc) button from my game
Title: Re: gui fade in & out. & pops outs
Post by: Khris on Wed 21/04/2010 18:54:22
Seriously, RTFM.

Look up Object.Transparency and check out the on_key_press function in Global.asc (scripts node in project tree).
Title: Re: gui fade in & out. & pops outs
Post by: xenogia on Wed 21/04/2010 22:23:37
Icey Games:  Always check the AGS Documentation before asking for help on the forum.