0
\$\begingroup\$

I'm making a game, and I'm adding a screenshots feature. Currently I save screenshot files to <Home Directory>/Pictures/MyGame/. However, I'm not sure if these files will be accessible on Mobile. On Mobile, I want to save them to the gallery. What's the best way to save screenshots in my game? I am not using a game engine, so using any cross-platform helper functions is completely out of the question. I only have access to built-in libraries like Cocoa on MacOS.

\$\endgroup\$
7
  • \$\begingroup\$ By mobile, do you mean iOS, Android, or both? Are you using any particular engine or library to build your game that might have some cross-platform helpers for this built-in? \$\endgroup\$ – DMGregory Feb 6 at 2:01
  • \$\begingroup\$ @DMGregory I'm going to be developing for iOS first, but ultimately I mean first. I'm using plain C and C++ mostly, and I do have access to built-in libraries like Cocoa. So about engines that have cross-platform helpers, the answer is no. Should I edit this info into the question? \$\endgroup\$ – user147292 Feb 6 at 4:06
  • \$\begingroup\$ Yes please. Use the tags for your target platforms too. \$\endgroup\$ – DMGregory Feb 6 at 4:22
  • \$\begingroup\$ @DMGregory I don't think I can include all the platforms due to the 5 tag limit \$\endgroup\$ – user147292 Feb 6 at 6:34
  • \$\begingroup\$ Have you checked what environment variables exist? There seems to be support to get environment variables in std namespace. \$\endgroup\$ – Emil Feb 6 at 7:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy