Looks like this will become an important feature of some games,recording parts of the gameplay and share on youtube/vimeo. Are there any plans to provide this possibility in Gideros?
I believe uneulv meant recording the screen of application, like you know, best repeats of levels and sharing them on youtube on vimeo. Capturing what's going on screen.
Sorry to barge in. My question would be similar. How about sound? I I'd have a piano for example and wav file for each key, could I internally record a melody I played and save it as mp3, without using microphone. Maybe not even with Gideros, would this be possible at all?
Actually I think this is something that could better be done by the developer himself (although some extra support from the team would be required).
Rendering to video is going to be time consuming - especially on a limited mobile device, if I was going to do this then I'd initially start to "record" the players game by a) making the game 100% deterministic (ie making it so that any "random" events were controlled by a single seed and could be repeated again simply by using the same seed) and then b) recording all of the players input into a buffer.
Obviously the game would have to be structured so that the "engine" could then replay the game as if it was the player simply by plugging in the appropriate "fake" inputs at the right time. Once this was working you could then take your time and "play" the game 1 frame at a time into a separate buffer, you could then encode the frame to a video using some kind of local storage (it might at this point be a good idea to implement FFMPEG as a native plugin to provide the encoding support).
Once you have your "movie" stored locally then you can see about accessing either the youtube or vimeo api to actually upload your movie.
WhiteTree Games - Home, home on the web, where the bits and bytes they do play! #MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@ar2rsawseen I think the major technical difficulty is mixing multiple sound effects correctly and then getting the rendered audio buffer. Most probably I would try build OpenAL Soft 1.14, use the extension ALC_SOFT_loopback to get rendered audio buffer and encode it to mp3 by using mpg123. This is a platform independent way, and maybe iOS or Android provides easier solutions.
Okay, I'm trying to do something similar to this (if I understand the original post correctly). I'm putting up a "shield" sprite to capture mouse and touch events and "recording" them to an array (but not stopping propagation of those events so the app behaves normally).
Later I want to be able to "play" these events back by dispatching them through the normal event listeners. I'm intending to use this for automating testing procedures, amongst other things.
The problem is that I don't know how to replay the stored events so they channel through the normal event listeners. I optimistically tried:
function EventShield:playEvent(event)
stage:dispatchEvent(event)end
but that crashes the Player horribly. Does anyone have any suggestions how this might be achieved?
@bowerandy The lifecycle of event objects that are dispatched by system (touch, mouse, enter frame etc.) is only defined within the listener function. Therefore you shouldn't store them and try to redispatch again.
But you can create a new event and store it to be dispatched later.
localfunction onMouseDown(event)local newEvent = Event.new(event:getType())-- or Event.new(Event.MOUSE_DOWN) or Event.new("mouseDown")
newEvent.x = event.x
newEvent.y = event.y
-- store and dispatch newEvent laterend
@atilim, yes that stops the crashing. But I still don't know how to re-dispatch these saved mouse/touch events so that they get distributed to all the objects on the stage in the correct order. Alternatively, I could manually dispatch the event to every object on the stage (by walking the tree) but how do I know when stopPropagation() has been called?
I've done a simple implementation. Here are the steps:
1. Implement your custom Event:isPropagationStopped() function as:
-- save original stopPropagation function
Event.__stopPropagation = Event.stopPropagation
-- reimplement stopPropagationfunction Event:stopPropagation()
self.__isPropagationStopped =true
self:__stopPropagation()endfunction Event:isPropagationStopped()returnnotnot self.__isPropagationStopped
end
2. Implement a recursive tree traversal (as you've said). We're doing post-order traversal for correct ordering (top sprite receives the event first)
@bowerandy, I'm glad it worked And the result is fantastic.
1) most probably this is the easiest way to convert a value to boolean (it's used here http://www.lua.org/manual/5.2/manual.html) 2) most probably you know but if you're using require, you can disable the automatic execution of a .lua file by right clicking on it and selecting "Exclude from Execution". (anyway it's always good to do your test).
In fact, there is built-in screen recorder separately in Windows and Mac operating system, Xbox DVR and QuickTime. However, owing to the limited feature, a third-party program may be more appreciated. From my long-time usage, Joyoshare Screen Recorder is such a simple yet powerful screen activity recorder.
Comments
I usually use Fraps on windows and there are a bunch of good applications for mac here: http://www.giderosmobile.com/forum/discussion/354/which-software-do-you-use-to-create-your-promo-video
On the other hand, adding this feature is really time consuming and most probably the result won't be better than these ones.
Sorry to barge in. My question would be similar. How about sound? I I'd have a piano for example and wav file for each key, could I internally record a melody I played and save it as mp3, without using microphone. Maybe not even with Gideros, would this be possible at all?
Rendering to video is going to be time consuming - especially on a limited mobile device, if I was going to do this then I'd initially start to "record" the players game by a) making the game 100% deterministic (ie making it so that any "random" events were controlled by a single seed and could be repeated again simply by using the same seed) and then b) recording all of the players input into a buffer.
Obviously the game would have to be structured so that the "engine" could then replay the game as if it was the player simply by plugging in the appropriate "fake" inputs at the right time. Once this was working you could then take your time and "play" the game 1 frame at a time into a separate buffer, you could then encode the frame to a video using some kind of local storage (it might at this point be a good idea to implement FFMPEG as a native plugin to provide the encoding support).
Once you have your "movie" stored locally then you can see about accessing either the youtube or vimeo api to actually upload your movie.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
@ar2rsawseen I think the major technical difficulty is mixing multiple sound effects correctly and then getting the rendered audio buffer. Most probably I would try build OpenAL Soft 1.14, use the extension ALC_SOFT_loopback to get rendered audio buffer and encode it to mp3 by using mpg123. This is a platform independent way, and maybe iOS or Android provides easier solutions.
Later I want to be able to "play" these events back by dispatching them through the normal event listeners. I'm intending to use this for automating testing procedures, amongst other things.
The problem is that I don't know how to replay the stored events so they channel through the normal event listeners. I optimistically tried:
Best regards
But you can create a new event and store it to be dispatched later.
http://bugs.giderosmobile.com/issues/101
http://bugs.giderosmobile.com/issues/102
http://bugs.giderosmobile.com/issues/103
1. Implement your custom Event:isPropagationStopped() function as:
3. Dispatch your custom event:
1) return not not self.__isPropagated had me confused for a minute. I guess I will have to learn all these Lua idioms :-)
2) I had to wrap the Event.__stopPropagation = Event.stopPropagation line in a guard to only allow it to be executed once.
Best regards
Thanks to your help on this I've been able to use the above in an interesting way:
http://www.bowerhaus.eu/blog/files/better_app_videos.html
Best regards
Likes: gorkem, atilim, ndoss
If you are on a Mac iMovie can do green screen stuff, if you select show advanced tools from the preferences
cheers
evs
1) most probably this is the easiest way to convert a value to boolean (it's used here http://www.lua.org/manual/5.2/manual.html)
2) most probably you know but if you're using require, you can disable the automatic execution of a .lua file by right clicking on it and selecting "Exclude from Execution". (anyway it's always good to do your test).