The Hitchhiker's Guide to the Galaxy received a video game adaptation in 1984, published by Infocom.
It's not really a "video game," per se, as it is a(n illustrated) text adventure game.
The game starts with Arthur Dent in his house shortly before the demolition of his house (and by extension, Earth.) After the destruction of Earth, Arthur and Ford hitchhike onto the Vogon ship, where Arthur plays with the Babel Fish vending machine, enjoys two verses of Vogon poetry, and retrieves an Atomic vector plotter
Upon entering the Heart of Gold, Arthur explores the ship, and retrieves a spare Infinite Improbability Drive. He uses the drive to visit six other locations, manipulating past or other events to gain access to other necessary tools.
The game ends upon the Heart of Gold landing on Magrathea.
- Playable version at bbc.co.uk.