The Vector Editor opens automatically when you create or double-click a .vec file. It is a 2D (and optionally 3D) path editor that works directly in Vectrex coordinate space (−128 to +127 on both axes).

Canvas and coordinate system
The canvas shows the Vectrex screen boundary as an outlined rectangle. The origin (0, 0) is in the centre. X increases to the right; Y increases upward — the same convention used in your VPy code.
Use scroll wheel to zoom (1×–8×) and middle-mouse drag to pan.
Game units
A .vec normally stores Vectrex beam units, which is what the console draws. A sprite traced from an arcade game can instead be stored in game units ("units": "game" in the file): one arcade pixel per unit, so an arcade grid of steps of 4 or 8 survives exactly instead of being rounded to beam units. One game unit is 110/127 of a beam unit, and the editor draws it at that scale, so what you see stays 1:1 with the console. Only the grid you edit in changes, not the size.
Tools
| Tool | Shortcut | Use |
|---|---|---|
| Select | S | Click or drag-box to select points; drag to move |
| Pen | P | Click to add points to the current path |
| Line | L | Draw straight two-point segments |
| Bezier | B | Draw smooth curves with tangent handles |
| Polygon | G | Place a regular polygon (set sides in properties) |
| Circle | C | Draw a circle approximated as a polyline |
| Arc | A | Draw an arc segment |
| Walkable Area | W | Paint a horizontal shelf where enemies can walk (used by the wander AI) |
| Pan | Space+drag | Navigate the canvas without deselecting |
Layers
The left panel lists every layer in the file. Each layer contains one or more paths.
- Click the eye icon to toggle layer visibility.
- Click a layer name to select all paths in it.
- Use the + Layer button to add a new layer.
- Drag layers to reorder them (draw order, bottom to top).

Path properties
Select a path to edit its properties in the right panel:
| Property | Description |
|---|---|
| Intensity | Beam brightness of the whole path, 0–127. Higher = brighter. |
| Segments | One brightness per segment of the path (1→2, 2→3…), 0–127, where 0 turns that segment off. |
| Closed | Connect the last point back to the first. |
| Name | Optional label, used for debugging. |
Select individual points to move them by dragging or by typing coordinates in the input fields.
Per-segment intensity
Each segment of a path can have its own brightness. The Segments list in the path's panel shows every segment with its own value, and you edit it there directly, without selecting points first. Set a segment to 0 to turn it off. Selecting segments on the canvas and setting an intensity applies it to those segments only. The selection is named in the status bar (segment 3, or 4 segments).
Per-segment intensity is drawn by the SDK as well as the editor, so the game shows what you see here.
Walkable areas
Switch to the Walkable Area tool and drag horizontally across a platform to define the shelf where enemies patrol. Each area has a Y level, an x_min, and an x_max. The Playground editor reads these to derive enemy patrol routes automatically.

Views and 3D
Four buttons, one per view, sit above the canvas, and the keys 1–4 do the same when the canvas has focus:
| Button | Key | View |
|---|---|---|
| XY | 1 | Front view (X-Y), the normal 2D view |
| XZ | 2 | Top view (X-Z) |
| YZ | 3 | Side view (Y-Z) |
| 3D | 4 | Perspective view |
In the 3D view, middle button + Shift drag orbits the view; middle-button drag alone pans. Paths stay flat (Z = 0) unless you give points a Z coordinate. A sprite with Z values is a 3D wireframe that DRAW_VECTOR_3D draws turned in space.
Background image
Drag any PNG or JPG onto the canvas to load it as a tracing reference. Use the opacity slider to dim it while drawing. The image itself is not saved in the .vec file — it is editor-only.
The fit menu decides how the image sits on the screen:
| Fit | Use |
|---|---|
| stretch to screen | Fill the Vectrex screen, ignoring the aspect ratio |
| fit width (keep aspect) | Fill the width, keep the proportions |
| 1:1 pixels | One image pixel per unit |
| 1:1 centered | The same, centred on the origin |
| arcade playfield (224x256) | Place a 224×256 arcade screenshot where the game's playfield sits on the Vectrex screen, for tracing arcade graphics |
The Edge Detection button (Canny algorithm) processes the background image and overlays detected edges as a guide. Adjust the threshold sliders to tune sensitivity.

Import
File → Import supports:
- DXF — 2D CAD drawings. Select the XY, XZ, or YZ plane to project onto.
- OBJ — 3D meshes. The editor extracts silhouette edges and projects them to a flat plane.
Both formats are converted to polyline paths. Adjust the angle threshold to filter edges by sharpness.
File format
.vec files are plain JSON. A minimal example:
{
"version": "1.0",
"name": "player",
"canvas": { "width": 256, "height": 256, "origin": "center" },
"layers": [
{
"name": "body",
"visible": true,
"paths": [
{
"name": "outline",
"intensity": 127,
"closed": true,
"points": [{"x": 0, "y": 10}, {"x": 8, "y": -10}, {"x": -8, "y": -10}]
}
]
}
]
}Using it from VPy and C
A .vec lives in assets/vectors/ and is named by its file name without the extension (ship.vec is "ship").
| Language | How to draw it | Targets |
|---|---|---|
| VPy | DRAW_VECTOR("ship", x, y), DRAW_VECTOR_EX("ship", x, y, mirror, intensity), DRAW_VECTOR_3D("ship", ax, ay, az, x, y) (points with z), DRAW_VECTOR_ROT("ship", x, y, angle) | m6809, rp2350, uvm2, pitrex |
| C | #include "ship.h", then DRAW_VECTOR(SHIP_vec, x, y) or DRAW_VECTOR_ROT(SHIP_vec, x, y, angle) (DRAW_VECTOR_ROT_EX adds mirror and intensity). The project's Makefile compiles the .vec to gen/ship.h | WASM simulator, rp2350, uvm2 |
mirror is 0 for none, 1 to flip X, 2 to flip Y, 3 for both. angle runs 0–127 for one full turn counter-clockwise (32 = 90 degrees). Every point is a beam move, so keep point counts low. See VPy and C for how the two languages share the runtime.