Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: SSH on Tue 15/11/2005 16:39:34

Title: Drawing on the screen, without being visible
Post by: SSH on Tue 15/11/2005 16:39:34
TO try and make a star-wars scroller module, I was trying to use RawPrintMessage and DynamicSprite.MakeFromBackground to grab the text as a sprite for it to be resized as it scrolls away. Now, this works, but unfortunately the text does flash up on the screen briefly, even if I do it in BeforeFadein. I was trying to think of a nice way to write on the screen invisibly, but can't: anyone got any ideas? The only thing I can think of is a giant black GUI covering the whole screen (or overlay, I suppose) but that sucks, really.
Title: Re: Drawing on the screen, without being visible
Post by: GarageGothic on Tue 15/11/2005 17:44:02
Create a background double the width of the screen and rawdraw to the off-screen part. You will need to lock the viewport to avoid the screen scrolling if you have characters on the screen at the same time.
Title: Re: Drawing on the screen, without being visible
Post by: SSH on Tue 15/11/2005 17:47:14
Good idea, but I'd like to make it a module, and that idea relies on complicated instructions for the user...

Title: Re: Drawing on the screen, without being visible
Post by: Scummbuddy on Tue 15/11/2005 17:49:30
you could then just make it a room file.
Title: Re: Drawing on the screen, without being visible
Post by: SSH on Tue 15/11/2005 17:57:38
Yeah, but you'd still have to tell people that they needed to make any backgrounds they wanted to use behind the scroller with a huge black bit off the side... I'd rather use an overlay if it comes to that.
Title: Re: Drawing on the screen, without being visible
Post by: Pumaman on Tue 15/11/2005 20:33:37
Can you not simply do:

RawSaveScreen
RawPrintMessage
DynamicSprite.CreateFromBAckground
RawRestoreScreen

all in one go .. that way, nothing should appear visibly to the user.
Title: Re: Drawing on the screen, without being visible
Post by: SSH on Tue 15/11/2005 21:27:53
That's what I tried, pretty much exactly, and it flashed up the stuff briefly... :-(

Title: Re: Drawing on the screen, without being visible
Post by: SSH on Wed 16/11/2005 12:38:18
And yet today it doesn't seem to do that at all...

'pooky!

Oh well, if it happens again, I'll use an overlay of the background captured before drawing to hide it all...
Title: Re: Drawing on the screen, without being visible
Post by: Pumaman on Wed 16/11/2005 19:38:38
I can't see how that would flash anything up briefly -- if there are no Wait calls or blocking functions in there, it should never actually change the screen/