Part 1 - Space Travel / Creating the Space

Create the Stars

Create a Node Script called "SpaceTravel". The artboard is 1920x1080. Generate 300 small white circles as stars. All stars fly outward from the center of the artboard, like traveling through space. When a star exits the screen, reset it back to the center

TIP

I often use ChatGPT to help formulate prompts before pasting them into Rive

Size Variation + Parallax

Right now every star is identical - same size, same speed. In real space, closer objects appear larger and move faster. We describe the behavior we want and let the AI figure out the math.

Update the SpaceTravel script. Randomize each star's size between 1 and 6 pixels. Smaller stars (1-2px) should be dimmer (30-50% opacity) and move slower. Larger stars (4-6px) should be brighter (80-100% opacity) and move faster. This should create a natural parallax depth effect

Spread the Spawn Origin

All stars spawn from the exact center - it looks like a firework, not space. Spreading the origin makes the field feel infinite. Notice we say "75% of the artboard" not "a 1440px radius" - describe the intent, not the pixels.

Update the SpaceTravel script. Stars should not all spawn from the exact center point. Spread the spawn origin randomly within 75% of the artboard size (whichever is larger, width or height).

Instructor

Your first real Node Script. Set up the project and build a star field flying through space.