Traveller Store CotI Features New Posts Mark Forums Read Register


Go Back TravellerRPG.com > Citizens of the Imperium > General Traveller Discussions > Software Solutions

Software Solutions Discussions on Traveller related software.

Reply
 
Thread Tools Display Modes
  #1  
Old February 12th, 2016, 10:47 AM
robject's Avatar
robject robject is offline
Marquis
 
Join Date: Mar 2002
Posts: 13,862
Gallery : 9
Visit robject's Blog
robject has disabled reputation
Default 8-bit heaven: Traveller in BASIC

WARNING: OSBOLETE-LY FABULOUS

You've been warned.

This week I created a sequential data file containing the Spinward Marches using BASIC. The file consists of single encoded strings, separated by newlines, with fixed-position data: the mainworld name comes last. Here's a brief form of how the file was created (a Perl script generated the BASIC code, which I then copy-pasted into the VICE emulator running Commodore 64 ROMs).

Code:
100 ns = 463
110 f$ = "0:stars,seq,write"
120 gosub 200 : rem create starchart
130 ns = 18
140 f$ = "0:ships,seq,write"
150 gosub 200 : rem create ship catalog
199 end
200 open 2,8,2, f$
210 for i = 1 to ns
220 read uwp$
230 print# 2, uwp$
240 next
250 close 2
299 return
1000 data GJFA 03 A788899-C NS Regina
... and so on for 462 more worlds ...
The data is, in order: coordinates; P and GG counts; UWP; bases (two characters mandatory, where a space means 'no base'); and world name.

Here, coordinates are compressed, and represent the sector location, offset from a remote (0,0), where Stinj Tianz is (11,11), and hex position within that sector. Sector (16,15 = GxFx) is the Spinward Marches. Hex position is in base-40 (0-9, A-Z, @=37, #=38, $=39). This lets me calculate hex distances without having to deal with borders.

(Yes, I went way overboard with the coordinates. Sue me. If GDW had simply gone with 8x8 subsectors the problem would be more tractable).

Extraction of these strings is purely positional. The only tricky extraction is the world name, which is retrieved via:

Code:
na$ = left$( uwp$, len(uwp$)-22 )
Ship class data, meanwhile, is similarly encoded, using the QSP for starters, but also including some additional metrics.

Code:
2000 data A-BS11-9 111 Trader
2010 data S-AA22-B 202 Scout
... 16 more entries ...
The data here starts with the QSP (e.g. A-BS11), then the TL of the ship (9), then offset metrics for crew comfort, passenger demand, and fighting effectiveness, which is a WAG meant to approximate the ability to fight and take a punch.
__________________
Imperiallines magazine
My Helpful Stuff for Traveller5
IMTU tc+ t5++ 3i(+) au ls+ / OTU 44% an+ dt+ ge- j- jf+ n- pi+ pp+ tr+ tv- uwp+ xb+
Tools Link
Reply With Quote

Welcome!
To see more of this thread, please login or register.
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dumarest -- one of the inspirations for Basic Traveller Boxed Set creativehum The Lone Star 73 April 2nd, 2017 07:56 PM
Basic Scenarios for Traveller? Spinward Scout The Lone Star 24 January 28th, 2014 12:34 AM
Traveller 5 Basic warmaster40k The Lone Star 9 May 28th, 2013 07:32 PM
Classic Traveller Reprint: The Basic Books (1-3) hunter The Bureaucracy 10 August 18th, 2002 04:09 PM

This website and its contents are copyright ©2010- Far Future Enterprises. All rights reserved. Traveller is a registered trademark of Far Future Enterprises .
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (c) 2010-2013, Far Future Enterprises. All Rights Reserved.