Computer Science
Grade 9
20 min
Digital Storytelling
Digital Storytelling
Tutorial Preview
1
Introduction & Learning Objectives
Learning Objectives
Define key principles of digital design, including color theory, composition, and the difference between vector and raster graphics.
Explain how a data structure like a 2D array can store the visual information for a pixel-based sprite.
Use functions in a simple graphics library to set colors using the RGB model and draw basic shapes at specific (x, y) coordinates.
Analyze a digital image to identify its core design elements like line, shape, and color.
Design a simple character sprite using pixel art techniques on a grid.
Apply the 'Rule of Thirds' to plan a more dynamic visual scene for a digital story.
Ever wonder how video game worlds feel so alive or how animated movies draw you in? 🎨 It all starts with a single pixel and a great design!...
2
Key Concepts & Vocabulary
TermDefinitionExample
Raster GraphicsImages made up of a grid of tiny squares called pixels. They are resolution-dependent and lose quality when scaled up.A digital photograph (.JPG) or a detailed painting made in an app like Procreate (.PNG). If you zoom in too much, you see the individual pixel squares.
Vector GraphicsImages created using mathematical equations to define points, lines, and curves. They are resolution-independent and can be scaled to any size without losing quality.A company logo (.SVG) or a character illustration made in Adobe Illustrator. You can make it as big as a billboard and it will still be perfectly sharp.
RGB Color ModelAn additive color model where red, green, and blue light are added together in various ways to reproduce a broad array of colors. In computers,...
3
Core Syntax & Patterns
The RGB Color Function
color(R, G, B)
Used in many programming environments to set the fill or stroke color for shapes. R, G, and B are integer values from 0-255 representing the intensity of Red, Green, and Blue.
The 2D Coordinate System
(x, y)
Used to position elements on a digital canvas. In most computer graphics, the origin (0, 0) is at the top-left corner. The x-value increases to the right, and the y-value increases downwards.
Color Palette Array
let palette = [color1, color2, color3];
A data structure (an array or list) used to store a collection of pre-selected colors. This helps maintain a consistent visual theme and makes it easy to reference colors programmatically. Each 'color' element would be an RGB value itself, like (255, 0, 0).
4 more steps in this tutorial
Sign up free to access the complete tutorial with worked examples and practice.
Sign Up Free to ContinueSample Practice Questions
Challenging
A student is creating an 8x8 pixel art sprite and wants to add a new, third color (e.g., blue) for a hat. What two distinct parts of their code must they update to achieve this?
A.Increase the size of the 2D array to 9x9 and add the color to the palette.
B.Change the file format to SVG and create a new function for the color blue.
C.Only change the numbers in the `spriteData` 2D array to the new color's index.
D.Add the new blue color to the `palette` array and change the corresponding numbers in the `spriteData` 2D array to the new color's index.
Challenging
An artist is creating a scene with a detailed, photographic background of a forest and a simple, scalable cartoon character who will be animated. Which combination of graphic formats is best for the background and character, respectively?
A.Raster for the background, Vector for the character.
B.Vector for the background, Raster for the character.
C.Raster for both the background and the character.
D.Vector for both the background and the character.
Challenging
A student places their main character at `drawCharacter(300, 200)` on a 600x400 canvas, which is the exact center. Based on the tutorial's advice, why might this be a poor compositional choice?
A.The center of the screen uses more processing power.
B.The character will appear smaller at the center.
C.Centering can make a scene look static and less dynamic than using a guide like the Rule of Thirds.
D.The coordinates (300, 200) are known to cause rendering errors in most graphics libraries.
Want to practice and check your answers?
Sign up to access all questions with instant feedback, explanations, and progress tracking.
Start Practicing Free