Skip to content

michaelrogers/rusttrader

Repository files navigation

Space Trader - Rust Port

Modern Rust port of the classic Space Trader (Palm OS). Status: Playable core loop.

Quick Start

Prereqs: Rust 1.70+, Python 3.

git clone https://github.com/yourusername/rusttrader.git
cd rusttrader
cd tools && python3 generate_placeholder_assets.py && cd ..
cargo run

Documentation Index

What’s Included

  • 120 procedural systems, dynamic pricing, warp travel, encounters
  • Ship upgrades, repairs, ship shop, short-range chart + galactic chart
  • Save/load, asset system with placeholders

Controls (Highlights)

  • Main: T Trade, W Warp, I Info, U Upgrade, R Repair, H Ships, F Refuel, S Save, Q/ESC Quit
  • Trading: ↑/↓ select, B buy 1, 5 buy 5, S sell 1, A sell all
  • Warp: ↑/↓ select, ENTER/W warp, G galactic chart
  • Galactic chart: F find, ENTER set waypoint, ESC/Q back

Assets

  • Placeholder sprites: tools/generate_placeholder_assets.py
  • Original art extraction: see ASSET_CONVERSION.md

Project Layout

  • src/main.rs (game loop + screens)
  • src/game (trading, travel, encounters, upgrades, repairs, ships)
  • src/types (state + data types)
  • src/ui, src/assets, src/save, tools/, assets/
  • docs/ (canonical roadmap, status, handoff, testing, decisions)
  1. Special Events (8-10 hours)

    • 37 special events from original game
    • Quest system (Marie Celeste, Captain Ahab, etc.)
    • Artifact delivery missions
    • Moon purchase
    • Tribbles!
  2. Special Ships (2-3 hours)

    • Space Monster encounter
    • Dragonfly (stolen prototype)
    • Scarab (alien ship)
    • Bottle Good (retirement reward)
  3. Endgame Content (3-4 hours)

    • High scores system
    • Retirement screen
    • Multiple endings
    • Reputation system (Harmless → Elite)

Phase 5: Polish & Features (Low Priority)

Priority: Low - Quality of life improvements

  1. Audio (4-6 hours)

    • Background music
    • Sound effects (warp, trading, combat)
    • Audio settings
  2. Visual Enhancements (4-6 hours)

    • Animated ship sprites
    • Particle effects
    • Better UI styling
    • System background images
  3. Quality of Life (3-4 hours)

    • Auto-save option
    • Multiple save slots
    • Game statistics tracking
    • Achievements system
  4. Configuration (2-3 hours)

    • Settings screen
    • Difficulty levels
    • Game options (auto-fuel, auto-repair, etc.)
    • Keyboard remapping

Phase 6: Advanced Features (Future)

Priority: Future - Major expansions

  1. Expanded Galaxy (8-10 hours)

    • More systems
    • Wormholes
    • Galactic chart improvements
    • System ownership/factions
  2. Multiplayer (20+ hours)

    • Online trading
    • Shared galaxy
    • PvP encounters
    • Leaderboards
  3. Modding Support (10-15 hours)

    • Custom ships
    • Custom systems
    • Custom quests
    • Asset packs

Implementation Notes

Technical Debt

Current areas that need refactoring:

  • Encounter system - Stubbed, needs full implementation
  • UI code - Main.rs is getting large, should split into modules
  • Error handling - Some unwraps should be proper error handling
  • Tests - No unit tests yet
  • Documentation - Need doc comments for public APIs

Performance

Current performance is excellent:

  • Startup: <200ms with assets
  • Frame rate: 60 FPS stable
  • Memory: ~2-5 MB total usage
  • Asset loading: Async, non-blocking

Compatibility

  • Rust: 1.70+ (2021 edition)
  • Platforms: macOS, Linux, Windows (via macroquad)
  • Graphics: OpenGL 3.3+ or WebGL2

Contributing

Contributions welcome! Areas that need help:

  1. Asset extraction - Converting Palm OS bitmaps
  2. Combat system - Implementing battle mechanics
  3. Quest system - Porting special events
  4. Testing - Writing unit and integration tests
  5. Documentation - API docs and guides

Development

Running Tests

cargo test

Building Release

cargo build --release

Code Style

cargo fmt
cargo clippy

Credits

Original Game:

  • Created by: Pieter Spronck (2000-2002)
  • Additional coding: Sam Anderson, Samuel Goldstein
  • Original artwork: Alexander Lawrence
  • Inspired by: Elite (1984)
  • License: GNU GPL v2+

Rust Port:

  • Development: 2024-2026
  • Engine: macroquad 0.4
  • License: GNU GPL v2+

License

This project is licensed under the GNU General Public License v2.0 or later - see the LICENSE file for details.

This is a port of the original Space Trader game. All original artwork and game design are copyright their respective owners.

Links


License

GPL-2.0-or-later - Same as the original Space Trader

Credits

  • Original Game: Pieter Spronck, Sam Anderson, Samuel Goldstein
  • Original Artwork: Alexander Lawrence
  • Rust Port: Michael Rogers
  • Inspired by: Elite by David Braben and Ian Bell

About

A modern Rust port of the classic Space Trader game originally written for Palm OS by Pieter Spronck.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors