Random Geography

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Random Geography

Post by Odo987 »

When I first met Elite (IBM PC) I was impressed at the small size of the exe. That, and the lack of results when viewing it with a hex editor, let me to assume that the place names, locations and other geographic data were generated by a deterministic pseudorandom system.

It appears that Oolite has the same places and details. Is this done by manually recording the details from Elite, or is the generator algoritm public knowledge?
User avatar
Evil Juice
Dangerous
Dangerous
Posts: 76
Joined: Mon Feb 20, 2006 7:01 pm
Location: Florence, Italy

Post by Evil Juice »

AFAIK the pseudorandom generator is based on a fibonacci series like:

Fib(0) = 1

Fib(1) = 1

Fib(n) = Fib(n-1)+Fib(n-2) se n>1
Target lost
User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Post by Odo987 »

I assume that implies that the source code for one of the Elite versions became public. Since there would be little hope of translating a string of pseudo-random numbers into "Xeebit is famous for its pink earthquakes but plagued by angry umbrellas." Anyone could create a translation, but it would take the NSA to find THE translation.
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

It wouldn't take the NSA even if you only saw the output and had no chance to look at the source - an amateur cryptographer could work it out.

However, in the 8 bit days *ALL* software was effectively open source: Elite was hand-coded assembler, and it was trivial to just load the executable into a disassembler. How the Elite planet generator works is based on well-known mathematics which existed long before Elite (and how to generate the specific planet names, descriptions etc. that Elite generates has been known by anyone interested for over 20 years).

Personally, I never played with the original Elite source code, so I don't know what it's like. However, I often tinkered with games on my Sinclair Spectrum (such as disabling that really annoying coloured entry thing to get into Jet Set Willy, the TV I had wasn't very good so it was quite easy to get the code wrong twice. I dread to think how frustrating it was for the colourblind!)
All I'd do is load the game into a disassembler and find the appropriate piece of code - with small games in hand coded assembler, it's quite easy to follow the code (well, assuming you know asm for your architecture, that is!)
User avatar
Dilbert
Competent
Competent
Posts: 35
Joined: Sun Jan 08, 2006 6:50 am
Location: Wellington, New Zealand

Post by Dilbert »

It may be a legend but I recall hearing that the BBC Elite assembly code contained a message for would-be hackers. Scrolling through it with a hex editor you'd apparently come across a message saying "Does your mother know you do this?"

This sort of thing wasn't uncommon. I remember looking through the Basic loader for another Beeb game called Frak! and spotting a subroutine that could never be called. When I called it, it produced a beautiful rendition of the theme from Captain Pugwash!
Please slow your engines and do not attempt to dodge our lasers, criminal!
Yeah, right!
User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Post by Odo987 »

Dilbert wrote:
"Does your mother know you do this?"
Huh, that's more informative than the comments my co-worker uses to document his code.
Post Reply