1989 · Origin Systems

Space Rogue

This minisite was contributed by air. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/space-rogue with me to Gold.

The nine star systems and the twelve bases, each drawn whole from the map file the game loads, with the engine's own chart drawer ported to this page: the planets go round their stars as the days pass, and every person, door and notice stands where the file puts it.

01 · Systems

The planets go round by the date

Each system is one 1,536-byte file on side 2 of the disks, nine of them, Q0 to Q7 and Q9, which load_system_map ($2E7A) reads to $5100 for the system the ship is in. Its first kilobyte is the chart: 32 by 32 tile numbers, one a sector.

Point at a sector to see what is there.

Drawn by the page's port of the engine's chart routines, fill_chart_window ($3069), draw_map_objects ($2F9C), animate_chart ($8638) and draw_chart's tile layout ($8658), from NAV.TIL's tiles in the navigation listing and the system's map file. The orbits are place_orbiting_objects ($2D60), run for the day on the slider. A test, test_chart.js, runs the same routines from the listing on the kit's 6502 simulator and compares: every map for every day the orbits can tell apart, windows centred on every sector and beyond, the tile pixels draw_chart puts in the bitmap, and maps with every entry made random. They all agree. The black ring is what the game draws past the chart's edge. Animate steps the pass counter the tiles take their frames from, at a rate of the page's own.

An entry moves by the motion kind in its flags. The planets on orbits are put in place for the date when the map is loaded (place_orbiting_objects, $2D60) and moved on once a day of HELM travel (move_map_objects, $2D38), each on a circle round the chart's centre, 16, 16: 16 places of radius 3 for a small orbit, a step every two days, and 32 places of radius 6 for a large one, a step every four (orbit_small, $2E11; orbit_large, $2E31). A small orbit takes 32 days and a large one 128, so after 128 days every planet is back where it started, which is why the slider stops there. A gas giant's picture changes with its quarter of the circle. The phases at $5610 and $5611 start each system's planets in a place of their own.

The ion storms (type $64) move as well, a random step a day of travel (motion_wander, $2D89), so the chart shows them where the file starts them. The danger level and the class weights decide what the ship meets on the way (Ships and combat).

02 · Bases

Every base, with the people who stand in it

A base's map has the same layout as a system's, read by the same chart drawer, with LAND.TIL's tiles: a 32 by 32 floor plan, and 32 entries that are the people, the counters, the doors, the notices and the things lying about.

Point at a square to see what is there.

The whole floor plan, as the map file loads it, drawn by the same port ($3069, $2F9C, $8638, $8658) with LAND.TIL from the bases' listing ($4000). In play the screen shows a window of 11 by 9 squares round the player and blacks out what the player cannot see (sight, $BAEE), which this plan leaves out. The checkerboard past the edge is the game's own: off the map, the bases' window takes tiles $2C and $2D by turns.

Seven people have no base of their own: Ichiki the Baakili far trader, Flitch, the rusty robot that deals in items, Kale the bounty hunter, Somar Tan, Veda and the young trooper on leave. Each time the player docks at a base whose map names a visitor's square ($5611, $5612), base_setup ($E4BC) stands a random one of the 32 people there, from those with a visitor's picture (visitor_pictures, $08B5), which only those seven have. Bassruti's map has no such square.

03 · HIVE!

The island the trooper drops onto

The arcade game in the cantinas has one map, H.MAP, loaded again before every game, so each drop starts on an untouched island (hive_menu, $572F).

Point at a square to see what is there.

The island as H.MAP loads it, drawn with H.TIL from the HIVE! listing by the same port; past the edge the game draws water (tile $39, hive_draw, $5BE4). The mounds and the Manchi are not in the file: each drop raises them (How it works).