Jump to content

Incorrect default walk speed?


artoo
 Share

Recommended Posts

19 minutes ago, LetswaveaBook said:

am not sure about this, but I feel that once you get 21 years of experience you will realize

I will realize its pointless to talk devel issues with players.

 

But seriously, it may be meaningless to a player, but this is an issue the dev team should look into. If the values are a mistake, this could impact performance, and effect also gameplay, like formations might behave differently and few other things.

 

Just because the units are scaled 4m, you still want to have a close physics simulation, and not like weird Gs, and an undocumented factor,  modders need to be aware of and always carry over that factor, otherwise you waste lot of time.

Link to comment
Share on other sites

From \source\simulation2\components\CCmpUnitMotion.h

			"<a:example>"
				"<WalkSpeed>7.0</WalkSpeed>"
				"<PassabilityClass>default</PassabilityClass>"
			"</a:example>"
10 hours ago, Stan` said:

That's the XML schema template example... It's not even used.

It's just so the docs can provide examples of usage here https://docs.wildfiregames.com/entity-docs/a25.html#component.UnitMotion

 

From \binaries\data\mods\public\simulation\templates\template_unit.xml

  <UnitMotion>
    <FormationController>false</FormationController>
    <PassabilityClass>default</PassabilityClass>
    <WalkSpeed>9</WalkSpeed>
    <RunMultiplier>1.67</RunMultiplier>
    <InstantTurnAngle>1.5</InstantTurnAngle>
    <Acceleration>18</Acceleration>
  </UnitMotion>

So the actual default value is 9 not 7.

Template File Multiplier ActualValue
\binaries\data\mods\public\simulation\templates\template_unit_catafalque.xml 54,5: <walkspeed op="mul">0.55<walkspeed> 4,95
\binaries\data\mods\public\simulation\templates\template_unit_cavalry_ranged_archer.xml 38,5: <walkspeed op="mul">0.85<walkspeed> 15,3
\binaries\data\mods\public\simulation\templates\template_unit_cavalry_ranged_crossbowman.xml 43,5: <walkspeed op="mul">0.8<walkspeed> 14,4
\binaries\data\mods\public\simulation\templates\template_unit_cavalry_ranged_javelineer.xml 38,5: <walkspeed op="mul">0.9<walkspeed> 16.2
\binaries\data\mods\public\simulation\templates\template_unit_cavalry.xml 99,5: <walkspeed op="mul">2<walkspeed> 18
\binaries\data\mods\public\simulation\templates\template_unit_champion_cavalry_archer.xml 44,5: <walkspeed op="mul">0.85<walkspeed> 15,3
\binaries\data\mods\public\simulation\templates\template_unit_champion_cavalry_crossbowman.xml 44,5: <walkspeed op="mul">0.8<walkspeed> 14,4
\binaries\data\mods\public\simulation\templates\template_unit_champion_cavalry_javelineer.xml 44,5: <walkspeed op="mul">0.9<walkspeed> 16.1
\binaries\data\mods\public\simulation\templates\template_unit_champion_cavalry.xml 57,5: <walkspeed op="mul">2<walkspeed> 18
\binaries\data\mods\public\simulation\templates\template_unit_champion_infantry_archer.xml 48,5: <walkspeed op="add">1.2<walkspeed> 10,8
\binaries\data\mods\public\simulation\templates\template_unit_champion_infantry_crossbowman.xml 48,5: <walkspeed op="add">0.6<walkspeed> 10,8
\binaries\data\mods\public\simulation\templates\template_unit_champion_infantry_javelineer.xml 48,5: <walkspeed op="mul">1.2<walkspeed> 10,8
\binaries\data\mods\public\simulation\templates\template_unit_champion_infantry_pikeman.xml 48,5: <walkspeed op="mul">0.9<walkspeed> 8.1
Link to comment
Share on other sites

47 minutes ago, Stan` said:

So the actual default value is 9 not 7.

Still same thing, why is this 9 km/h if the documentation is m/s?

Unless you walk 9m in one second?

Kind of very misleading, a dev assumes from the values set km/h, if code comments state "lets take the human walk speed here as default" and wonder about m/s documentation.

Atlas' actor viewer is operating in km/h for walk & run animations.

 

I would expect in the templates given the m/s documentation a value of 2.5(9km/h) but not 9.

