Ah you reffer to nowdays... Well. Both are actually under use already, but there is some problems that limit their use in mass, with railgun, is mostly related to the heat isulating materials, the heat generated by the friction of the parts takes time to cooldown, so atm, they can shoot once a minute (thats is not a acceptable firerate for the military, but i think in less than 5 or 6 years, that will be solved), so for use effects, railguns work perfectly, while lasers, well i guess i will explain later...
1) The principle of operation of a Railgun is relatively simple consisting of a long tunnel enveloped by large and powerful electromagnets within it runs a rail which serves as a guide for the projectile which is typically a relatively small and light metal ammunition, so those objects are thrusted at hipervelocity speed by magnets instead of the conventional explosive chemical thrust power... according to the physics of the expansion of gases the projectile fired by a conventional cannon based on the strength of chemical explosives have a pipe exit speed limited to about 1.5 kilometers per second and a maximum range of 80 kilometers... While a projectile fired by an electromagnetic cannon can have an exit speed of more than three kilometers per second (with the current materials) which translates in a greater reach and mainly in a kinetic power of destruction much greater So they deliver a stupid amount of kinetic power when hit that just pierce stuff (like a laser). Pretty much similar as coilguns and gauss guns for matter of effect (those 2 are a more miniaturized version, but escensse is the same).
1.1) While Laser is just focused IR-Radiation (low specter) with a colorized pointer so we can see it (bcz infra red is invisible to our eyes), they are good as complementary force due many reasons, but i doubt it will ever substitute ballistics weaponry since to work, lasers need a massive source of energy to destroy the target fast enough (and focus so the heat of saturation can surpass the heat absortion to melt it out) + ideal weather conditions (The performance of laser weapon is affected by atmospheric phenomena such as clouds, rain, vapour etc.), and choose the most opaque targets as possible, since mirrored or high reflexive surfaces as it is almost useless because they can easilly reflect on mirrored platings or be absorved by energy and heat isulating materials. I'm not saying lasers are bad, but they have differents task than the conventional ballistics, ballistic weaponry is for the hard duty, it is cheap and reliable, most can work even after ebing hit by EMP, while all laser components would fry... Lasers are for a more precision task, they work much better at distance and over time than ballistics. (Like charging Death Star's Death Ray... That's why tachyon beams rocks).
Now going more to future, as this is sci-fi game.
2) To humans spacetravel, they need energy, lot of it, and what is the best source of energy we have? Our Sun! So how do we can not get some of it, but all of it? A dyson sphere or at least a dyson swarm, that will afford the energy needed to produce all spacecrafts components to travel between our solar system and outher space, to make colonies, terraform planets, and to afford many, many, many computational power that the civilization will need at that point, in order to make new technologies and data transfer between colonies.
2.1) And for build a dyson sphere, you need to disassemble one or more planets and send those parts to space, and the most affortable way to send stuff to orbit on low gravity scenarios, is by shooting them with a railgun, so it is a must have tech in a space building and warfare. Untill we create mass drivers (that is pretty much same than railguns, but works also with gravity generators to minimize contacts between the parts and shoot any kind of matter...) telekinetic powers, or something better... So why would they abandon such basic thing?
2.2) "what about those lasers guns on Star wars/Star trek?" Well they are not laser guns, they mostly use the blasters and phasers, that uses high speed plasma bolts, not IRR laser, but plasma as we know, works more to a weird gas (it is not a gas, but is the closest thing to relate) than a beam... So those can only happen in cinema...
AND SOME GAMES
I guess this could clear why i got confused when you said that, you told me you wanted a more realistic aproach, so reeeeeee
