physics.cpp

Development directions, tasks, and features being actively implemented or pursued by the development team.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: physics.cpp

Post by safemode »

good flight sims ended about 10 years ago. After that they got too real, and nobody touches them anymore. Think about when flight sims were crazy huge as far as games genres get. Now where are they? they're not even on the radar.

But you're not in bad company either with your opinions. Sid Meirers felt the same way when he started designing his games. What he found (and there is report on his speach at some gaming convention recently) was that players only want real so long as it fascilitates them winning. Realism that leads to them losing is either circumvented if possible, or the reason that they stop playing. You never let realism make the game too dull, too hard, or too tedius for the sake of realism. Unless you dont want anyone to play your game.


Now i'm all for going realistic. But the idea of believing that you have to explain everything that is happening over a thousand years from now in terms of current or even current theoretical technology is completely _unrealistic_.

Now let me get back to my points on heat sinking energy blasts.

There exists current technology utilizing doped carbon nanotubes that when heated rapidly to extreme temperatures (set on fire with super high octane fuel )the combustion heat wave causes a high electrical current. Now, the example exists today, so we scale it to the future where we can weave trillions of these tubes in a material that will get bombarded with lasers such that a decent amount of the heat energy is converted to electrical via conduction along the tube fibers. There's nothing magical about it. Not any more magical really than if you told someone in 1940 that you could scale a building size computer down to a square centimeter chip wires made of silicon measuring only 32nm thick using lasers to cut out the circuits using maybe 2 watts of power to run it. We're a thousand years from now, while we dont want to go overboard with outright magic, we can't ignore how ignorant we are of what is to come .

some deal with kinetics....efficiency and density should all scale to some extent ..... The concept is recognizeable and the scaling is not extreme, so the suspense of belief is minimal.

What's the alternative? You ship gets hit with a laser and you have to deal with a hull breach since it sliced through your armor like butter? What about all the debris flying at your ship at tens of thousands of miles an hour? Why have cockpit windows when the glass is likely going to yield an insanely weak point in the ship? 3000ad you'd think external monitors would be used and the pilot would be safely stashed in a radiation proof fully protected area of the ship (ala the membari ships in B5).

We make concessions everywhere (laser beams aren't visible in space), i just dont know what direction you are aiming towards with armor and shields. Because if you want to be really realistic, what makes you think dogfights would even be possible in 3000ad? The dogfight is a relic from a time that doesn't exist anymore even now, and firepower and targetting and range increases in weapons have made it obsolete already, add 3000 years to that. You've gotta think that you're creating an artificial situation (believable dogfights) in a time period where there really shouldn't be any and trying to remove what makes that dogfighting believably possible. So you want to change the game then ...which begs the question of what kind of game do you envision ...and if it still involves ship to ship combat, how can you justify military level ships not simply mowing everyone else down from 5000km's away drinking tea or sleeping while the computer just moves from target to target and fires a narrow laser that punches holes through pilots faces before they even know what's going on ?
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

You make good points, but if we take your assumptions all the way, what it boils down to is that life in general, and warfare in particular, will be boring and lack excitement 1000 years from now. THAT is the fundamental premise; and then the ensuing conclusion is that games must be unrealistic, therefore, to be fun. I challenge that assumption. I think we humans are ambitious and wicked and curious and magical enough to make our lives exciting in any epoch, past or future. So the general challenge for futurologists is to come up with exciting scenarios as are our birthright, and hopefully do so without cheating about the fundamentals.

The other challenge for futurologists is to figure out which, among many possible scenarios, are more likely.
I'd suggest that moving into space might result in a technological regression of sorts. Materials will become so cheap, after we start mining asteroids, that quality might give way to quantity. Cargo ships might just feature meter thick plates made of leftover asteroid material mixed together and heated to a paste, then roughly formed and attached using wires that pass through two holes on the armor plate, they you twist them...

Lasers will become a battlefield reality in our lifetimes. They've gone from R&D to production, already; and probably the next big war will feature lots of lasers. However, they will be a very short-lived technology, since all you need is a mirror (or a tin-foil hat) to defeat them.

I don't have any particular agenda for VegaStrike; I just wanted to inject questions and shatter preconceptions for the fun of it. My ultimate plans are for a mod called Tadpole that nphillips and I have been working on for a long time. That will be a close to realism space game; and we're not sure whether it will use the VS engine or some other one or feature its own. Just to say I don't care much where VS goes; I'm not trying to impose my taste. If shields are kept, that's fine with me. I just wanted to challenge the status quo a bit because, even at an artistic level, it's kind of apathetic to simply copy what everybody else does. All sci-fi epics, TV, film or game, MUST have shields... I don't buy it; and I think there's a big place for iconoclasts in a creative endeavor.

As for flight sims having disappeared, heck, every game genre comes and goes. It's the nature of the thing. You can't say that flight sims are gone BECAUSE they got realistic. There was a lot of excitement among enthusiasts about the F22 before it came out, and every flight sim out there tried to cater to this enthusiasm with an F-22 title. So, the F-22 came of age, and flight sims went away, just as urban warfare became the hot thing.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: physics.cpp

Post by klauss »

safemode wrote:The dogfight is a relic from a time that doesn't exist anymore even now, and firepower and targetting and range increases in weapons have made it obsolete already, add 3000 years to that.
I don't know about Irak, afghanistan and the recent wars, but I know lots of recounts from another modern war, the Malvinas war which I've heard from relatives of actual pilots, and that's not true.
It only makes it more creative. It was hard for malvinas pilots to get close to destroyers, cruisers, aircraft carriers and the like. But they did, undetected, and when they came into range the british were forced to dogfight.
At that time there were cruise missiles, long range AA, radar guided AA, the works. But argentinian pilots found ways to nullify the technological advances of the british.
I believe that will be true every time. The less advanced will find the way to nullify the more advanced, and in the end, up-close, personal combat will still be required.

So... why not follow the concept?

Have expensive, sophisticated weapons that can destroy targets as far as you like, and tons of ways to disable or nullify them. Missiles and countermeasures. Targetting systems and stealth technology. Everything comes into antagonic pairs.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: physics.cpp

Post by safemode »

The point of my argument was: your reason for picking shields as something too unrealistic as opposed to any multitude of other things that are unrealistic is not valid on the point of being unrealistic alone. There needs to be a reason why X and not Y. I'm just trying to see what the reason is so that there is a direction, and then the direction can be judged as being viable or not.

my underlying assumption about life a thousand years from now other than we wont be correct in whatever we think it will be like, is that warfare in general will be advanced enough to make close combat impossible unless they had no weapons. It's not as simple as guerrilla tactics working against the big guys here, it's "we'll totally destroy entire planets from so far away you wont have a chance to yell before you're dead" type stuff...

Now, one can mold the universe to a situation where dogfighting can occur a thousand years from now, and that's in a type of post-apocalyptic (note how many futuristic movies go this route so that shit is actually interesting ?, it's because it's necessary) . In VS this is not outside of the current canon really. We are coming off of various wars, humanity is spread out and overextended, aliens are enchroaching, another large war is being waged. It would make sense that the vast majority of the galaxy would be poor, backwards dumps making due with junk.

The VS game can be this universe, no crazy weapons, just crappy homemade type stuff. No crazy armor upgrades, if your ship was made with a thick hull then congrats, you got some thick hull, if it was made thin for maneuverability of cheapness, then you stick it out with that. Missiles would be hard to come by. You end up with a type of Firefly-esque universe where the military has all the good shit (though even they are being forced to use ever more outdated stuff as the war progresses) and everyone else is recycling. Military ships would FAR outclass what you got in the civilian world. In this VS, no matter what you had, going up against a military ship would be almost certain suicide, their weapons would be beyond what you can get a hold of, and their ships are advanced over yours in every way. etc. It gives a new dynamic to the game and enforces it to remain realistic, gritty, and all in all, much more interesting as the tech upgrade system doesn't spiral into god-mode.

I would be totally behind that. A gritty, dirty, bordering on economic collapse VS universe starved by wars within and from outside where some future campaign puts the player in a series of events that leads a lone privateer to become the trigger that has the populace rise against the military to end the fighting and allow civilization to heal.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: physics.cpp

Post by klauss »

safemode wrote:The VS game can be this universe, no crazy weapons, just crappy homemade type stuff. No crazy armor upgrades, if your ship was made with a thick hull then congrats, you got some thick hull, if it was made thin for maneuverability of cheapness, then you stick it out with that. Missiles would be hard to come by. You end up with a type of Firefly-esque universe where the military has all the good shit (though even they are being forced to use ever more outdated stuff as the war progresses) and everyone else is recycling. Military ships would FAR outclass what you got in the civilian world. In this VS, no matter what you had, going up against a military ship would be almost certain suicide, their weapons would be beyond what you can get a hold of, and their ships are advanced over yours in every way. etc. It gives a new dynamic to the game and enforces it to remain realistic, gritty, and all in all, much more interesting as the tech upgrade system doesn't spiral into god-mode.
I like that.
I second that.

I'd propose a campaign that lets you feel the taste of military tech, though... perhaps working for the military for a short time.

So you can... you know... fly into aeran space. Alive.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: physics.cpp

Post by safemode »

the military tech would have to have a drawback or every player would find some way to get in the pilot seat of one of the ships and not give it up, or wreak havoc in other ways while in one. Perhaps ammunition requirements such that it can only be restocked at military bases (where you'd be caught) etc etc. I'm not talking about avoiding cheaters, but avoiding the ability over the course of regular gameplay to be able to own a military ship with military weapons ..giving you a massive advantage over too much of the game.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

klauss wrote:
safemode wrote:The VS game can be this universe, no crazy weapons, just crappy homemade type stuff. No crazy armor upgrades, if your ship was made with a thick hull then congrats, you got some thick hull, if it was made thin for maneuverability of cheapness, then you stick it out with that. Missiles would be hard to come by. You end up with a type of Firefly-esque universe where the military has all the good shit (though even they are being forced to use ever more outdated stuff as the war progresses) and everyone else is recycling. Military ships would FAR outclass what you got in the civilian world. In this VS, no matter what you had, going up against a military ship would be almost certain suicide, their weapons would be beyond what you can get a hold of, and their ships are advanced over yours in every way. etc. It gives a new dynamic to the game and enforces it to remain realistic, gritty, and all in all, much more interesting as the tech upgrade system doesn't spiral into god-mode.
I like that.
I second that.
Me too.
And, BTW, and for whatever it's worth now, a few years ago JackS expressed in no uncertain terms that his intent in terms of eventual game balancing would be precisely that --almost word for word--, namely that for a civilian craft going up against a military craft would be almost certainly suicidal.
I'd propose a campaign that lets you feel the taste of military tech, though... perhaps working for the military for a short time.

So you can... you know... fly into aeran space. Alive.
I cast 7 votes for this (not necessarily that it be against the Aera, specifically; but just that there be a military campaign). Part of my reasons are that the code updates needed for such would enable PU to implement a military campaign, too, (into Kilrah), which we've been wanting to do for years.
safemode wrote:the military tech would have to have a drawback or every player would find some way to get in the pilot seat of one of the ships and not give it up, or wreak havoc in other ways while in one. Perhaps ammunition requirements such that it can only be restocked at military bases (where you'd be caught) etc etc. I'm not talking about avoiding cheaters, but avoiding the ability over the course of regular gameplay to be able to own a military ship with military weapons ..giving you a massive advantage over too much of the game.
Absolutely.
You can't drive around in a tank in Montreal and expect an auto-mechanic to change your treads from winter-type to all-season for $30.
And if I may offer an idea from the WC universe, military fighters would typically not feature a jump drive, as they travel aboard carriers.
So the player would simply not be able to fly off a carrier and go home with a military fighter. The same would be true for all ship sizes that travel aboard carriers in VS; only fleet escort sized ships would feature jump drives.
In fact, in PU we've set it in stone that this is the main difference between military and civilian fighters, and the reason military ones are better equipped, is that the jump drive takes up a lot of upgrade space. Which helps us explain why Dralthi 7's in Gemini are so easy to defeat by civilian craft: Unlike Drathi II's and IV's and all that, VII's MUST have a jump drive, since carriers cannot reach Gemini due to asteroid fields along the border systems.
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: physics.cpp

Post by Deus Siddis »

Maneuvering and aiming seem like they don't need to be explained to be believable, given a couple of things--

One is SPEC. It allows you to close the distance to visual range. It also makes most of the action take place near to large objects that can act as cover, like stations, large ships, asteroids fields and planets.

The other is the fact that there are basic physical engineering limitations that prevent you from making a ship that can output its full thrust and firepower potential in any direction, almost instantly. You won't be able to accelerate as fast with your engines spread out equally on every side of your ship as if you concentrated them all on your aft side. You won't be able to put as large of weapons in turrets on every face of your ship, as you could with just one fixed or partially turreted "spinal" gun running the entire length of your ship or longer.

To chase interceptors or punch holes in battleships, you have to make some physical compromises like these, which open up vulnerabilities in close quarters, which in turn leads to combat maneuvers, including perhaps something like dogfighting.


Military vs Civilian-- I'd be careful here for both realism and gameplay.

Whatever advantages the military has they should make some sort of realistic sense given the setting. Giving them really good computer guidance systems or thrusters would be kinda stupid, for example, because these are technologies that should max out within a century from today at most, given the current status and trends of these techs in RL.

IMO, to satisfy both realism and gameplay, the military should really only be very special when it comes to the largest, most high end stuff like giant capships. Their small craft and logistical support type things should be vulnerable enough to weapons available and moderately plentiful to civilians.

That's on trend too methinks.
For example, if you are a foot soldier, your equipment is outdone by the higher end stuff sold to civilians yet there is no civilian equivalent to a cutting edge fighter aircraft, nuclear powered missile cruiser, though civilians could potentially defeat the former with small arms or the later with bulk explosives. Then on the greatest extreme, there's the ICBM, that would decide any real war, and there is no real civilian equivalent to it at all.
Errol_Summerlin
Merchant
Merchant
Posts: 46
Joined: Thu Mar 11, 2010 4:10 am

Re: physics.cpp

Post by Errol_Summerlin »

chuck_starchaser wrote:Totally agreed about shields; I hate them with a passion.
And "tractor beams".
Needless to say I hate "artificial gravity" and "inertial compensation".
Just crap we have to live with because ... Hmm... I can't remember why, now...

Anyways, the problem with your numerical approach is implementational: Given a Wavefront .obj file for a mesh, say, and a point you want to test, how do you determine if it's inside or outside the mesh? This NOT trivial. Specially when you consider that OUR meshes are are the furthest thing from closed manifolds. You find more than two polygons sharing an edge, sometimes, floating edges without a polygon, triangles attached to a mesh by a single vertex, a V-shaped extrusion half-buried in the surface of another mesh, polygons sharing all 3 or 4 sides, but with opposite normals, and horrors my mind doesn't even want to relive.
I think a less accurate but far easier approach would be to run through the list of vertices and consider them point-masses. The .obj format has all vertices in one place, so they are easy to parse.
are the vertices spread throughout the ship? or do they just define the surface? I am not a 3D graphics guy, so I am not familiar with how these meshes work. But yes, defining the ship's dimensions is the trick to the whole calculation. If the vertices are spread throughout the volume, then that seems a lot simpler than the Monte-Carlo techniques and with a sufficiently large number of vertices, the results should be close enough that nobody will notice. If somebody writes the code to retrieve the vertices, I can write the part that actually computes the parts of the momentum vector...but that part could also just be copied off of wiki-pedia, so all i would do is make sure that it was done right on wiki-pedia.
Errol_Summerlin
Merchant
Merchant
Posts: 46
Joined: Thu Mar 11, 2010 4:10 am

Re: physics.cpp

Post by Errol_Summerlin »

wow, I didn't mean to start a whole conversation on the subject of shields, but now that it has started, I will thrown in my two cents.

I don't like the concept of a regenerating outer shield even for purposes of game play. Realism is, of course, another objection, but the regenerating outer shield leads to problems of its own. Among those are the following: A powerful ship has NO reason not to gun down helpless weaker ships because they won't crack his shields and he will suffer no real damage. This is especially important for MMORPGS. If the shields are powered by energy. Energy output becomes more important than actual physical armor. People end up trading armor mass for more power generation and hence, more shields. What do shields absorb? How do they work? It just leaves a lot of questions unaswered.

I would propose instead a 2 tiered system, but with the outer system ARMOR. Literally, just sheets of metal with no electric components in them. The internal tier would be the actual electrical components of the ship. Taking damage here can randomly damage ship systems and possibly even rupture the containment unit for whatever power source you are using (I think this should be an option for players...potentially separating military ships (powered by anti-matter), from civilian ships (powered by fusion or fission)). I haven't worked out all the details yet, but I would think that some weapons might be particularly good at penetrating..an example of this might be a proton cannon that fires magnetically accelerated protons at the opponent. The protons would travel at nearly the speed of light and penetrate armor better than, for example, .45 caliber round. However, they would cause almost no damage to the armor itself (aside from possibly heating it up a bit as they deposit some fraction of their energy in the armor) and would not cause terribly much damage once they do penetrate the armor because of their small mass and the fact that penetrating the armor typically allows the projectile to penetrate the ship and go right back out the other side all without compromising the structural integrity of the ship...essentially by quantum mechanical tunneling. In other words, firing a weapon with too much energy might actually be ineffective because it just goes through everything without interacting at all. The ideal scenario is to push through the armor, but lose enough energy in the armor that you cannot penetrate the internal ship structure and deposit your energy/damage there.

However, a plasma cannon that fires a ball of superheated plasma that is self-contained by a frozen-in magnetic field configuration would not penetrate armor well at all (most of its energy being in random motion (temperature) rather than in ram pressure) but would instead melt it causing actual damage to the armor. Armor gutting rounds might be gattling gun bullets that are designed to penetrate some distance into the armor before exploding blowing off outer layers of armor weakening that side against subsequent shots. Lasers could be armor penetrating at close range (when the beam is very concentrated in a small cross-sectional area) and armor damaging at long range. When the laser will heat up the armor and melt it.

There are many options with regards to how this could work and I haven't worked through them all. I would say however, that the regenerating part of the ship, would be the internal part of the ship that can repaired during flight (SLOWLY). However, as you take more and more internal damage, the repairs become more patchwork, and you overall internal structure gets weaker...say you lose 50% of internal structure, but you repair it yourself in flight. Maybe now, everything works, but you have burned some of your internal redundancy, so the over all amount of damage your internal structures can take goes down by maybe 5%. In other words, lets say you have 100 "hit points" of internal structure and you take 50 points of internal damage. This also means that your internal systems are at 50%. So, you repair your systems, but in doing so, you have to cobble together spare parts or redundancies from other parts of your ship. Thus, when you get your ship back up to 100% of internal systems working, you now have only 95 "hit points" of internal structure. If internal systems gets to 0%, the ship's last redundancy for the containment unit has failed and the ship's power core overloads unless it is ejected soon enough that the blast doesn't completely disintegrate the ship. If it is ejected, of course, the player is dead in space, but he may be able to salvage his hull if he gets towed back to port by a friendly. Towing ships by actual physical cable instead of magic tractor beam will be very fun :). Killing a pilot or competely destroying a hull such that it can only be salvaged as raw materials should require a bit more effort on the part of an attacker. Generally, it is much easier to disable a space ship than to completely destroy it. This is primarily because of the ineffectiveness of explosives in space. On earth, explosives throw high velocity chuncks of earth and powerful sonic (air) shock waves which tear apart man-made structures. In space, many terrestrial explosives don't work, and those that do just emit high energy gamma rays which while possibly irradiating and killing an unshielded pilot, will not really do much to the ship structure unless the blast actually happens inside the ship and blows different parts of the ship in different directions. They will push the ship around a bit, but won't actually tear it apart like our sadistic victor wants it to.

I guess in retrospect, what I have described is actual 4 different damage systems. Armor (which, if > 0 provides some protection to all other damage systems), internal ship systems, internal ship structure, and the pilot.

Different weapons could be designed to damage different structures which would all act to cripple the opponent in some way. Even just heating up an opponents armor with a long range laser would have some effect as it limits his ability to generate heat himself (because he can only vent heat so fast).

I guess what I am saying it that the mechanics of space ships are so complicated and nuanced that you really don't need shields as an additional way to damage a ship.

If armor does not repair in flight and you have to spend money fixing it. Players will be more loathe to get in fights when their is little or no profit in it because it will beat up their ship's armor a bit which they can't fix until they get back to port and can slap on another layer of titanium. This armor, of course, adds mass, and players will need to strike the right balance between armor and mobility.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

Good post; and the last bit ties up to the previous post, and tensor of inertia computations.
Vertices are NOT spread through the volume of a model. Models are like empty skins (or they *should* be, for best graphics performance, though often vegastrike's models are full of criss-crossing, internal geometry, invisible from the outside --which wastes texture space, as well as cause unnecessary overdraw). So, vertices are (mostly) on the outer surface of models.
And they are NOT evenly distributed on that outer surface, either. Sometimes there are clusters with tons of vertices, and sections where the polygons stretch between areas A and B with no vertices in between.

However, assigning mass to each vertex is a cheap and dirty hack that should work. First of all, probably a lot of the mass in a ship's structure is in fact near the surface, with internal structure being optimized for lightness, whereas the surface needs to be continuous, AND sports the added mass of armor. Secondly, where vertices are more concentrated in models, that's usually around such features as engines or weapon mounts, which typically see increased mass from non-structural subsystems. So our results should be infinitely better than having a manually entered, magical figure for "moment of inertia" in units.csv; and quite noticeable and believable. But we should also compute ship's torque/thrust ratios on the basis of engine placements... i.e.: if a ship is very wide but has engines wide apart, maybe its yaw won't be that bad.

In an obj file, vertices are easy to parse. Here's an example of obj file from the top:

Code: Select all

mtllib tarsus.mtl
usemtl tex0_0
v -0.103776 0.113484 0.703737
vn 0.369050 0.846149 0.384493
v -0.107437 0.116006 0.701882
vn 0.488666 0.681902 0.544256
v -0.109883 0.120517 0.700078
vn 0.619995 0.335889 0.709073
v -0.110742 0.126335 0.699219
vn 0.679642 0.077018 0.729489
v -0.109883 0.132362 0.698836
vn 0.667344 -0.269266 0.694369
v -0.107437 0.137475 0.700286
.......................
v is the vertex coords, and vn is the normal, which you'd ignore.
And we have obj parsing code; probably under /objconv/mesher.
Engine placement data can be read from units.csv, which needs to know their locations to show the exhaust plumes.
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Re: physics.cpp

Post by charlieg »

Would cargo account for a lot of mass? Or internal components (engines etc)?
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

Right now the game simulates cargo in terms of mass (not sure in terms of moment of inertia). The mass of cargo is probably calculated from a specific weight coming from units.csv or some other table, and the cargo volume.
As far as other ship internals, good question. I think Errol would be best qualified to brainstorm the relative mass of various subsystems. I can't imagine how fuel wouldn't be a major mass contributor. Not sure if we need iron for magnetics, or copper for wiring; maybe we can assume superconducting and super-permeable "plastics" may have been discovered by then? Pyrolitic graphite is almost there.
Liquid hydrogen could flow through plastic tubing. Yeah, a lot of the ship could be plastics.
One problem with plastics, however, is they come from oil; which will be gone in less than 100 years, and probably won't be found in any other planets (not in the solar system, anyways), whereas metals will be super-cheap in the age of asteroid mining. So, perhaps the fast ships are the light ones, which cost an arm and a leg.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: physics.cpp

Post by safemode »

oil can easily be thought of as renewable as wood or any other crop in the near future though, with genetic engineering we already have algae that produce petroleum that is refined into all types of petroleum based fuel (military has already tested it ), it's just a matter of efficiency and output right now.

though, there are serious issues with plastic that are valid for them not being used in space. Their molecular bonds break in UV radiation. They become highly brittle in cold. They have low melting points. etc.
i dont see them being used for that reason, not for lack of ability to produce it.

I dont know if we should care about the physical makeup of things we're just going to guess as to the makup of anyway. Just throw a number that seems believable and use it. There's no need to try and be exact by using the mass of copper over some other element or iron instead of some compound of iron-nitrogen (which has recently been proven the strongest magnet in existence). Just seems to be getting extremely pedantic about things that are shot in the dark guesses themselves ...which sounds pointless.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

Touche about plastics.

On being pedantic:

There's good reasons to be pedantic in projects where there's many people involved.
I'll give you a good example I think I've mentioned before, but maybe you missed:
When WCU used to be an active project, Spiritplumber had a very democratic approach to development. She welcomed contributions almost no matter what they were. So, we'd get contributor A who thought the ship sizes were out of whack and went to work on fixing them. Six months later, contributor B thought the ship scales were out of whack and worked on them again. Six months later contributor C... And so on. Why? Because none of them bothered to write down WHY he thought this or that ship was too big or small, so the next contributor consider the previous contributor's work to have been based on personal taste, and therefore irrelevant (or distasteful). So, in PU I set out not to repeat that mistake, and I started a forum thread, instead, for discussion of ship sizes. During the discussions, we had an evolving spreadsheet of WC ships, with their official sizes according to various official sources, as well as calculations of size based on comparisons to humans seen near them in some screens, as well as sizes calculated from measurements taken from within the original games; and then the discussions were about why would one source or measurement should be given more weight than some other. And we finally settled on a size for every ship, and then entered it at once.
If any future contributors say they want to change the size of a ship, we can go back to that thread, to where that ship was discussed, and see if the new contributor has something new to contribute to that discussion that warrants re-opening it.
No more chaos.
We've started a new forum thread and spreadsheet, recently, for weapons, armor and ship balancing.
No more chaos.

If I, or Errol, or whoever, were to just pick a number and put it there, without justifying it, as you suggest, it would be guaranteed to be changed by someone else in the future, who would assume that the magical number was one that suited someone-else's taste.
There should be NO magical numbers anywhere. Not in code. Nor in data. If there's good reasons for 42, it should be documented. If it's just a matter of taste, it should be documented also, so that people don't have to spend days analyzing things to make sure the number CAN be changed, or wondering what the consequences will be.

If you're not "pedantic" in the sense of justifying your choices, then you can expect people in the future will disrespect your choices.

I don't mind having my choices reconsidered by others; but I do mind having my choices disrespected, so I try to document and justify.
This may be "just a game", but as a developer yourself, you know very well how serious it can be, in terms of size and complexity.
Just writing numbers down without leaving any record for their justification is an invitation to chaos, IMO. Even if the justification is based on shot in the dark guesses, there should be a record of which way we shot in the dark, so that future modders know how those numbers were arrived at. If we don't respect them, they won't respect us.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: physics.cpp

Post by safemode »

the thing i was getting at about being pedantic though was that the justification is so specific that it becomes very easy to argue and becomes rather arbitrary. In the end these masses for subsystems are all going to be magic numbers, similar to the mass of the ships. So if the justification is say, at best an educated guess, why attempt to be exact at all and open the whole thing up to refactoring or argument ? Make the justification specific enough to cover the number, but not enough to argue the validity of why you chose the number.

generator subsystem could have a mass of N tons, because of the core shielding and coolant and integrated transformers. No need to get into detail that the conducting wire is copper vs some compound of iron. Try and argue why it's not N tons based on the explanation.

some things need to be specific to the material, some things rely on other numbers we give things so they have to add up ...some things need to relate to other things so they have to agree. But certain things at the bottom of the list just have to have a value and the best explanation for why is one that sounds right enough without making itself dependent on other things that we then have to adhere to - like the masses of more components and more components.

it's not about making something an obvious magic number vs a justified magic number, since we know they're both magic numbers, we should try and keep the magic numbers simple and by doing that we remove the ability for people to come in and argue their value. So long as everything based off them is in agreement and their values are sane, nobody will be able to justify logically why they should be changed.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

Hahaha, we agree about the goals; --not having too much argument; but we disagree diametrically how
to achieve them. To me, justifying in writing means that someone is going to have to challenge what's
written there in a public manner, as the document exposes the decision making process. That's work, and
most people are lazy. A rationale protects the data, at least morally, against undiscussed changes; and a
little bit more than morally: it records the numbers arrived to, so that if they are changed in error some
day, there's a document saying what the original values were, when, and who to talk to.

What I think you think is the solution, to me, it akin to "security through obscurity": Play our cards close
and don't let people know, and hopefully they'll be too mystified to even think of changing anything.
I think this security through obscurity risks a karmic kick-back: People may privately and just as obscurely
change the numbers without discussing it at all.

But personally, I just like keeping records of what's done and WHY, because my memory is not very good,
and a year from now someone might ask me why I did this or that and I won't be able to tell them.
And because I like things being discussed. I just learned a lot from you, about plastics, and about iron-
-nitrogen. If I had just picked a number I wouldn't have ;-)

EDIT:
And by the way, I haven't done this yet, but I intend to eventually put the ship sizes discussion AND that
spreadsheet right in the /units folder in PU svn; and I think vegastrike should start doing the same: Put
documents explaining the rationale for things in SVN, together with the data tables. Documents can be
as simple as just having a link to a forum post or thread, or wiki article where a subject is discussed.
And I say once more: It doesn't matter that it's just wild guesses and whatnot; what matters is to be
able to remember, months or years from now, why the numbers were set as they were.
Neskiairti
Confed Special Operative
Confed Special Operative
Posts: 334
Joined: Thu Jan 11, 2007 4:10 am

Re: physics.cpp

Post by Neskiairti »

chuck_starchaser wrote: And if you know how to get rid of the screen reddening when you're shot at, that would be good too.
Maybe we can put some cockpit shaking, instead of changing the color.
Later we can use hardware fog to simulate smoke in the cockpit.
But the screen going red makes no sense.
I was discussing this very concept with my partner the other day.
Shaking doesnt make much sense either, if there is a pressure wave in space, it would hit you, and your ship would buckle slightly and drift off at a new vector.. What this might appear like, is a very slight ripple through the ship, we had the idea of taking advantage of a special effect were going to be using. Essentially, think battlestar galactica's jump engine, where it lenses space then pops back to normal. Could do something the same but eminating from the impact location on the ship, and ripple through the cockpit. perhaps ripple back once or twice as well before settling.

less disruptive to the player, and make a little more sense. I played a game a while back, and worked on its engine, where the screen shook every time you were hit. ended up that in a heavy battle you could hardly see anything due to the shaking.

As to shields, I agree with you chuck, do away with them :P but just leave the code in so mods can use them if need be.

Generic all encompassing shields have always struck me as a silly concept, if the shield is transparent, it sure isnt going to stop a laser. If it has no mass or innertia or some thing of that ken its not going to stop a projectile.

I have always liked the idea of specific defenses. For instance flak defenses on a space ship that take out incoming missiles drones and fighters.
another idea is extremely powerful EM Fields, potent enough to capture or change the vector of a particle stream weapon.
Another is reflective or ablative armor that reduces the energy of a laser or plasma weapon.

anyway, point being, tailor your defenses, its just another semi-dynamic game component to make it more interesting. Have a weapon type, have a defense tailored to that weapon type. Some defenses can even work together to defend your ship against multiple types of attack.. :P complicated rock paper scissors.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

Yeah, cockpit effects would be the best, but as Klauss mentioned in a later post, we got no cockpits; --and the ones in PU are 2D, which are harder to "shake". But to have 3D cockpits we need off-screen render-to-texture, for the displays, which currently the engine doesn't support, --and it must be difficult, judging by the number of times I've asked for 3D cockpits and never got them :)
Ironically, 3D bases don't depend so much on render to texture, but I guess they will take a lot of infrastructure to accommodate them.
Another solution for alerting the player when getting attacked while playing with no sound would be warning lights.
Frankly, it doesn't make any sense whatsoever that the ship's computer wouldn't start warning you well in advance of a hostile approaching you. There should be like 4 lights that flash yellow when there's a hostile less than a light second from you. They would turn orange if the hostile is in an approach vector; then flash red when you're getting attacked, or are within weapons range. Targeting doesn't make any sense either, where you have to press H multiple times and scroll through hostiles at the opposite end of the star system, until you finally find the bogey right behind you.
Heck; what are computers for, in the year 3000? Playing Tetris?
The nearest approaching hostile should be selected AND locked automatically. Furthermore, there should be more than one radar/sensor screen display mode, and the thing should automatically switch to combat mode, on hostile approach. So should the HUD have a combat mode, different from nav mode, different from docking mode; and should switch automatically too.
With flashing lights, and changing MFD and HUD display styles, there'd be no room for doubt when you're in trouble; and makes a ton more sense than that you wouldn't know of approaching danger untill you're being shot at, and then the screen turning red to make it even more difficult to do what you need to do.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: physics.cpp

Post by klauss »

@chuck: the problem with all those "computer" features you mention isn't the computer itself... it's the sensing technology that is required.

Sensors have to be pretty sophisticated, and computer algorithms even more, to detect a ship at 1 light minute, identify it as hostile, and track it, detect that it's aiming towards, etc, etc...

I'm not saying it isn't possible. Right now, ISAR radars are able to derive an x-ray-like view of a target 200 miles away... it almost looks like a super-telescopic photograph. With a little more computer power, it could probably even render a truecolor approximation. In fact, it would probably be able to gauge structural integrity, and locate critical systems (since the ISAR radar penetrates into the internal structure).

But extending that ability to light seconds away, then light minutes away, and in the harsh radiation-filled environment of space... it's not an easy feat.

It wouldn't take much to convince me those features are left for state-of-the-art equipment.


And... re. render to texture, the problem isn't implementing it alone, it's making it work on all hardware and drivers. Render to texture tends to expose lots of driver bugs and inconsistencies. I've seen other engines struggle with that - GMA drivers, for instance, segfault when you try to use FBOs in some ways. It's properly handling those quirks that makes render to texture a hard to support feature.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

I don't buy the sensor argument. Light minutes away; even light seconds away, yes; but I'm talking about your computer should start screaming at you long before a bogey comes anywhere near weapons range; and that's a few kilometers.
And I don't buy the GMA argument. People who don't know or don't care what hardware they buy shouldn't cause thousands of people to have to wait for years to enjoy a feature they bought hardware for. What you're saying is basically that NOBODY should be able to enjoy 3D cockpits because some cheap or stupid morons buy boards with GMA's. That's preposterous! A tyranny of the ignorant?
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: physics.cpp

Post by klauss »

Yep... like 400km away, you should already see a lot of info about your target. Perhaps even know what the pilot had for supper.
chuck_starchaser wrote:And I don't buy the GMA argument.
I had the GMA example fresh in my memory... it's not the only one.

It's a cool feature, once we get the most important features rolling and I get some free time to play with the graphics engine, we could open a branch for RTT support. But it will have to remain branched until we thoroughly test it, and that will be messy... I'd rather port to Ogre.
chuck_starchaser wrote:What you're saying is basically that NOBODY should be able to enjoy 3D cockpits because some cheap or stupid morons buy boards with GMA's. That's preposterous! A tyranny of the ignorant?
3D cockpits are a feature and they work. You just don't have neat VDUs embedded in the 3D cockpit, but that doesn't mean you can't use them. In fact, there's a ship class in VS already that uses a 3D cockpit with overlaid VDUs and it works rather well (may not look as cool as it would with embedded VDUs, but it's functional enough).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Errol_Summerlin
Merchant
Merchant
Posts: 46
Joined: Thu Mar 11, 2010 4:10 am

Re: physics.cpp

Post by Errol_Summerlin »

I am writing a big long post about the weight of fuel in futuristic spacecraft. This is based on energy/momentum conservation equations and the known theoretical limits of various power generation mechanisms. I have actually been working on this for some time as I have been designing a game like this for years (I am amazed I found an open-source engine that i can use to implement my design). But, I will just say for now that internal ship components, IMO, clearly need to adhere to their theoretical limits. Furthermore, current technological capabilities can be taken as a baseline value.

For example, the best nuclear reactors weigh about 1 kilogram for every 2.2kW of power they produce. That doesn't include the fuel. Conversion of this heat energy into useful energy goes at about 25% efficiency on space craft (40 to 45%) on terrestrial turbine-driven reactors.

That being said, what we decide to do in between the theoretical limits and the baselines is largely discretionary, but we have some very good guidelines. Wiki-pedia alone gives you a bunch. For example, the fission fragment reactor design increases efficiency to up to 90% meaning that you get twice as much energy as before AND you generate 1/5th the waste heat. (Possibly less, the definition of efficiency is ambiguous. Since it takes energy in order to funnel the ion beam where it needs to go, this could be 10% of the energy produced meaning that 0% is waste heat or the energy produced could already have the energy that it uses factored in and then efficiency is the fraction of the net produced energy that is converted into useful energy). Reactors need to be large to deal with all this excess heat. reduce the excess heat by a factor of 5 and you can probably reduce the size of your reactor by around the same factor. Essentially, this gives you an order of magnitude over current technology using a well documented theoretical reactor design. So now we are at 22kW/kg. We haven't even stretched the imagination yet. If we use aneutronic fusion or fission events (where all the resulting particles of the reaction are charged), it is very easy to imagine constructing magnetic fields that will take the ions where you want them to go using them for thrust without heating up your ship at all. All the energy released in the event is carried in these particles which are whisked out the rear. There are, of course, other sources for advanced technology ideas.

http://www.nasa.gov/exploration/home/an ... eship.html

This one is actually pretty simple once you solve the generation and containment problems for anti-matter (I discussed these in another post). positron-electron annihalation photons are not too energetic and can be absorbed by any number of materials (liquid H2 is the example given in the article). There is sadly, a good bit of heat wasted with this design though because once you heat the H2, it immediately begins transferring heat to the rest of the ship until it is expelled. With proper insulation though, you can get reasonably good efficiencies.

Anyway, I am just saying that IMO, the ideal technological level for this game is right at the leading edge of our design capabilities even if it is currently beyond our production capabilities. This should provide the right balance of being able to zip around in space while also keeping the technology at a level where people say...yeah..I can see that happening... believability I guess is the right word.
Neskiairti
Confed Special Operative
Confed Special Operative
Posts: 334
Joined: Thu Jan 11, 2007 4:10 am

Re: physics.cpp

Post by Neskiairti »

shields, spec, impossible acceleration, inertial dampeners...
these are not at the leading edge of our tech :P these are purely fantastic.

personally I think the trick is, make the baseline, perfectly reasonable technological advance. Nothing fantasy, nothing amazing. Then add to it with modular plugins. Add shield mechanics, add inertial dampeners. or don't add anything, just choose what you want for your mod.

the thing is, doing it this way allows you to have a bit of realism with your fantasy and keeps it from breaking as easily. Everything is organized and can be pulled out at a whim, only the base physics need to be solid.

Beyond the coding side of it though, story and environment need to feel natural, like things belong. Being based in reality it is easier to weave a concept through that than write it with all the fantastic technology in the first place... you don't need solutions to problems that don't exist yet :p no one here even knows what the 'game is not fun' problems will be until they try it.

I am sure armor will be important, and maybe even regenerating armor.. or maybe it will be good enough to run off to a base and get your ship repaired every time you get in to a fight. that does work as a game mechanic, trust me, I played a game with that mechanic for nearly a decade (Diaspora and diaspora clones).
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: physics.cpp

Post by chuck_starchaser »

@Klauss: Gottcha.

@Errol: Good direction; keep it up.

@Neskiairti & all: Let us not forget for a second about the difference between engine and game. We are talking about "vegastrike the game", which is a misnomer: the name of the game is UTCS ("Upon The Coldest Sea"). Vegastrike (the engine) needs to support realistic AND fantasy paradigms, as mods such as VT and PU need to adhere to the fantasy aspects of their respective universes and canons.
I'm saying this because this is the Developers forum, which, like the Modders forum, is an engine forum, --as opposed to, say, Features Request, which is UTCS-specific.
But yes: To have proper physical constraints and paradigms, engine work is needed; just saying that there need to be options, rather than hard-coding of such constraints, and this needs to be kept in mind during design. (Not that some features can't be hard-coded and just adapted to work with other mods, like RK4, for instance.)
Post Reply