Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoCity

GoCity is a real-time true-color ASCII 3D city renderer written in Go. It uses a small triangle rasterizer, a depth buffer, directional and emissive materials, and a first-person camera without relying on a graphics library.

Requirements

  • Go 1.20 or newer
  • An interactive terminal with ANSI escape sequence support

Windows Terminal, PowerShell, and current Command Prompt versions are supported. GoCity enables Windows virtual terminal processing at startup.

Run

go run .

The program opens on a map-selection menu. Use W/S or the arrow keys to select a map, Enter to open it, and R to rescan custom map files.

Controls

Key Action
W / S Move forward / backward
A / D Strafe left / right
J / L Turn left / right
I / K Look up / down
Esc Return to the main menu
Ctrl+C Exit immediately

Input is event based, so holding a key uses the operating system's keyboard repeat rate.

Movement is constrained to the ground plane. Looking up or down does not change the movement direction, and the camera has a collision volume that slides along buildings and remains inside the city bounds.

Custom Maps

At startup GoCity creates a maps directory under the current working directory if it does not exist. JSON files in that directory appear alongside the hard-coded city in the main menu. The built-in cyberpunk city is always generated from Go code and is never copied into maps.

See maps/README.md and maps/example_district.json for the version 1 map schema and an editable example.

City Layout

The player starts at the entrance to a neon-lined central avenue. A cross street divides four raised city blocks, while cyan and magenta road edges make the route readable at a distance. Buildings use different silhouettes, facade light bands, rooftop aerials, and road-facing signs. The stepped tower at the far end of the avenue is the main navigation landmark; additional side street towers make the world extend beyond the initial view.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages