. . . and quickly became a "sleeper" best-seller. I came across the book in either late 1961 or late 1962, and was surprised when the tiny bookshop in the town where I then lived had a copy in stock. I said this to the proprietor, and he said "Oh yes. We sell a copy a month pretty regularly and have done for years." The point I'm making is that a reasonably popular mediaeval scenario well predates computer gaming.If you're looking for actual aliens in spaceships, I suspect you'll find occasional examples in Munsey's Magazine and Argosy from about 1890 onwards, and you'll certainly find them after 1926 when Hugo Gernsback started publishing Amazing.
So plentiful examples were there when personal computing developed to the point at which it became profitable to sell games to the public.