Author Topic: Mods and gravity  (Read 5976 times)

0 Members and 1 Guest are viewing this topic.

Offline Flaser

  • 210
  • man/fish warsie
Let's make this clear what do we want:

Gravity?
 That's gona be a holy hard job, unless you plan to use only a single great source of gravity at any given time.
In these events you could even have an autopilot that would calculate the speed to maintain orbit around it at the current distance.
Implementing it would add a single vector to any ship in any given radius of the planet or sun.
The problem is that you would have to use a huge space-box, to keep everything inside, or you would have to simulate the speed.
It would give an actually realistic orbiting around any given planet or moon though.
Using huge objects for planets or suns would fit into this model.

Orbital Bombardment?
You'd need to make every ship accelerate toward the ground.
This will be a lot simpler than the first case, since all the objects would have the same acceleration and in the same distance.
You could vary that acceleration in FRED, with events. With careful calcualtion you could even simulate a burn-up in the atmosphere if the player fools around too long.
In this case I would still use a huge background object instead a model. The tricky bit would be slowly enlarging this background, though bear in mind, that for most of the time in a "real" bombardment pilots wouldn't notice anything for quite a while.
Targets could be modified waypoints instead, a pilots would have to hit them to score a kill.
Parts of the texture would have to be changed to show the damage.
This would be  a freefall toward the planet.
With somekind of atmosphere simulation based on the effects used for the nebula you could even simulate a reentry to a limited point.

Low Altitude Flight?
This is could be the hardest.
Making the ground move is a nice idea, but it has its own problems.
Ships should indeed hit the ground, though for collision a minimum speed check should be made.
This is a reason why I think giving a constant acceleration to everything would be viable as well.

Big ships shouldn't be in the atmosphere nor most spaceships.
Fighters to be used there should either have vertical thrust - this is already implemented - or be aerodynamical.
Then another upward vector should be given to them depending on their speed - voila! You reinvented the flight sim...
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
what do we want?  we want our trucks and tanks to stay on the ground.  I think that's the simplest way to answer it.  

We want to have our ground targets move from Point A to Point B during combat without taking flight.  

I don't see having a big ship orbitting a planet in the game as a practical use.  In order to be realistic it would be quite a distance from the planet and we would be having a ton of high poly models for the planets.

i have ground attack capabilities, but all of my targets have to remain stationary to fight me.......otherwise they keep trying to fly away.   This is the problem that we want to correct.
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline Flaser

  • 210
  • man/fish warsie
I think then it's more a matter of creating a new collision model for the tanks and everything else.
These ground objects should always accelerate toward the ground with a fixed speed, that you could set in FRED as planet gravity, so you could simulate a moon.
You would need to use a huge terrain mesh, to make the whole ordeal realistic.
What the new collision model would do is that it would slow down the objects, so instead bouncing back it would absorb a high ammount of the speed, thereby the objects wouldn't bounce back.
You don't need gravity or fancy tractor beams.
You need objects with a new ground/object collision model and a constant acceleration toward the ground.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline Woolie Wool

  • 211
  • Fire main batteries
I'm not terribly enthusiastic about the idea of gravity; it sounds like a real pain and more trouble than it's worth. I want a sky nebula for FS2 because I had some ideas for low-altitude combat (Descent-style with no real gravity), but none of them came to fruition because I had no way to simulate an atmosphere.
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline Woolie Wool

  • 211
  • Fire main batteries
Quote
Originally posted by ShadowWolf_IH
what do we want?  we want our trucks and tanks to stay on the ground.  I think that's the simplest way to answer it.  

We want to have our ground targets move from Point A to Point B during combat without taking flight.  

I don't see having a big ship orbitting a planet in the game as a practical use.  In order to be realistic it would be quite a distance from the planet and we would be having a ton of high poly models for the planets.

i have ground attack capabilities, but all of my targets have to remain stationary to fight me.......otherwise they keep trying to fly away.   This is the problem that we want to correct.


If you must do an orbital bombardment mission, you should just use the "fleet" backgrounds available from one of the HLP hosted sites (I forgot which one). They come in Terran, Vasudan, and Shivan varieties and slap them over a planet. Then have Alpha 1 go on a mission to protect them or whatever while they reduce the planet to cinders and use briefings and debriefings to make it more convincing.
16:46   Quanto   ****, a mosquito somehow managed to bite the side of my palm
16:46   Quanto   it itches like hell
16:46   Woolie   !8ball does Quanto have malaria
16:46   BotenAnna   Woolie: The outlook is good.
16:47   Quanto   D:

