Thorfinn the Shallow Minded Posted August 29, 2020 Report Share Posted August 29, 2020 I'd just like to make a humble suggestion that arrows and javelins should arc more when launched. I won't make any claim regarding the angle archers historically used, but in general, I prefer that aesthetic since the projectiles are easier to see, and they do not clip through as many buildings and units, breaking the visual immersion. 2 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 29, 2020 Report Share Posted August 29, 2020 (edited) @Thorfinn the Shallow Minded I agree completely. The projectiles are very hard to see. @Stan` @Freagarach @Angen Is <Gravity>9.81</Gravity> where the visual "arc" of the projectile comes from? I know there's a relationship with the arc and projectile speed as well. Edited August 29, 2020 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 30, 2020 Report Share Posted August 30, 2020 I believe Lordgood changed it to modify arrows in A24 1 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 30, 2020 Report Share Posted August 30, 2020 1 hour ago, Stan` said: I believe Lordgood changed it to modify arrows in A24 Please restate with different words. Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 30, 2020 Report Share Posted August 30, 2020 I think Lordgood modified gravity to change arrow trajectories in A24 Quote Link to comment Share on other sites More sharing options...
Thorfinn the Shallow Minded Posted August 30, 2020 Author Report Share Posted August 30, 2020 The other approach would be altering the arrow's initial velocity. At maximum range, when not accounting for differences in elevation with the target, archers should always use a 45 degree angle. This angle can change as the target gets closer. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 30, 2020 Report Share Posted August 30, 2020 Just now, Thorfinn the Shallow Minded said: The other approach would be altering the arrow's initial velocity. At maximum range, when not accounting for differences in elevation with the target, archers should always use a 45 degree angle. This angle can change as the target gets closer. DE reduces projectile speed considerably over the base game's projectile speed. Maybe check that out and see if it looks better to you. Quote Link to comment Share on other sites More sharing options...
Thorfinn the Shallow Minded Posted August 30, 2020 Author Report Share Posted August 30, 2020 4 hours ago, wowgetoffyourcellphone said: DE reduces projectile speed considerably over the base game's projectile speed. Maybe check that out and see if it looks better to you. I checked out some footage; definitely it's more on the visible side of things. Could you give a numerical comparison of what percentage of a difference in speed Delenda Est has? Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 30, 2020 Report Share Posted August 30, 2020 12 minutes ago, Thorfinn the Shallow Minded said: I checked out some footage; definitely it's more on the visible side of things. Could you give a numerical comparison of what percentage of a difference in speed Delenda Est has? EA's archer arrow speed is 75.0, in DE the archer arrow speed is 50.0. Quote Link to comment Share on other sites More sharing options...
ChronA Posted August 31, 2020 Report Share Posted August 31, 2020 The use of 9.81 for <gravity> in vanilla Zero AD is inappropriate because the in-game unit-models are depicted at about a 2:1 scale. (I.e. human units are drawn as being approximately 4 meters tall in-game!) Therefore, a gravitational acceleration of 9.81 m/s^2 at 2:1 scale works out as only 4.905 m/s^s relative to the human characters on screen. A more appropriate quantity would be 19.62, but since the scaling factor is just a very imprecise approximation anyway (personally) I would just put it at a nice round 20.0. Quote Link to comment Share on other sites More sharing options...
Trinketos Posted August 31, 2020 Report Share Posted August 31, 2020 53 minutes ago, ChronA said: The use of 9.81 for <gravity> in vanilla Zero AD is inappropriate because the in-game unit-models are depicted at about a 2:1 scale. (I.e. human units are drawn as being approximately 4 meters tall in-game!) Therefore, a gravitational acceleration of 9.81 m/s^2 at 2:1 scale works out as only 4.905 m/s^s relative to the human characters on screen. A more appropriate quantity would be 19.62, but since the scaling factor is just a very imprecise approximation anyway (personally) I would just put it at a nice round 20.0. The scale of the units is 2 meters Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 31, 2020 Report Share Posted August 31, 2020 1 hour ago, Trinketos said: The scale of the units is 2 meters I think they are talking about in relation to the structures and trees. Quote Link to comment Share on other sites More sharing options...
ChronA Posted August 31, 2020 Report Share Posted August 31, 2020 49 minutes ago, Trinketos said: The scale of the units is 2 meters I think you need to do a quick experiment as a sanity check (I know I did). Place two non allied Mauryan spear infantry. Observe that their spears are about the same height as them (2 meters). Now have them fight, and observe that their spears only just touch each other with the butt conveniently right near the center of the attacking model. Thus the separation of the two units must be 2 meters (call it 2.5 or even 3 since the target's body has some thickness and he is leaning forward). Now check the xml and you will find that the spearman's range is set at 4.5 game meters. What happened to the extra 1.5 to 2 meters? Also observe that the footprint of the spearman is is set as a circle with radius 1.5 meters, meaning it should have a diameter of 3 meters. However the spearman is visibly much taller than the circle is wide, meaning his height is at least 3 meters. I assumed this was a deliberate decision on the part of the dev team. If it is not then you have some major revisions to do. (And please don't tell me melee and footprints use different distance units from range attacks, because that would be insanity and I would need to uninstall 0AD on principle.) Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 31, 2020 Report Share Posted August 31, 2020 4 minutes ago, ChronA said: I think you need to do a quick experiment as a sanity check (I know I did). Place two non allied Mauryan spear infantry. Observe that their spears are about the same height as them (2 meters). Now have them fight, and observe that their spears only just touch each other with the butt conveniently right near the center of the attacking model. Thus the separation of the two units must be 2 meters (call it 2.5 or even 3 since the target's body has some thickness and he is leaning forward). Now check the xml and you will find that the spearman's range is set at 4.5 game meters. What happened to the extra 1.5 to 2 meters? Also observe that the footprint of the spearman is is set as a circle with radius 1.5 meters, meaning it should have a diameter of 3 meters. However the spearman is visibly much taller than the circle is wide, meaning his height is at least 3 meters. I assumed this was a deliberate decision on the part of the dev team. If it is not then you have some major revisions to do. (And please don't tell me melee and footprints use different distance units from range attacks, because that would be insanity and I would need to uninstall 0AD on principle.) This is all true, but "meters" as far as the code goes is just an arbitrary unit of measurement, really. The programmer have called them "cubits" or "yards" or "rods" or anything really. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 31, 2020 Report Share Posted August 31, 2020 (edited) Yes, someone did increase the base game's gravity to 39.81 for most ranged units. Slingers a little less, which I agree with too. So, arrows will definitely look a lot better for A24 @Thorfinn the Shallow Minded. I've done the same for DE as well. The arching projectiles are a ton easier to see than before. Edited August 31, 2020 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
ChronA Posted August 31, 2020 Report Share Posted August 31, 2020 25 minutes ago, wowgetoffyourcellphone said: This is all true, but "meters" as far as the code goes is just an arbitrary unit of measurement, really. The programmer have called them "cubits" or "yards" or "rods" or anything really. Precisely. So what I was trying to say is that I think (based on the scale of the units) the strength of gravity in 0AD ought to be about 20 units/s^2, in order to better match our local gravity of 9.81 m/s^2. I'm very glad to hear that the core development team concur and the issue will be improved in the next version. 40.0 units/s^2 sounds fine to me even if it is unrealistically strong for the size of the units. Exaggeration is key to good animation after all. Quote Link to comment Share on other sites More sharing options...
Nescio Posted August 31, 2020 Report Share Posted August 31, 2020 (edited) While in reality gravity is indeed an acceleration (i.e. distance divided by time square), 0 A.D. doesn't have real world physics, and <Gravity> is just a number. @LordGood did change it last year for many templates: https://trac.wildfiregames.com/changeset/23144 However, the new values are a bit arbitrary; e.g. archers and towers have a <Speed> of 75.0 and a <Gravity> of 39.81; javelineers have a lower <Speed>, but the same <Gravity>; other structures (civic centre, fortress, army camp) have the same <Speed>, but a <Gravity> of only 9.81; bolt-shooters have the highest <Speed> in game, 150.0, and the lowest <Gravity>, 9.81. Mods can experiment with what values would produce good-looking trajectories. If there is consensus for a particular ratio (e.g. 2:1), then a patch can be made to standardize the values in 0 A.D. And maybe the <Speed> ought to be related to the <MaxRange>. Edited August 31, 2020 by Nescio <Gravity> Quote Link to comment Share on other sites More sharing options...
hyperion Posted August 31, 2020 Report Share Posted August 31, 2020 10 hours ago, Nescio said: And maybe the <Speed> ought to be related to the <MaxRange>. If we ignore aerodynamics and if I didn't screw up my math "<range> = <speed>2 * sin(2 * elevation) / <gravity>" for even terrain. I wonder how this whole arced trajectories can be reasonably done so the unit animations matches the required elevations. Quote Link to comment Share on other sites More sharing options...
Silier Posted September 1, 2020 Report Share Posted September 1, 2020 This is calculation of position at time t for projectile: CVector3D position(float t) { float t2 = t; if (t2 > timeHit) t2 = timeHit + logf(1.f + t2 - timeHit); CVector3D ret(origin); ret.X += v.X * t2; ret.Z += v.Z * t2; ret.Y += v.Y * t2 - 0.5f * gravity * t * t; return ret; } Where v.y is v.Y = offset.Y / timeHit + 0.5f * gravity * timeHit; Quote Link to comment Share on other sites More sharing options...
Trinketos Posted September 3, 2020 Report Share Posted September 3, 2020 On 8/30/2020 at 10:42 PM, ChronA said: I think you need to do a quick experiment as a sanity check (I know I did). Place two non allied Mauryan spear infantry. Observe that their spears are about the same height as them (2 meters). Now have them fight, and observe that their spears only just touch each other with the butt conveniently right near the center of the attacking model. Thus the separation of the two units must be 2 meters (call it 2.5 or even 3 since the target's body has some thickness and he is leaning forward). Now check the xml and you will find that the spearman's range is set at 4.5 game meters. What happened to the extra 1.5 to 2 meters? Also observe that the footprint of the spearman is is set as a circle with radius 1.5 meters, meaning it should have a diameter of 3 meters. However the spearman is visibly much taller than the circle is wide, meaning his height is at least 3 meters. I assumed this was a deliberate decision on the part of the dev team. If it is not then you have some major revisions to do. (And please don't tell me melee and footprints use different distance units from range attacks, because that would be insanity and I would need to uninstall 0AD on principle.) In blender the units have 2 mts tall. 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted September 3, 2020 Report Share Posted September 3, 2020 6 hours ago, Trinketos said: In blender the units have 2 mts tall. No, you're mistaken, they're actually slightly over 4 m tall in Blender: On 5/19/2020 at 7:59 PM, Stan` said: Notice the Z axis (height) For comparison, the default cube with position 0,0,0 and scale 1,1,1 has dimensions 2×2×2. 2 Quote Link to comment Share on other sites More sharing options...
LordGood Posted September 4, 2020 Report Share Posted September 4, 2020 On 8/31/2020 at 4:05 AM, Nescio said: However, the new values are a bit arbitrary its not arbitrary if it looks good; and thats sorta my thing 2 Quote Link to comment Share on other sites More sharing options...
myou5e Posted September 4, 2020 Report Share Posted September 4, 2020 (edited) On 9/3/2020 at 7:20 PM, Nescio said: No, you're mistaken, they're actually slightly over 4 m tall in Blender: For comparison, the default cube with position 0,0,0 and scale 1,1,1 has dimensions 2×2×2. Hey, I noticed that when arrows impact a unit, they kind of look like they are disappearing into the air. Is this because the units are too wide? Could their actor width be decreased and possibly ranged unit spread decrease to compensate? It would look more realistic. Edited September 4, 2020 by myou5e Quote Link to comment Share on other sites More sharing options...
Silier Posted September 5, 2020 Report Share Posted September 5, 2020 Projectiles after successful hit dissapeare from the game, because they would be lying on the ground under the target (or maybe magicaly hanging in the air but nor of these possibilities looks ok) Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted September 5, 2020 Report Share Posted September 5, 2020 23 hours ago, LordGood said: its not arbitrary if it looks good; and thats sorta my thing Given that the game is not a simulation, whatever looks good is best. The projectiles need to be visible and their trajectory easy to see. So yeah. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.