One might naïvely suppose that this would be an easy distinction, for both books and games. Fantasy has dragons; science fiction has spaceships. But there is a set of ideas, loosely correlated with the SF/fantasy divide, which to my mind make a greater difference to the feel of a story than do trappings like those.