Skip to content

mikkancso/preinky

Repository files navigation

Preinky - 3D Geography Game

A 3D geography game where players place 4 cities on a blank globe to form rectangular patterns. Cities are pre-selected to form near-rectangular shapes on the sphere, and players guess which city is most north/south/east/west.

Tech Stack

  • Frontend: TypeScript + Vite + WebGL
  • Performance: C++ with Emscripten (WebAssembly) for critical functions
  • 3D Math: Custom spherical geometry + gl-matrix
  • Rendering: WebGL for 3D globe with texture mapping

Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn

Installation

  1. Install dependencies:
npm install
  1. Start development server:
npm run dev
  1. Open your browser to http://localhost:3000

Building

npm run build

Game Controls

  • Mouse drag: Rotate the globe
  • Mouse wheel: Zoom in/out
  • Submit button: Submit your answer

Project Structure

src/
├── core/           # Core systems (Camera, etc.)
├── geometry/       # Spherical mathematics
├── rendering/      # WebGL rendering pipeline
├── game/          # Game logic and state
├── utils/         # Utility functions
└── wasm/          # WebAssembly modules (future)

Development Plan

This project follows a 14-day implementation plan focusing on computational geometry concepts through practical 3D rendering and spherical mathematics.

License

MIT

About

A 3D geography game where players place 4 cities on a blank globe to form a rectangular pattern. Cities are pre-selected to form near-rectangular shapes on the sphere, and players guess which city is most north/south/east/west.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors