0.0
No release in over 3 years
Low commit activity in last 3 years
Implementation of the Acornsoft Elite planet generator algorithm.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.7
 Project Readme

Elite Universe

Generate planets and galaxies following the Acornsoft Elite planet generation algorithm.

Usage

require 'elite_universe/planet'

planet = EliteUniverse::Planet.new(44344, 5276, 5405)
planet.name                      # = Lave
require 'elite_universe/galaxy'

galaxy = EliteUniverse::Galaxy.new(23114, 584, 46931)
galaxy[129].name        # = Zaonce

EliteUniverse::Galaxy is an Enumerable class and so, for example, a full list of planet names in the galaxy can be generated with:

galaxy.map(&:name)

Why

Some years ago I had a need to generate names for devices on a network for which I only had was their MAC addresses. As it happens, a MAC address is made of up 6 octets, which is equivalent to three 2-byte integers.

The number of unique planet names generated by the Elite algorithm is a long way short of the 281,474,976,710,656 possible MAC addresses. I would guess that there are a few thousand unique names, which was more than enough for my purposes and I never encountered a duplicate.

References

Mark Moxon has created a detailed overview of Elite on his software archaeology site at Elite on the 6502. Specifically, details of the galaxy generation can be found here. This would have been immensely useful several years ago when I was trying to hunt down scraps of this information from around the internet!

License

The Elite Universe gem is available to everyone under the terms of the MIT open source license. Take a look at the LICENSE file in the code.

Copyright

The Elite planet generation algorithm is copyright (c) 1984 of David Braben and Ian Bell.

This ruby implementation is copyright (c) 2015 Joe Haig