Sublime Forum

How was frontpage screencast created?

#1

I liked the screencast animation on sublimetext’s frontpage. Out of curiosity I tried to figure out how it works, and I found the code quite interesting. I looked into the javascript code and found that it’s created with 6 base PNG images and arrays that apply blit deltas at specific time intervals. I am curious, what was the technique or tool that was used to generate those arrays? I imagine there was a tool that was fed with successive PNG screenshots of the demo and it spit out that javascript code. If the creators of the frontpage don’t mind sharing, can they enlighten me on this subject :question:

If you would like to earn some SO points you can answer at this link too: http://stackoverflow.com/q/11463749/174527

Thanks.

0 Likes

#2

Not everything needs to be auto-generated.

I think Jon created the screencasts using the usual software - Camtasia, ScreenFlow etc and then just saved them as .gif adding them to an array within the JavaScript.

0 Likes

#3

What would be nice is to see which keys are pressed for which action, for beginners like me. I could not reproduce the second example …

0 Likes

#4

@bluebird75 Assuming you know that you can wrap quotes and brackets around a selection (try selecting some text and pressing " or ), the two less obvious features are: split selection into lines (menu: Selection > Split Into Lines) and join lines (menu: Edit > Line > Join Lines). I don’t think anything else is particularly mystifying.

P.S. I describe the actions via the menus because the key bindings are sometimes different across the various OSs.

Hope this helps,
Alex

0 Likes

#5

The screencasts were created with a custom Python program that processes a series of regular .png files into a (considerably smaller) packed one. The end result is essentially animated gifs recreated with javascript+canvas+png, yielding higher quality animations.

I’ve been meaning to write a blog post about it.

0 Likes

#6

any chance of you sharing that python program :smile:

0 Likes

#7

Do you write your own solutions to EVERYTHING?

0 Likes

#8

Planning to with the blog post

Why yes, yes I do :slight_smile:

I tried to make them animated gifs initially, but the encoders I tested were spitting out unusably huge files. It would have been challenging to get the text + image synced up in this scenario, too.

0 Likes

#9

Jon dreaming:
01011010100100100011100100101001011011101010001101001

Jon’s nightmare:
010010100100010010010012

:astonished:

0 Likes

#10

Thanks Jon. Looking forward to the blog post.

0 Likes

#11

[quote=“iamntz”]Jon dreaming:
01011010100100100011100100101001011011101010001101001

Jon’s nightmare:
010010100100010010010012

:astonished:[/quote]

That was kind of me when I wrote my bachelor’s thesis in VHDL where debugging consisted of analyzing the generated waveforms…

0 Likes

#12

Thanks for sharing your PNG utils Jon. I wonder if you could share how you captured the timestamped PNG files? Someone asked on the blogpost but there was no answer, and I’ve done a fair whack of searching but can’t find a convenient way to screencam to PNG.

TIA :smile:

S

0 Likes

#13

I used a modified version of Sublime Text that recorded them whenever it did a repaint.

0 Likes

#14

Thanks Jon… Was hoping for something a little more generic than that, but hey :wink:

0 Likes

#15

Looks like a feature worth to be looked into further to me, like for creating gifs or something for a preview of your newest plugin on github or just on the web. Not anywhere near “must-have” but not a bad idea either.

0 Likes

#16

Thanks for sharing your PNG utils Jon. I wonder if you could share how you captured the timestamped PNG files?

Did I miss this? Can you point me to where the png-utils are shared?

Thanks

0 Likes

#17

sublimetext.com/~jps/animate … d_way.html

0 Likes