Screenshots - cdig/docs GitHub Wiki

Quick Tips

  • You must open a material, not just an artifact preview, so that you can get the correct filename for the screenshot.
  • For video screenshots, try to source an image from a full-quality render, rather than taking a screenshot of the compressed video.
  • Screenshots must be exactly 960 x 500.
  • When optimizing, pick the smallest (least kB) image that doesn't look bad — ideally 20kB or less.
  • Crunch it with ImageOptim (Lossy compression OFF)
  • Upload to lunchboxsessions > short-lived > screenshot > [topic] > [session] > [category] > [name].png

Instructions

  1. Pick which artwork you'd like to feature in the screenshot.

    • For Simulations, open Settings and turn Labels off. Don't adjust any other controls. The screenshot should resemble the way the simulation will look when you open it. So, don't worry about turning on all of the features, adding a bunch of loads, making it look busy.
      • The top priority for Simulation screenshots is to help the user recognize what they are about to open. If the simulation is small enough that you can show the entire thing, great. If it's so large that showing the full system will just be visual noise, zoom in and show as much you can, preferably of a unique or recognizable part of it.
      • Try to keep it aesthetically pleasing. E.g. try to have a little padding around parts that don't cut off, aim for good composition, etc.
      • Don't zoom in so closely that the screenshot starts to resemble the Lesson screenshots, with their large symbols.
    • For cd-module content, I usually scroll through and grab screenshots of any art that looks cool and seems representative of the subject matter.
    • For lessons, it's common to have at least one character and at least one object. For References and Puzzles, it usually suffices to have just some objects.
    • If you can make the screenshot an entire scene, that sometimes looks really cool. Examples:
  2. In Photoshop (or whatever) make a 960 x 500 image, typically with a white background for cd-module stuff (or whatever best fits the artwork) or #c1c3c7 for simulations.

    • Position your art so that it looks good. Feel free to get creative here. Rotate things, fade some things out, position characters and objects so it creates a sense of perspective or relative scale. Use Gestalt graphic design principles liberally (repetition, spacing, etc).
    • It's totally good to have the artwork run right off the sides or the top, cut off at the edges of the image. But avoid artwork that sticks off the bottom, because the images will be padded on the bottom for the material title, so there'll be an awkward edge where the artwork just stops. Examples:
  3. Save as a PNG. The name of the file is important — it needs to be exactly the same as the name of the material in the URL on LBS. So for example, if there's a Reference named "This Is My Example" in a Session named "Dunk Town", the URL will be:

    https://www.lunchboxsessions.com/materials/dunk-town/this-is-my-example-reference

    The name of the file must be the same as the last part of the URL, minus the category:

    this-is-my-example.png

    Note that for weirdly named materials with punctuation and stuff, the URL might be non-obvious, so you can't just guess based on the material name. You must grab the exact text from the URL.

  4. Open your terminal (eg: Hyper) and type cdig screenshot , then drag the PNG you saved into the terminal. Run the command. It should produce a bunch of copies of the image on your desktop.

  5. Proceed to the Optimize step below.

Optimize

At this point, there will be a bunch of copies of the screenshot sitting on your desktop, each of them compressed with different settings. The compression works in part by limiting how many colors are used in the image, and the file names end with the number of colors. For example:

  • my-screenshot 16.png — 16 colors
  • my-screenshot 24.png – 24 colors
  • my-screenshot 32.png – 32 colors
  • etc

Goal: Pick the image with the smallest file size that doesn't look intolerably bad.

  1. Open a new Finder window for the Desktop (⇧ ⌘ D), to make it easy to flip through the images with the arrow keys.

  2. Starting from the lowest quality image (16 colors), flip through the images in pairs, and play spot-the-difference between each.

    • So first, rapidly flip between 16 colors and 20 colors, to decide if 16 colors is enough.
    • If you can't see any difference, then that probably means 16 colors is good enough and you can stop there.
    • If you do see a difference, and the difference makes the 16-color image look bad, then 16 colors isn't good enough. Continue to the next pair (20 and 24).
  3. The first image you encounter that doesn't look noticeably worse than the one after it is your leading candidate.

    • Remember that these images will be scaled down to about half their current size, so there's a pretty high tolerance for "noticeably worse".
    • Most of the time, the image should have a pretty small color count — 32 to 64 is very common.
    • Most of the time, the image should be pretty small. Under 20 Kb is desirable, but up to 40 Kb is just fine.
      • If you need to go with more than 60 Kb to get something not-bad, let Ivan know.
    • Based on the above, you might decide to pick an image that's slightly higher or lower quality than the leading candidate. This is fine — use your best judgement.
  4. Rename the image you picked, to remove the part with the number of colors.

    • Eg: caterpillar-h-grader-brakes 64.png becomes caterpillar-h-grader-brakes.png
    • It's important that the name matches the material's URL in LBS, as that's how LBS finds the screenshot.
  5. Open ImageOptim, make sure Lossy is off (Tools > Lossy minification should be unchecked), and then drag in the image. This should shave another 3-10% off the file size.

Upload

  1. Open Transmit

  2. Open the CDIG S3 account.

  3. Browse to lunchboxsessions > short-lived > screenshot > [topic] > [session] > [category]

    • If any of these folders do not already exist for your material, create them.
  4. Drag in your image, and Transmit will upload it.

  5. Verify that it's showing up on LBS.

    • If this is a new screenshot, it should appear immediately on your next reload.
    • If this is replacing an existing screenshot, it will appear within the next 10 minutes. (You might also need to open the Dev Tools in your browser, go to the Network tab, and make sure "Disable cache" is checked.)
  6. Schedule the material for publishing, or publish immediately, if appropriate.

    • For materials that will live in the public-facing part of LBS, try to spread out when they are published so that they're typically about 1 week apart.
    • To see if there are any other materials currently scheduled for publishing, open Admin > Content > Materials, and click the Published column once to sort the table by that field. If there are any materials scheduled to be published, they will appear at the top of the list, and their scheduled date will show up under the Published column.
    • To see which materials have been recently published, check the What's New page.
  7. Finally, post on the #changelog channel in Slack that you've just shipped this material. Something like:

    • New material:
    • Updated material:
    • Include a link to the material after the colon.
    • If the material needs anything (eg: someone to help publish it, someone to review it before it goes live, someone to do something special for the screenshot, anything else), please include that info in the post and tag any needed people by name.