Make level preview

Hey, what is best practice how to make level preview for puzzle game? (Cococs2d-x c++)

Like user creating level and later we want to show little images/previews of all levels user created.

Should we make screenshot and resize it? or should we generate each small level in that menu or other way?

Screenshot will most likely be best.

Do you need help taking a screenshot?

i would go with taking screenshots using render texture and then scaling them to fit my display window/sprite. Generating a smaller level from given levels will be a overhead(my personal opinion) and should be avoided until unless you have some interactive elements in your level preview.

You probably don’t want to render a scaled down version of each level because that would require having all the level data dowloaded in order to see the preview. Screenshot makes sense for small/screen sized levels. But you might also want to consider allowing the user to screenshot their own level in ‘play mode’ and ‘edit mode’ so they can advertise what’s cool about it. Or perhaps you will want users to be able to upload their own image, this will of course require filtering of inappropriate imagery on your part.

It seems we will try to make small screenshots of the levels and then put them in my level list.

I put some code in my app that takes a screenshot - I used it to take screenshots of my own levels, reduce their size and then save them for use in the release game.
The same code can then be used if you allow users to create their own levels - just calling the “SaveLevelImage” method when they save their level.