Upcoming level preview image?
Posted 18 March 2012 - 01:10 PM
How could you make an image of the upcoming level. Probably with views.
But the kind of like "thumbnail" image of the next lvl would be in the previous room.
So how can you get the level image from next room where the room loads?
man... that was hard to explain, hope you get it.
Posted 18 March 2012 - 05:41 PM
Edit the image as you like and resize the image to half (1/4) or what you want it to be.
and then just draw that image to preview the room .
Posted 18 March 2012 - 06:00 PM
Posted 18 March 2012 - 06:15 PM
Posted 18 March 2012 - 06:54 PM
Just wondering could they be saved more safe.
Posted 19 March 2012 - 01:15 AM
Posted 19 March 2012 - 02:49 AM
Alternately, iterate through all of the levels at the beginning of the game. In each one, grab a screen and then paint black over the room so that the user never sees anything. Stick all of those screens into a sprite or series of sprites, and add to that each time a user creates a new level.
Posted 19 March 2012 - 12:00 PM
But THANKS for every one!
Posted 27 March 2012 - 01:58 PM
If you save the level to a file, you could read the file and create tiles with 25% scaling (plus a stretched background tile) and then just delete them if the player cancels or selects another level. This is especially really good if you only show part of the level, say the first screen of it, because then you don't have to read the whole file. (It takes some extra sorting first so you can see what is inside the screen at level start, but taking extra time when saving the level is likely better than taking extra time when just generating the screenshot, you'll likely save levels less often than you'll play them!)
Yeah but if i wanted it not to be so hard coded, because if the player makes his own lvl. It should be able to show that too in the preview.
Posted 27 March 2012 - 04:02 PM
Yeah that sounds way more better. That way I wouldn't have to save the images and waste space.
But I don't know how to make that work.
Edited by gorinds, 27 March 2012 - 04:03 PM.
Posted 28 March 2012 - 11:01 AM
Posted 28 March 2012 - 12:33 PM
I don't know how to make it like you said, tiles and stuff. (make it scaled and look like image)
Posted 29 March 2012 - 12:57 PM
You could do something like this:
- Make all objects that will appear in levels a children or grandchildren of "parent_levelobject"
- To create a level preview:
> Read the file, find the background, and place some background tiles that covers the menu
> Open the file like you'd normally do
> Shift all parent_levelobject instances so that the stage entrance is in focus (or just move the view)
> Take a surface snapshot of the screen
> Delete all parent_levelobject instances, should remove everything
> Delete the background tiles
> Stretch the surface to desired size and use that as the preview.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users