Edited by artoo
Link to comment
Share on other sites

35 minutes ago, artoo said:

Still same thing, why is this 9 km/h if the documentation is m/s?

It's m/s, never ever km/h.

As alre correctly pointed out, there is some ridiculous scaling involved, like a sea having a width of 200m. The only thing that is somewhat realistically scaled wrt in-game meters are buildings. No surprise a 4m tall spear man walking at 7m/s or a ship crossing the Atlantic in less than a minute.

  • Like 2
Link to comment
Share on other sites

29 minutes ago, artoo said:

It defies all logic to use 7 or 9 m/s for walk speed

Not when the people doing the walking are 4 meters tall and can build up a whole civilization from a single building in the space of half an hour! Games like this intrinsically operate on Paul Bunyon logic, which as arbitrary as it seems does actually follow a consistent set of rules. The only thing that is illogical is certain people coming in and demanding engine design choices to conform to their personal understanding of real world physics, without thinking about how that would affect other game systems. You are in the wrong here my friend, but you are welcome to make a mod that changes the walk speed to whatever you want it to be and see how the game plays.

  • Like 3
  • Thanks 2
Link to comment
Share on other sites

45 minutes ago, artoo said:

It defies all logic to use 7 or 9 m/s for walk speed, like arbitrary, but these are sane values in km/h.

Ok, create a cube of 1m x 1m x 1m in blender and import it into 0ad. IFF a unit with effective speed of 7 moves anything other than the distance of 7 cubes lined up per second it's a bug. Anything else you find confusing or unreal goes under artistic freedom.

Link to comment
Share on other sites

15 minutes ago, hyperion said:

Ok, create a cube of 1m x 1m x 1m in blender and import it into 0ad. IFF a unit with effective speed of 7 moves anything other than the distance of 7 cubes lined up per second it's a bug. Anything else you find confusing or unreal goes under artistic freedom.

 

You still set blender to eg metric, using meters, yep, and a scene is still a given time in seconds?

You have ranges in meters and projectile speeds that are close to realism, but walk speed, nope, in fact use avg km/h speeds in m/s.

If you were tasked to add a default human walk speed in m/s to a simulation, would you expect funnily a value that matches the km/h avg human walk speed, or a pretty off sounding m/s value?

If I was to make a say scifi mod, and wanted accurate physics based speeds, would the actor view show me proper animations, given it has a fallback values of 7 and 12? 12 is also a good pick for a human run speed btw. Would my mod using the game engine run smoothly with real values, Or would I have to adjust to a certain factor too?

  • Like 1
Link to comment
Share on other sites

15 minutes ago, artoo said:

 

You still set blender to eg metric, using meters, yep, and a scene is still a given time in seconds?

You have ranges in meters and projectile speeds that are close to realism, but walk speed, nope, in fact use avg km/h speeds in m/s.

If you were tasked to add a default human walk speed in m/s to a simulation, would you expect funnily a value that matches the km/h avg human walk speed, or a pretty off sounding m/s value?

If I was to make a say scifi mod, and wanted accurate physics based speeds, would the actor view show me proper animations, given it has a fallback values of 7 and 12? 12 is also a good pick for a human run speed btw. Would my mod using the game engine run smoothly with real values, Or would I have to adjust to a certain factor too?

could you create more physics?

Link to comment
Share on other sites

4 minutes ago, Lion.Kanzen said:

could you create more physics?

If you change the physics so the earth day has more hours, yes.

