Puzzle icon speedrun

When viewing my vector icon speedruns, it can be difficult to see precisely what’s going on. Everything happens quickly, with many actions triggered via keyboard shortcuts, and Illustrator’s interface is cropped out of view. That’s just the nature of what they are, which means they provide more entertainment than education.

This article aims to be a director’s commentary for my puzzle piece icon speedrun, noting the techniques used, and why they were chosen. I use Adobe Illustrator for all the icon speedruns, but many of the tips are relevant for other design tools.

A puzzle piece being drawn in Adobe Illustrator

Workspace #

One important aspect to working quickly is setting up your workspace. When designing icons, I like having a working area well defined, with the center point marked. Both are locked, so I can’t accidentally move or alter them. The “working area” is typically the target icon size. In this example, I’m using a 16×16px area.

Working to a coarse grid is faster and more accurate. If points need to be placed off-grid, Illustrator’s move window can be used, allowing for precise numeric offsets. Illustrator’s snap to pixel has some behaviour I don’t like, so I use snap to grid instead.

Mac shortcuts are noted below, so please substitute control for command, and alt for option if you’re using Windows.

Step 1 #

Use the polygon tool to draw a square by clicking and dragging horizontally. While dragging, the up and down arrow keys change the number of sides. This is a great way to create pixel snapped 45º rotated squares. Switch to the direct selection tool and drag the rightmost point just past the center of the shape.

Step 1: A four sided polygon being drawn

Step 2 #

Draw a rectangle that’s 2px high, touches the edge of our working area, and is vertically centered. This will form the puzzle piece’s loop. Then, switch to the direct selection tool and select the rightmost two points of the rectangle.

Illustrator’s various transform tools can be used to act on just the selected points, enabling lots of tricks and workflow shortcuts. Switch to the scale tool and drag up to move both points away from each other. Given they have the same X position, scaling will be constrained to just up and down — holding the shift key is not needed.

Step 2: The loop of a puzzle piece is drawn using a rectangle

It’s also possible to click on the canvas to set the origin for the scale transformation. That means we can transform just some points, rather than the entire shape, and the transformation can happen with a specific origin. Amongst other things, it allows for temporary mirrored editing. Using this technique, we can make a star wave its arms around.

A star shape waving its arms around

Step 3 #

Select the two objects we’ve created, and use the pathfinder panel’s unite button. This turns everything into a single path. Select the rightmost two points and round them with the live corner widget. Drag it inwards until the path outline gets thicker. The thicker path segment indicates that the corner radius is as large as it can get. Select the adjacent two points and round them a little as well.

You may notice I switch between dragging a marquee to select points and clicking to select points. Marquee selections are often my preferred technique, because it’s possible to grab multiple points at once, and there’s less risk in accidentally dragging a point. But, in situations where there’s lots of points close together, clicking to select is the only option. The lasso selection tool can also be a great choice, but we’ll save that for a different speedrun.

One side of the puzzle piece is now complete.

Step 3: Some corners on the puzzle piece getting rounded

As an aside, the pathfinder unite action can be used on a single path. When used like that it isn’t uniting two paths, but it is performing some cleanup. Points that are exactly on top of each other will be replaced with a single point. Other redundant points can also be removed. If the path is open, it will be closed. Using unite can be way faster than futzing around with alternate methods for closing a path or removing points. Unite is a one click “fix it” button for many scenarios.

To ensure redundant points will be removed, open up the pathfinder options window from the top right menu in the pathfinder panel and turn on remove redundant points. The precision can also be increased to give more accurate results. Please note that these settings are not saved across Illustrator sessions. The default is for redundant points to be removed, but not for unpainted artwork to be removed.

The pathfinder panel options in Adobe Illustrator

Step 4 #

Select the rotate tool, then click in the center of the working area to set the origin. This means the rotation will be around the tip, rather than the center of the object. Drag to rotate, holding option to make a copy, and shift to constrain to 90º. If holding shift isn’t constraining to 90º, check to see if the guide preferences are set up correctly (the default is 0º, 45º, 90º, and 135º).

To make the next copy, press ⌘D to transform again. This repeats the previous transformation, which for us was to rotate 90º and copy. We now have two puzzle sides completed, and the bottom side partially done.

Step 4: A side of a puzzle piece being copied to two other sides

Step 5 #

Select the bottom path, switch to the direct selection tool, and deselect just the top point of the path. With all but one point selected, it’s possible to grab the path by one of the other points and drag upwards, leaving the tip where it was. This inverts the shape, turning the loop into a socket. The best point to grab is the left or rightmost points, because they can snap to the points on the other pieces.

Step 5: A side of a puzzle piece being inverted

Step 6 #

Select the rotation tool, once again clicking the center of the working area to set the origin, then hold option and shift to copy and constrain as the pirce is rotated into place at the bottom.

Step 6: The final side of a puzzle piece icon being created

The puzzle piece is now complete. To turn it into a single path, select the four pieces and choose unite from the pathfinder panel. I often don’t include steps like this in my icon speedruns — the focus is on building an icon as quickly and efficiently as possible, even if the final path isn’t up to scratch as a production asset.

Published 29 March 2021.