API for saving screenshots in-game and re-accessing them through datastore or decals

Use case 1:
A feature like this is extremely useful for boosting player retention within games. Every game can benefit from this - no matter what the gameplay may be - players love to show off, compare, and remember their achievements & interesting events. We as the developers can let them capture their favorite moments, and we can store these for them to easily share and keep. In addition, any developer that adds comments / likes to something like this within their game can expect an incomparable boost in activity. These pictures can be in a gallery, a hung picture frame in a house, on an in-game notebook, on their in-game profile, or any social media style platform within games.

Use case 2:
Pictures can be utilized to condense expensive user-generated content such as drawings and any sort of 2 dimensional customization. Once a player is finished/happy with their creation, it can be saved at almost no cost (in comparison to for example - 50,000 parts in a player-made drawing. This is essential to any game that wants to offer long term and sustainable two dimensional user generated content, which is on the rise right now. Without this feature/ any other feature that similarly condenses objects, fully fledged drawing games are extremely limited. Saving, loading and displaying detailed creations is completely infeasible without crashing players and hitting data caps immediately.

This has been requested before - See NWSpacek and ScriptOn’s posts for more use cases:

13 Likes

This API should also allow you to take a capture of a certain frame, so you can place it in an imagelabel. Here’s what I think this whole thing should be:

local screen = game:GetService("CaptureService")

--\\ Types

export type Capture = {
    ImageId: string, -- Temp Id that is not saved to roblox
    Size: Vector2, -- Absolute size depends on bounding box of capture region
    Subject: Instance, -- Who got a picture taken?
    
    Destroy: (Capture) -> (), -- Immediatly garbage collect
}

--\\ Methods

function screen:Capture(CaptureParams): Capture

--\\ Datatypes

local params = CaptureParams.new()

params.FilterDescendantsInstances = {player.PlayerGui, workspace}
params.FilterType = Enum.CaptureFilterType.Include
params.FollowRotation = true -- Take a picture relative to the UI?
params.CaptureRegion = Vector2.new(100,100) -- Or a UDim2
params.Overflow = true -- Should picture be taken out of bounds so resizing reveals new image data?

-- Only applies to capturing 3D objects:
params.IncludeWater = false
params.IncludeTransluent = false
params.IncludeParticles = true
params.IncludeWorldGui = false

-- Only applies to capturing PlayerGui:
params.IncludeMouse = false
params.IncludeCoreGui = false -- RobloxScriptSecurity

This is a lot to ask for, but it would allow for many possibilities. Here’s some real use cases I can think of:

  • Making a screenshot sharing system so players can see each other’s experiences in the game
  • Showing the same complex UI in hundreds of places without cloning it
  • Adding your own weak post processing effects
  • Can serves as a more flexible canvasgroup
  • Special effects such as ununiformly scaling anything
  • Allow other players to view somebody elses screen
  • Place screen on a computer screen ingame for a special transition
  • Replay system (watch back recorded footage)

I’ll add more if I think of them! There are surely plenty more use cases that people will think of. Capturing the UI and the viewport will give developers more to work with, and let them make their games better overall.

4 Likes

I feel like this could easily be made if roblox allowed us to access raw pixel data of the screen during specific frames.

IIRC, Roblox mentioned that they have no plan of giving decelopers access to the client’s raw pixel data because of security issues

I support this feature, I don’t know if we are talking about the same thing but, I would really love to have an API to take screenshots and then that API returns a specific ID that can be used for ImageLabels, ImageButton, Decals, etc.

I plan on using this to take screenshots of the map from a certain high, look downward. This way I could make a map that updates itself because players can cut-down trees, build around map, etc.

Having a way to capture the current moment from a CFrame would be nice, I would also love to be able to ignore things in that screenshot like Fog, Atmosphere, Blur, DepthOfField, Sunrays, Specific Blocks, Specific Particles and much more…


In short, I need an API that I can use to take screenshots from above to place as a map for my game. At the same time, I will need to remove the player characters from those pictures so no one knows where other players are, and probably ignore buildings, the map should not have any kind of fog either or anything that interferes with it.

1 Like

And that’s why this engine will never compete with other game engines sadly.

1 Like

Just because they don’t let us see what’s on the user’s screen doesn’t mean that everything’s gone down the drain?

1 Like

We should also be able to take a screenshot using a Camera Instance.

This way, we can capture at a given CFrame using modified propertues such as FOV. Post processing should also be a parameter.

2 Likes