Apart it would be almost full time job, doubtful. :(

 

Btw, I am saying, calibrate walk speed to real values, and introduce a scale multiplier fo those who want, require need it.

Edited by artoo
Link to comment
Share on other sites

4 minutes ago, Lion.Kanzen said:

Yes, this is a daunting task.

Right, and priority has what fills the fridge.

 

Here is a mock up unit motion entity snippet:


 

  <UnitMotion>
    <FormationController>false</FormationController>
    <PassabilityClass>default</PassabilityClass>
    <WalkSpeed>1.9</WalkSpeed>

    <ScaleMultiplier>3.6</ScaleMultiplier>
    <RunMultiplier>3.3</RunMultiplier>
    <InstantTurnAngle>0.8</InstantTurnAngle>
    <Acceleration>3.1</Acceleration>
  </UnitMotion>

 1.9 m/s = ~7 km/h

ScaleMultiplier would be the factor to multiply with (could default to 1), atm, 3.6, 3600/1000 the conversion between m/s and km/h, which is the minimum that walk and run animations somehow need to be fluid in one game second.

 

Link to comment
Share on other sites

The reason I think it would be better to have the engine run on real life values is, you can accurately balance this. Could be a separate little project, I think it is a lot easier to balance everything against true scale first, like you calibrate a balance, once this is done, it should and hopefully scales.

Easier to use real values than doing wild guesses in a scaled model.

Link to comment
Share on other sites

9 minutes ago, artoo said:

I think it is a lot easier to balance everything against true scale first

We should indeed really find the real life pierce damage value of an Javelin! Our current value seems not good for gameplay IMHO.

Edited by LetswaveaBook
Sorry, I have to admit that was a joke. Please ignore it and don't let it spoil the discussion. It is a bad habbit.
  • Haha 1
Link to comment
Share on other sites

5 minutes ago, LetswaveaBook said:

We should indeed really find the real life pierce damage value of an Javelin! Our current value seems not good for gameplay IMHO.

I think a gold standard, ie real life values to benchmark whatever against would be a good thing.

I di have real javelin data.

Assuming 800g Jav, it would be thrown about 30-40 meters with a speed of ~20 m/s. I am not sure how the cav in 0AD does many maneuvers without stir ups. :D

Here comes walk and run speed into play, can you escape a Javelin for example, by horse maybe etc ...

Edited by artoo
Link to comment
Share on other sites

An idea I have, I could be made so, that eg a Persian horse run fast, very fast compared to other civ horses, a distinctive feature of the Persians. Ie Persian horses could be a very valuable trade good.

Back to Javelin, a Persian horse could narrowly escape a javelin, assuming a max speed of ~23 m/s or 82.8 km/h.

Link to comment
Share on other sites

As the producer for an other FOSS project Vegastrike it's a space shooter/trading game I very familiar with the scale thing as we model solar systems and our capital ships are kilometres in length we do model real physics and a certain Arcade style simplification and there is a need for our units to maintain their specifications to very specific units otherwise the differential equations just don't work. All that is just the background though the game must still be playable/fun we play fast and loose with time to make that possible but the issue with 0AD is that the game scale is not consistent it's a composite compromise with several different scales to make displaying the game elements possible/understandable and easier to code the underlying simulation so the actual units are just abstractions not connected to the real world BTW I've been coding since the sixties and with Vegastrike since 2005.

Enjoy the Choice :)  

Edited by Loki1950
spelling
  • Like 3
Link to comment
Share on other sites

3 minutes ago, Loki1950 said:

it's a composite compromise with several different scales to make displaying the game elements possible/understandable and easier to code the underlying simulation so the actual units are just abstractions not connected to the real world

Which make balancing so hard.

Who of the average balancers does differential equations, factors in various scaling factors when attempting to balance it? Hands up please. ;)

Link to comment
Share on other sites

From my view, I can conclude the thread.

