Gravity not affecting ballistic range properly
Moderator: Moderators
Gravity not affecting ballistic range properly
I noticed the other day that though gravity is modelled correctly in physics terms, the engine doesn't adjust unit range appropriately, which means gravity doesn't have any real effect on gameplay.
On low gravity maps ballistic rounds like plasma should go further - on higher gravity maps they should have a shorter range.
On a low gravity map, a fixed gun like an MRPC will just refuse to fire beyond its normal range (indicated by range ring) even though it can fire further in a low-g environment. On a high gravity map, it will happilly try to fire well beyond its reduced range and just end up making holes in the ground.
Similarly, a mobile unit like a Hammer will get closer to it's target than it needs to on a low gravity map, and on a high gravity map, just doesn't get close enough.
I guess the solution is to calculate weapon range on the fly, instead of relying on a precalculated "range" figure - presumably we want this anyway, so that units on high ground can take advantage of the range advantage they have?
Cheers
Munch
On low gravity maps ballistic rounds like plasma should go further - on higher gravity maps they should have a shorter range.
On a low gravity map, a fixed gun like an MRPC will just refuse to fire beyond its normal range (indicated by range ring) even though it can fire further in a low-g environment. On a high gravity map, it will happilly try to fire well beyond its reduced range and just end up making holes in the ground.
Similarly, a mobile unit like a Hammer will get closer to it's target than it needs to on a low gravity map, and on a high gravity map, just doesn't get close enough.
I guess the solution is to calculate weapon range on the fly, instead of relying on a precalculated "range" figure - presumably we want this anyway, so that units on high ground can take advantage of the range advantage they have?
Cheers
Munch
I agree
Right now gravity has an effeckt of wrekage, and how long a unit is airborn becuase of explosion.
This could lead to divsety in maps, where 1 map for example has low gravity, where a popup cannon can shot as long as a bertha. Or on hig gravty maps, where longrange wepons are useless.
1 problem tho... missiles. how are we gonna calculate gravity on missiles whitout it looking corny?
Right now gravity has an effeckt of wrekage, and how long a unit is airborn becuase of explosion.
This could lead to divsety in maps, where 1 map for example has low gravity, where a popup cannon can shot as long as a bertha. Or on hig gravty maps, where longrange wepons are useless.
1 problem tho... missiles. how are we gonna calculate gravity on missiles whitout it looking corny?
- GrOuNd_ZeRo
- Posts: 1370
- Joined: 30 Apr 2005, 01:10
- [K.B.] Napalm Cobra
- Posts: 1222
- Joined: 16 Aug 2004, 06:15
It has to do with projectile angles. While that would work at minimal effective range difference, it doesn't work much farther in or out. For every angle that a projectile can be fired, it's opposite across a 45 degree line yields a hit in the exact same spot, baring different wind resistances. At the edge of the range circle, the unit already has few firing angles at which to land a shot on or near the target, thus when non-normal gravity comes into play, aiming becomes even more difficult.
Since lower gravity makes the projektile fall slower, it goes father before hitting the ground.
For example: a shot is fired in 45 degrees in earth gravity (maximum weapon range) this reaches 1500 meters. When the same weapon fires in the same angle in a environment with half of earth gravity, the shot reaches maybe 4000 meters.
This since the vertical acceleration/(gravity) slows the vertical speed of the shot much slower than on earth. 9,82 m/s^2 (earth) compared to 4,91 m/s^2.
(I dont remember the exact eqations, but this shuld be somewhat accurate)
For example: a shot is fired in 45 degrees in earth gravity (maximum weapon range) this reaches 1500 meters. When the same weapon fires in the same angle in a environment with half of earth gravity, the shot reaches maybe 4000 meters.
This since the vertical acceleration/(gravity) slows the vertical speed of the shot much slower than on earth. 9,82 m/s^2 (earth) compared to 4,91 m/s^2.
(I dont remember the exact eqations, but this shuld be somewhat accurate)
Someone would have to adjust all the weapons first for this to be feasible since otherwise some would get more or less infinite range.
And it will make it really hard for map makers to adjust gravity since any deviation from the normal will tend to make ballistic units either worthless or a must have.
And it will make it really hard for map makers to adjust gravity since any deviation from the normal will tend to make ballistic units either worthless or a must have.
But as a RTS this is exactly the kind of thing that you want to have mulling over in the player's brains. "Well, let's see this planet has a gravity of .95G so I'm going to go with long range balistics units over missle units."SJ wrote: And it will make it really hard for map makers to adjust gravity since any deviation from the normal will tend to make ballistic units either worthless or a must have.
All mappers would have to do is not adjust gravity by extraordinary ammounts if they don't want the ranges of units to be adversely affected.
Keep in mind I have yet to look at the mapping tool(s) but I assume that there is variable gravity rather than "Low-Normal-High" radio buttons.
Plasma balance
LOL well it's funny you should say that, because a while back when somebody was suggesting we had spherical maps, it did occur to me that LRPCs would probably put their shells in to orbit.SJ wrote:Someone would have to adjust all the weapons first for this to be feasible since otherwise some would get more or less infinite range.
And it will make it really hard for map makers to adjust gravity since any deviation from the normal will tend to make ballistic units either worthless or a must have.
As for having infinite range on reduced gravity maps, that's not true - range decreases linearly with gravity - double the gravity and you get half the range (contrary to the dubious interpretation of Min3mat's excellent rudimentary physics posted earlier).
There are a number of points here:
- 1. Map makers can already change gravity - as you know, the engine already supports it.... it's just that the units aren't aware that they have a different range.
2. You're right it would be feasible to have very high gravity maps which make ballistics infeasible, but then a lot of maps make use of ships infeasible. It just makes for a different game (think of pincushion)
3. You don't have to go for something outlandish, you could make small adjustments
4. It's not as simple as low gravity = longer range = better. Low gravity also gets you flatter trajectory (less ability to shoot over wreckage), longer flight times for HT shots (which means you get lower accuracy and also a mobile target is more likely to have moved).
For this to work, I think we have three options:
- 1. treat plasma rounds as magic bullets, which work on some psuedo gravity of their own (would be a real shame IMHO considering how realistic the physics is in the rest of the game),
2. calculate range on the fly, so that in high gravity you can't attempt to attack a target beyond your max range, in low gravity you aren't prevented from shooting at a unit just because the fixed range calculation is wrong
3. Just allow anybody to try and shoot at anything, and not limit fixed guns from shooting beyond some range. I.e. they behave the same as they do for high gravity right now - they try and hit the target, but fail. Surely that's an easy fix?
Munch
munch you forget that there are units which have a high plasma velocity. A Fido could fire 10x further when range was calculated with equations on the fly... and a bertha for example could fire at least from one edge of a 32x32 to the other...
edit: but I agree units with a lowered range should be stopped from firing when their target is out of the new range.
edit: but I agree units with a lowered range should be stopped from firing when their target is out of the new range.
This puzzled me a lot (enough for me too look it up on wikipedia) and after testing it with some calculations I realized that you are right, (I've forgotten way to much physics in the past year).munch wrote: ...
range decreases linearly with gravity - double the gravity and you get half the range (contrary to the dubious interpretation of Min3mat's excellent rudimentary physics posted earlier).
...
I stand corrected...
- sp2danny72
- Posts: 60
- Joined: 09 Jan 2005, 04:52
There is a couple of things that could be done that will make it
possible to have low-gravity maps without it affecting range too
much: one is to implement air-resistance, another is to have
all range-weapon lose strength as the shot travels, and dissapear
when strength reaches zero. Yet atother possibillity is to
recalculate firing-strengh (velocity) for all weapons on map-load
taking gravity into account, so that the actual range equals the
given. Or that map-maker could just specify a velocity-modifyer.
possible to have low-gravity maps without it affecting range too
much: one is to implement air-resistance, another is to have
all range-weapon lose strength as the shot travels, and dissapear
when strength reaches zero. Yet atother possibillity is to
recalculate firing-strengh (velocity) for all weapons on map-load
taking gravity into account, so that the actual range equals the
given. Or that map-maker could just specify a velocity-modifyer.
:idea: Idea! :idea:
- Make plasma shots affected by gravity.
- Make it so that on high gravity maps, ballistic weapon range is limited by the gravity law.
- Make is so that on low gravity maps, ballistic weapon range is limited by their "range" tag in the weapon tdf so we don't have fido firing intercontinental rounds.
The idea is that ballistic weapon would have two limits, the gravity limit, and the limit defined in the weapon specification, and would be limited to the lowest of the two.
That way, if someone feels like using only gravity-determined range, all he has to do is to modifiy all weapons tdf to put ridiculously high value in each "range" tag. So that's easily available for anyone feeling like making that for his own mod, but OTA units keep their range balanced.
OH NOES!!! THAT'S WHAT OLD TA AND SPRING ALREADY DO!!! SO THIS THREAD IS USELESS!!!
I just tested, by modifying a .smd to give a map a gravity of 7000, even XTA berthas can hardly fire further than their barrel length.
You want ballistic weapon range to be only limited by gravity? Fine, take HPIView and HPIPack, open every file in /weapons/, and everytime you see ballistic=1; change the range to something extreme. You don't need any change to the source code. You don't need any coding skill.
However, it's true that a few minor issues need to be adressed:
- I ordered said bertha to fire a screen away, it accepted the order, turned at an angle of maybe 20° instead of 45°, and fired, the shot fell to the ground a few meters after going out of the muzzle. Instead, the bertha should have refused to fire. Or at least fire at max range, 45°.
- Range circles that are sometimes shown must adapt if the gravity limit is lower than the range tag limit. Possibly with a slightly different color. I hope it won't take too much CPU to draw many real ballistic range deformed by relief, but just show a circle with a radius of ballistic range on flat terrain if it does.
- Units mustn't try to fire at something out of the ballistic range, even if under the range tag.
- Allow ballistic weapons to not have no range tag, and that would mean, range only limited by gravity.
- Make plasma shots affected by gravity.
- Make it so that on high gravity maps, ballistic weapon range is limited by the gravity law.
- Make is so that on low gravity maps, ballistic weapon range is limited by their "range" tag in the weapon tdf so we don't have fido firing intercontinental rounds.
The idea is that ballistic weapon would have two limits, the gravity limit, and the limit defined in the weapon specification, and would be limited to the lowest of the two.
That way, if someone feels like using only gravity-determined range, all he has to do is to modifiy all weapons tdf to put ridiculously high value in each "range" tag. So that's easily available for anyone feeling like making that for his own mod, but OTA units keep their range balanced.
OH NOES!!! THAT'S WHAT OLD TA AND SPRING ALREADY DO!!! SO THIS THREAD IS USELESS!!!
I just tested, by modifying a .smd to give a map a gravity of 7000, even XTA berthas can hardly fire further than their barrel length.
You want ballistic weapon range to be only limited by gravity? Fine, take HPIView and HPIPack, open every file in /weapons/, and everytime you see ballistic=1; change the range to something extreme. You don't need any change to the source code. You don't need any coding skill.
However, it's true that a few minor issues need to be adressed:
- I ordered said bertha to fire a screen away, it accepted the order, turned at an angle of maybe 20° instead of 45°, and fired, the shot fell to the ground a few meters after going out of the muzzle. Instead, the bertha should have refused to fire. Or at least fire at max range, 45°.
- Range circles that are sometimes shown must adapt if the gravity limit is lower than the range tag limit. Possibly with a slightly different color. I hope it won't take too much CPU to draw many real ballistic range deformed by relief, but just show a circle with a radius of ballistic range on flat terrain if it does.
- Units mustn't try to fire at something out of the ballistic range, even if under the range tag.
- Allow ballistic weapons to not have no range tag, and that would mean, range only limited by gravity.
It seems that we have 2 problems. Both of these problems were hidden in OTA, because the game designers went out of their way to hide it. In spring, however, we are probably better off dealing with the problem.
1) Range circles displayed to the user are not realistic. They neither reflect gravity, nor terrain. This needs to be fixed.
2) Range on ballistics is not a derivative of gravity, firing angle, bullet speed, and terrain. Instead, it can be set magically as an independant variable. I think this should be fixed as well.
We will have to fix all the units so that you set bullet speed rather than range, but we will end up with a much more realistic system that is more intuitive and will ultimately make for a more varied and interesting game. Map makers will be able to decide if they want ballistics to be a large factor in the game, and can choose to make maps where toasters can fire across the whole map, or berthas can only fire one screen. Unit scripts will have to be smart, as bomber bombs are now ballistic as well, and the bombers will have to be smart about where they drop their bombs.
1) Range circles displayed to the user are not realistic. They neither reflect gravity, nor terrain. This needs to be fixed.
2) Range on ballistics is not a derivative of gravity, firing angle, bullet speed, and terrain. Instead, it can be set magically as an independant variable. I think this should be fixed as well.
We will have to fix all the units so that you set bullet speed rather than range, but we will end up with a much more realistic system that is more intuitive and will ultimately make for a more varied and interesting game. Map makers will be able to decide if they want ballistics to be a large factor in the game, and can choose to make maps where toasters can fire across the whole map, or berthas can only fire one screen. Unit scripts will have to be smart, as bomber bombs are now ballistic as well, and the bombers will have to be smart about where they drop their bombs.