"did they use anesthetic when they removed your sense of humor or did you have to weep and struggle like a tiny baby"
--General Battuta

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Woolie, I don't think we're talking about the same thing here; and Flaser, you pretty much just described gravity in your last statement: constant acceleration.

My idea was as follows:

Create 2 new flags so that we don't have to hardcode the terrain models, one flag for a gravity source model, one flag for a ship that is affected by the source.  This is to prevent current fs2 ships from being affected by the gravity source, as then you'd have a lot of things crashing into the planet.

Ships using the affected by grav source flag will accelerate with a constant acceleration rate toward the source, but stop when they come within a certain distance of a polygon on the terrain model.  I was thinking that this radius could be table specified instead of pof specified the way collisions are handled now.  This allows for hovering vehicles.  

With this, tanks should be able to leave the ground for brief moments when using afterburners, but in the end, they'd end up back on the ground.  

This just leaves roll, a tank rolling sideways looks bad to say the least, is there a way to limit the amount a craft can roll in either direction?

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
not orbital bombardment.  Literally escorting dropships to the planet so that they can deposit ground forces.  Destroying enemy ground forces.  Very much an atmospheric mission.  

If we use a source of grav, instead of stopping a certain distance from it, why not have a "no collide no fly through" flag.    Basically it would allow the target object to rest against the source model without taking damage or having the effects of a collision.  Other than that I really like the idea of everything being table controlled instead of POF controlled.
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline Flaser

  • 210
  • man/fish warsie
LtNarol I wasn't speaking of gravity.
A constant acceleration is something entiely different than true gravity.
It would work only if the objects hadn't changed altitude more than a couple of thousand of meters (9km max.) since than the ammount of the acceleration would change as well.
Thank god, we wouldn't have to deal with masses and forces, since the acceleration of an object towards another is only affected by the other object's mass, so in this case it's only the planet's mass that decides how fast things would accelerate.
The hell hard part is that true gravity simulation would have to constantly check the distance and divide the acceleration accordingly.
I don't like the hoveriung idea too much, 'cause it is bypassing the problem and wouldn't result in a truly ground based tank.
By adddin/(replacing) the bouncing collision model with a damping one we could even mnake fighters crash into the ground correctly.
I think fighters too should be affected.
To do an atmosperic mission you would need to fly speacial crafts that are fit to go in the air.
Most FS ships are not - except maybe the Valkyre and the Perseus, but I have my doubts.

So to sum up my "idea":rolleyes::
-New collision model for the ground, this would make the whole distance and hovering problems irrevelant
-Constant FRED assigned acceleration to simulte gravity.
-Special fighters fit for atmosperic flight.
-Special tanks and other ground vechicles.

The later crafts should be the hardest part.
They should be given a new flight model. Basicly they would fly like any other fighter. The difference would be that they would be given a lift.

This is the hardest point in the atmospheric flight model.
Any ariplane uses its wings to create a lift.
So I think a flag should be given to these crafts - has wings - or smg. like that, pluss a factor that would tell the ammount of lift the craft gets compared to its direction of movement and speed.

Here's how I imagine it during "action":
-The plane goes at 80m/s it has wings and a factor of 0.2. With gravity around 10m/s, and  its lift would be 16m/s so it would gain altitude with 6m/s.
-If the fighter does a roll it's lift would still be aplied normal to its course, so it it's in 45 degree bank only 50% of the lift would be aplied to keeping the craft afloat, the rest would actually help it to turn.
So it would loose altitude by 2m/s and it would gain 8m/s of turning speed.

The whole's not that hard to implement.
You give a constant vector to the each and every plane toward the ground.
Plus you give them a vector normal to their currect current direction of flight. So you check their direction of speed, multply that by the factor, and aply the vector normal to the wings.

Tanks wouldn't have wings. They shouldn't have thrusters, so it would make them appear as if they weren't modified ships.
Simply they would always hit the ground, but the new collision model would wimply set their speed normal to the ground zero, instead -1*factor*their original speed.
That would keep them on the ground, but you could even do rally on the terrain, since any speed parallel to the ground wouldn't be affected!
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
I agree on the point that fighters should be affected as well.  But let's not get too far.  Keeping it simple for the first will get get us a lot further than trying to con....er convince the SCP guys to give us a complete newtonian physics work up.  Right now i would be happy if the damned tanks would stay on the ground and still be able to move freely in combat.
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Alright, consider yourselves very VERY lucky that I'm desperate to convince flaser.  These models were intended to be used for Exposition just to round out the experience of atmospheric combat, however, due to uncooperative game features (auto-roll and down-pitch when banking) TankWars on PXO never worked out.