@Stan` and your team, don't take it as harsh criticism.

I think the situation would already be cured a bit, relatively immediately code wise, if you give your balancing team real life values to work with. If the dev team hid away the scaling factor or left it in the template wouldn't matter so much.

Link to comment
Share on other sites

2 hours ago, Freagarach said:

As I (and others) said earlier, the values _are_ mꞏ*s-1. The values are "realistic" in the sense that a ~4.5 m tall person _might_ be able to walk this fast (ignoring any physical constraints of our structure at that length).

 

And I pointed out, that if you just remove the scaling factor from essentially input parameters, your balancing team works against real values, nothing would change, you just remove the multiplier from walkspeed input and have it multiplied with the real speed. Just like run speed is done.

Anyhow, I have my answer, your engine would not be suitable for say a scifi mod, if speed input works on undocumented upscaled values.

Thanks, close the thread.

Link to comment
Share on other sites

1 hour ago, artoo said:

Anyhow, I have my answer, your engine would not be suitable for say a scifi mod, if speed input works on undocumented upscaled values.

if you want to display 7 blender cubes per second as warp 3 it's a one-liner for your mod ...

If it makes you happy you can also mod 0ad to append li/h to speedvalues to give it a "realistic feel" for most units, the engine doesn't care.

Link to comment
Share on other sites

Because I'm nice, or stupid and I believe acts do better than this project than endless arguments:

Index: binaries/data/mods/public/simulation/templates/units/samnite_spearman.xml
===================================================================
--- binaries/data/mods/public/simulation/templates/units/samnite_spearman.xml	(revision 25989)
+++ binaries/data/mods/public/simulation/templates/units/samnite_spearman.xml	(working copy)
@@ -5,6 +5,9 @@
     <SpecificName>Samnite Spearman</SpecificName>
     <Icon>units/samnite_spearman.png</Icon>
   </Identity>
+  <UnitMotion>
+    <ScaleMultiplier>0.555</ScaleMultiplier>
+  </UnitMotion>
   <VisualActor>
     <Actor>units/carthaginians/infantry_spearman_c_samnite.xml</Actor>
   </VisualActor>
Index: source/simulation2/components/CCmpUnitMotion.h
===================================================================
--- source/simulation2/components/CCmpUnitMotion.h	(revision 25989)
+++ source/simulation2/components/CCmpUnitMotion.h	(working copy)
@@ -247,6 +247,7 @@
 			"<a:example>"
 				"<WalkSpeed>7.0</WalkSpeed>"
 				"<PassabilityClass>default</PassabilityClass>"
+				"<ScaleMultiplier>1.8</ScaleMultiplier>"
 			"</a:example>"
 			"<element name='FormationController'>"
 				"<data type='boolean'/>"
@@ -255,6 +256,11 @@
 				"<ref name='positiveDecimal'/>"
 			"</element>"
 			"<optional>"
+				"<element name='ScaleMultiplier' a:help='Simple multiplier to allow to define relative speed in templates.'>"
+					"<ref name='positiveDecimal'/>"
+				"</element>"
+			"</optional>"
+			"<optional>"
 				"<element name='RunMultiplier' a:help='How much faster the unit goes when running (as a multiple of walk speed).'>"
 					"<ref name='positiveDecimal'/>"
 				"</element>"
@@ -282,6 +288,11 @@
 		m_FacePointAfterMove = true;
 
 		m_WalkSpeed = m_TemplateWalkSpeed = m_Speed = paramNode.GetChild("WalkSpeed").ToFixed();
+
+		CParamNode scaleMultiplier = paramNode.GetChild("ScaleMultiplier");
+		if (scaleMultiplier.IsOk())
+			m_WalkSpeed = m_TemplateWalkSpeed = m_Speed = m_WalkSpeed.Multiply(scaleMultiplier.ToFixed());
+
 		m_SpeedMultiplier = fixed::FromInt(1);
 		m_LastTurnSpeed = m_CurrentSpeed = fixed::Zero();
 

That's the engine change you need to make it work. I designed it specially to not break every single mod in existence by making it optional which is the reverse of your approach. I also tested it and it works.

Just for the record and because I invested a long time in those discussions, here is what was said about Vegastrike on the forums Showing results for 'vegastrike'. - Wildfire Games Community Forums

And we had the same kind of discussions about Ambient Occlusion being baked wrong and all art files needing to be changed.

2 hours ago, artoo said:

Anyhow, I have my answer, your engine would not be suitable for say a scifi mod, if speed input works on undocumented upscaled values.

That seems incorrect to me, in fact I started a scifi mod some time ago, with the goal to make it an alternative to starcraft, and walking speeds were the least of my concerns. The ability to make mines sockets and to stop flying vehicles were more annoying that that. Of course the huge number of new buildings and their design to make was also worrysome.

GitHub - 0ADMods/stella_artis

 

 

  • Like 2
Link to comment
Share on other sites

3 hours ago, Stan` said:

That seems incorrect to me, in fact I started a scifi mod some time ago, with the goal to make it an alternative to starcraft, and walking speeds were the least of my concerns. The ability to make mines sockets and to stop flying vehicles were more annoying that that. Of course the huge number of new buildings and their design to make was also worrysome.

Yeah, a c&c generals like mod is in my mind, using accurate physics.

The scale multiplier decoupled from actual speed definitions would be required.

If I had a team to plan a mod using 0AD engine, it would be essentail to know eg scale.

As it would be now, I would have at least one coder in the team effectively forking the engine and make changes, or pick another engine probably and no extra coder.

Edited by artoo
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...