[SOLVED] Is there any way to capture buffer with AS3 code


(Bora Kasap) #1

I’m just looking for an ingame feature lets player to save screenshot & if possible a video for gameplay recording? Is that possible to implement buffer to make videos?


(Jonathan Stoler) #2

You can use this to copy a screenshot (BitmapData), not sure if stringing these together in a Vector for video playback would work or if there’s a better way to do videos (especially with audio).

var screenshot:BitmapData = FP.buffer.clone();


(Bora Kasap) #3

Oh thanks, that’s enough for me, anyway, i don’t wanna make video now, you’re right, i have to work with sound also to do this… it takes too much time… and probably affects game performence, so much people cannot be able to make their best play while recording video…


(Ultima2876) #4

If your game is deterministic, you could record keypresses and use those to play back the game (possibly rendering in the background with a simple progress bar so the player isn’t playing while it’s handling the video data). Games like Sonic The Hedgehog on the megadrive did this for the title screen demos.


(Bora Kasap) #5

No, i was just wondered it about because of making users record video of their gameplay & show people how they make their highscore as a video for youtube or somewhere else easily for increasing game’s popularity & sociality


(Ultima2876) #6

Yup, what I mean is to record those keypresses during gameplay then have a ‘create video’ button somewhere (say, at the end of the level) which reads those keypresses, runs the game logic in the background and renders to a bitmapData list without showing it to the user, then fires that bitmapData list into a video file.

It would be a lot of hassle for very little gain, however.


(Bora Kasap) #7

Oh yeah, that’s the most logic solution! Something like rendering process of 3D design softwares. But anyway, i’m not going to do both of them… That’s wrong… I feel i’m on the wrong way because of making too much perfection pressure to my first real game project! I’ve just started to feel like kind of ego, so, i just wanna put out to grass my game as soon as possible… If it doesn’t get succeed as i wish, it may depress me because of my high expectation… So, oh man… That’s enoug… No moreeee…


(Ultima2876) #8

You’re absolutely right. You don’t want to spend too long on any given project, unless it’s a sequel to an already proven game!