Gridwright Start for $1

Pixel Planet Generator: Rotating Planets for Your Game

Make rotating pixel art planets from a seed, with clouds, rings and a loop that never jumps, then play them as an AnimatedSprite2D in Godot 4.

Planet Generator at work
Planet Generator at work: Rotating pixel planets.

Your space game needs planets. A star map with twenty worlds, a shooter with a giant planet behind the waves, a title screen with one ringed giant. You draw a planet and it looks fine as a still. Then you try to make it turn.

That is where it gets hard. A turning planet is a sphere with a map wrapped around it, and every frame has to slide the map a little further while the light stays put. Draw it by hand and the continents wobble from frame to frame. Fake it with a moving texture and the edges look flat. And when the loop restarts, the surface jumps back to where it began, once every few seconds, in front of the player.

This guide covers what a good rotating pixel planet needs: the loop, the frame count, the light, the details that make it a world, and how to play it in Godot 4. Then it shows the Planet Generator doing the job in seconds. You can try it here while you read.

A loop that is one full turn

A rotating planet is a loop, and the loop has to be exactly one turn. If the surface after the last frame is not where it was on the first, the planet jumps on every restart. Players may not know what is wrong, but they see the twitch.

Planet Generator in use
Planet Generator in use. Every tool runs in your browser, nothing to install.

The clean way is to draw the planet from a map that wraps around the sphere and to slide that map by the same whole number of pixels every frame. After the last frame the map is back where it started, so the next frame is the first one again and the turn never ends. Clouds can turn a different whole number of times per loop, faster than the ground, and the loop still closes.

How many frames

The frame count sets how far the ground moves each frame. Move it too far and the planet strobes; too little and the sheet gets huge for no gain. Two to four pixels at the equator per frame looks smooth:

Planet Generator in use
Planet Generator in use. Every tool runs in your browser, nothing to install.
  • 32 px planets: about 48 frames per turn.
  • 64 px planets: about 64 frames per turn.
  • 128 px planets: about 96 frames per turn.

Played at 12 frames per second, a 64 px planet turns once in a bit over five seconds. That is slow enough to sit behind gameplay without pulling the eye.

Light that stays put

The sphere turns, the light does not. Pick one light direction for the whole game, usually from the upper left, and light every planet, moon and ship the same way. Split each material into a few tones (night, dark, mid, lit) and let a small ordered dither mark the line between day and night. Pixel art reads best with hard steps, not a smooth gradient.

Planet Generator in use
Planet Generator in use. Every tool runs in your browser, nothing to install.

A few rules keep it readable:

  • Keep the night side dark but not black, so the planet still shows against space.
  • Let glowing things ignore the light. Lava, city lights and crystal veins look best brighter on the night side.
  • Give planets with air a one pixel rim on their lit edge.

Details that make it a world

A coloured ball becomes a place with a few touches. Clouds that drift faster than the ground show weather, and a one pixel shadow under them gives depth. City lights on the night side say someone lives there. Craters need a dark wall facing the light and a lit wall facing away. Rings pass behind the planet at the top and in front of it at the bottom, and the planet throws its shadow across them.

Visual Novel Backgrounds
Visual Novel Backgrounds: Pixel art VN backgrounds: school, home, town, nature, spooky; day, sunset, night, rain; 16:9 Ren'Py. One of the 150 packs in Gridwright.

Each size should be drawn for its size. A 128 px planet shrunk to 32 px turns its coastlines into noise, and a 32 px planet blown up looks blocky next to sprites drawn at full detail. Small planets need bigger shapes; large ones can carry rivers and crater rims.

Variety from seeds

A star map with twenty copies of one planet looks like wallpaper. Generators solve this with a seed: a number that decides every random choice, such as where the continents sit and how the clouds are spread. Change the seed and you get a new world of the same kind. Keep it and you get exactly the same planet again, so a save file only has to store the number.

