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...
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.
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.
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();
Why not just use an overlay?
Please use a more descriptive thread title. I'd change it myself, but I'm not totally sure what your question is ...