I present to you 2 of 4 ground vehicles originally designed for player use: the Jaguar and Jaguar Mk II

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
How you plan to implement this I can't really understand, but I do ask that you allow for a hover distance (same as a regular distance, only keeping a "hover distance" above the terrain, if you catch my drift).  As for fighters and big ships and the effect radius, I really like the idea of not having an effect radius and just using flags for ships that are affected.  The easiest way to sim atmospheric capability without a whole lotta code is just to ignore the acceleration vector for that ship.

 

Offline StratComm

  • The POFressor
  • 212
  • Cameron Crazy
    • http://www.geocities.com/cek_83/index.html
One MAJOR concern with that; Freespace wasn't designed as a aerospace flight sim and simply won't act right if you try to force true atmospheric flight conditions on to the existing ships.  You might as well write a seperate engine to deal with this by the time you work out the details.  The ground (and its associated collision system) are another point of concern, as you're going to need a huge polycount model to come close to simulating a playable area.  Plus, to keep land vehicles hugging the ground, if you actually have interesting terrain that is, is another complication that a simple downward acceleration/lift model won't handle.
who needs a signature? ;)
It's not much of an excuse for a website, but my stuff can be found here

"Holding the last thread on a page comes with an inherent danger, especially when you are edit-happy with your posts.  For you can easily continue editing in points without ever noticing that someone else could have refuted them." ~Me, on my posting behavior

Last edited by StratComm on 08-23-2027 at 08:34 PM

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Atmospheric conditions may be too much to ask, but thats not what we're talking about when we say we want ground units to hug the ground.  We also have our ways of dealing with high polyness ;)

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
I have to go with LT on this one.  We each solved the high poly problem from two different angles......and each one works well.  so yes, terrain and city scapes are easily done. And by the way, we solved those problems last year.
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline Flaser

  • 210
  • man/fish warsie
So you do want hovertanks? :devil:
That would be harder to code than a normal tank.

What I proposed was the following:
-New collision model
  - I think if someone with good C++/SCP knowledge looked into the issue he wouldn't find my model that hard to implement, since it would be simply a version of the exiting code.
-Adding a vector to each and all crafts in the are = gravity.
-Adding another vector to planes = atmosperic craft.

I think adding a vector is a lot less complicated than cheking the distance.
The problem with the later is that the terrain could be rough, have hills, furthermore you would have to calculate for each and every craft.
With the added vectors, you don't need any sensitive data calculated from a warying none dependable source, in other words IMHO it is easier to implement.

I'm troubled though - creting your hover craft is harder to do without a distance check, let me think about it...
I think the easieast would be adding a vector to them just like to aircraft.
The problematic part is that the hovercraft actually "push themselves off the ground". So there is a distance check - argh! - and that would be hard to implement.
Doing it through a table has its merits, but you'll run into a range of problems with no so plain - and most of all - not so boring terrain.
I have an idea thoug - create the models using an invisible part, that is a box that touches the ground - the collision of that part could simulate howering.
I know it is ugly as hell and would be quite disturbing, but it is what I can come up with during the spur of the moment.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Well if all you need is an invisible polygon, thats easy, what about rolling though?

 

Offline Flaser

  • 210
  • man/fish warsie
I wonder what would happen if you set rotation time to 0 in the ship.tbl...
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Quote
Originally posted by Flaser
I wonder what would happen if you set rotation time to 0 in the ship.tbl...
you mean 999999999999, and yes, it works.  problem is that ships auto-roll and auto-downpitch when they bank

and yes, i still think its better just to have unflagged fighters be unaffected by "gravity", easier to code if you just check one boolean

 

Offline Flaser

  • 210
  • man/fish warsie
For the first version I believe yoy shouldn't deal with both fighters and gravity - therefore I have to agree with the flagstuff.
I meant 0 as zero.
It's definitly an SCP thing, but I believe they would tell you how to limit/disable those on a fighter/tank.
IMHO the key to the project is still a new collision model.
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

  

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Since I'm not fluent in the inner workings of the FS2 engine, I'll let you worry about that.  I do know that using a 0 doesn't work however, and 999999999 (etc, etc) does limit rotation on that one axis.