Parallax Backgrounds
Parallax Backgrounds: 48 seamless pixel art parallax backgrounds: 12 scenes at dawn, day, sunset and night, 320x180. One of the 150 packs in Gridwright.

The fast way: the Planet Generator

The Planet Generator does all of this in your browser:

  1. Pick a planet. 62 types: terran, ocean, jungle, desert, ice, lava, toxic, crystal and city worlds, moons, dwarf planets and gas giants, five of them ringed.
  2. Roll seeds. New seed keeps the type and gives a new world; Random planet picks a new type too; Original goes back to the planet's own seed.
  3. Pick a size. 32, 64, 128 or 256 px. Each size is drawn for its size, with 48, 64 or 96 frames for one full turn at the first three.
  4. Fit it to your game. Shift the hue and the saturation, and switch clouds and the ring on or off.
  5. Check it. Watch it turn at 6 to 24 frames per second on space, a checker, black or white, zoomed up to 8x.
  6. Export it. The sheet at 1x, 2x or 4x, the current frame at 4x, or the settings as JSON so you can make the same planet again later.

Every sheet holds one full turn, left to right and then down, and the last frame leads straight back into the first.

What the demo saves

Try it here. The free demo has 8 planets (Blue Marble, Golden Crown, Molten, Grey Moon, Glacier, Rust, Archipelago and Amethyst) at 32 and 64 px, and every export works on them: the sheet, a frame and the settings.

The full tool has all 62 planets and the 128 and 256 px sizes.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes

Play it in Godot 4

A planet sheet goes into an AnimatedSprite2D:

  1. Add an AnimatedSprite2D and give it a new SpriteFrames in the Inspector.
  2. In the SpriteFrames panel at the bottom, press Add frames from sprite sheet and open the PNG.
  3. Set Horizontal and Vertical to the sheet's columns and rows. A 64 px planet's sheet is 512 by 512 pixels: 8 by 8, 64 frames. Select all frames and add them.
  4. Set the animation's speed to 12 FPS. A new SpriteFrames starts at 5, which makes the turn crawl. Looping is on by default.
  5. Turn on Autoplay on Load for the animation, or call play().

Set Texture > Filter to Nearest on the node, or Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter to Nearest for the whole game. A new Godot 4.7.2 project starts on Linear, which blurs pixel art.

We built these frames in Godot 4.7.2 from a 64 px sheet: 64 frames at 12 FPS, and the last frame is one step before the first, not a copy of it, so the turn never pauses.

Stop the star map turning in step

Twenty planets that start their loop on the same frame turn like gears in one machine. Give each planet a small script:

extends AnimatedSprite2D

func _ready() -> void:
	frame = randi() % sprite_frames.get_frame_count(animation)
	speed_scale = randf_range(0.9, 1.1)

Each planet starts on its own frame and turns a little faster or slower. We ran it on six planets in Godot 4.7.2: they started on six different frames.

Put space behind them

A planet floats best on layers. Use a seamless star background that tiles both ways, a nebula layer over it and a near layer of stars, each in its own Parallax2D node. Set Repeat Size to the tile size so it never ends, and give each layer its own Scroll Scale: the far stars slowest, the nebula about a third of the camera's speed, the near stars about two thirds. Put the planets between the nebula and the action, and scroll them with the nebula or slower.

When the planet looks wrong

  • It jumps every few seconds. The loop is not one full turn, or a frame is missing from the SpriteFrames.
  • It crawls. The animation is still on 5 FPS.
  • It looks blurry. The filter is Linear. Set it to Nearest.
  • It is lit from the wrong side. Every planet in a scene needs the same light direction.
  • Every planet turns together. Start each one on a random frame.

Make your solar system today

Open the Planet Generator, roll a few seeds and export the worlds you like. For a full sky in the same style, the Pixel Planets pack has all 62 planets at 32, 64 and 128 px with suns, black holes, galaxies, asteroids, comets and six seamless space backgrounds. Both are part of Gridwright: 44 tools and 150 asset packs, 3 days for $1, then $17 a month.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes