Page 1 of 1
Random Geography
Posted: Sat Mar 04, 2006 10:43 am
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?
Posted: Sat Mar 04, 2006 1:00 pm
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
Posted: Sun Mar 05, 2006 3:09 am
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.
Posted: Sun Mar 05, 2006 9:42 am
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!)
Posted: Mon Mar 06, 2006 5:48 am
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!
Posted: Mon Mar 06, 2006 9:41 am
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.