Showing Images

Started by , Sun 12/11/2006 20:09:23

Previous topic - Next topic

gounis

Hello...

I would like to show images in my game. For example, when my hero looks a paper I want to show an image of this paper and everything that it is written on it. I can do this with two ways:
1) Play a video showing this picture.
2) Create a new room which will contain just a backround. Backround will be this image.

But, I would prefer a more optimized way to do this.

Thanx...

Kweepa

Optimized in what sense?
I would just use a new room.
It's memory efficient because it's only loaded when you go to that room.
It's performance efficient because the engine doesn't have to draw a background with your picture on top.
And it's extremely easy to code, because to return to the previous room you can use the PreviousRoom variable.
Still waiting for Purity of the Surf II

Mikko

I'd like to add, that with rooms you can of course have 5 different images by using the extra frames that normally are for animation.

Also this came to my mind. One way to do this without making new rooms would be making a gui and change the background of that gui depending what player is viewing. I must admit that i have no idea if that is smart in any way.

Khris

Using a GUI is fine, but there's another way:
RawSaveScreen();
RawDrawImage(x, 0, 0);   // replace with sprite slot of paper, adjust coords if nec.
WaitMouseKey(GetGameSpeed()*60*5);  // wait for mouse click or 5 minutes
RawRestoreScreen();

R4L

Why not just use an overlay?

Ashen

Please use a more descriptive thread title. I'd change it myself, but I'm not totally sure what your question is ...
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk