Screenshots using Logic Bricks

Ayo we'll be taking screenshots with Logic Bricks and saving them to our desired directories, without further ado let's get started.

Creating A Scene

Let's create a simple scene by adding some lights, some cubes adding some mist to the scene, etc. I added:

I know the scene looks absolute crap, but we just wanna make sure how to perform screenshots with the engine.

The Logic

Alright, now let's add logic bricks. Now select our camera and add a keyboard sensor with any button assiged to it, add a Game actuator, set the type to Screenshot and connect the logic bricks. Before you play the game and take tons of screenshots, you need to specify the path and name of your screenshot. So the name goes like this: C:/path/to/yo/folder/ur-name. Now try running the game and take screenshots.

Single sceenshots only appears?

So, you would've triggered your keyboard sensors mulitple times and wondered why you get only a single image. The reason is its getting overwritten and to prevent that you need to put # so it looks like this: C:/path/to/yo/folder/ur-name#. Now try running the game again and voila! The # helps to take mulitple screenshots as much as you want which replace by incremental index without overwriting by previous ones.

Avoiding low-res screenshots

The screenshots are taken respective to the screensize your game is running in. If your game size is 1920x1080 your screenshots will be in that dimensions.

If your screenshot is having the debug profiler included, it can be solved by turning it off. Here is the project file for this tutorial