Skip to content
Featured in Game Art

Tile set in progress

Work-in-progress tiles for a harbour map.

Edge lines deserve more attention than they usually get. A thin, slightly darker line along the bottom edges grounds each block, and a lighter line on the top edge suggests a highlight. Using currentColor for those lines means a single colour change on the wrapper restyles every outline in the scene.

SVG is often the better choice for complex scenes. CSS cubes are fun to build and easy to animate, but a city block made of hundreds of divs is hard to change and heavy to render. We draw the static parts in SVG, keep the interactive blocks in CSS, and layer the two together.

Share

Written by

Theo Okafor

Theo writes about 3D transforms and rendering performance. He keeps a spreadsheet of every browser bug he has hit with preserve-3d.

All 18 posts by Theo Okafor

6 comments

  1. Gus Lindgren

    Our designer drew the scene in Figma and I rebuilt it with your approach in an afternoon.

    Reply to Gus Lindgren
    1. Quinn Adler

      Glad it helped. The values are in the colour ratios reference.

      Reply to Quinn Adler
  2. Rosa Medina

    How would you handle text that needs to wrap on one of the faces?

    Reply to Rosa Medina
  3. Nina Ahlberg

    Bookmarked. The table alone is worth it.

    Reply to Nina Ahlberg
  4. Kofi Mensah

    The tip about naming faces instead of colours saved our design system a lot of pain.

    Reply to Kofi Mensah
    1. Theo OkaforAuthor

      The templates are in the downloads section of the reference post.

      Reply to Theo Okafor

Leave a comment

Your email address won’t be published. Required fields are marked.