In gaming (I presume we are discussing gaming) it rather depends on the setting, genre and rules.
So, as mentioned, Star Wars is not science, nor are 40K and the like. It's all just labels on things which work regardless of whether the laws of physics would permit them to or not.
Star Trek inhabits a middle ground. The original ideas behind the functions of its technology are often quite scientific in origin— the warp drive, matter-antimatter power plants, computers, phasers, even the transporters are based on scientific concepts (even if ones we now consider impossible). Consider the deflector dish on the Enterprise. Never once does the show explain what it does… yet, in reality, it is a very significant acknowledgement of a physical reality for high speed interstellar travel, as its function is to "deflect" interstellar particles and matter from the ship's path. If you don't have it, your ship goes "boom" when it strikes even a microscopic bit of dust. The designers of the show knew it was needed, so they put it on the ship! Now does this come up in gaming? Probably never. But a Star Trek type game could indeed include scientific rationales for the rules of space travel and so forth.
And of course there are space combat games which seek to accurately simulate the (probable) realities of fighting in space— vector movement, gravity, heat build up and disposal, vast distances, even between fighting craft, communications "light lag" and so on. In these games science is very much at the forefront, and it is not treated as magic.
Even less specific games can have a strong level of science— the great Traveller comes to mind, where except for psionics and some alien species, the function of nearly everything is based on known technology or scientific concepts. The biggest handwaves are FTL travel and anti-grav tech. But the various devices, weapons, and the ways in which they work, are all derived from real considerations.
So in games like the latter, science (or technology) isn't really magic, even if beyond our capabilities today.