RE: About maps - Player and ball physics

#1 von Edmunds , 24.04.2016 19:26

[align=center]Warning: Many GIFs![/align]

Hi, Haxballers! I introduce you on article series about map tips and brief definitions. I added some text, formatting, references myself and used some sources. I think I can repeat and discover other things writing like these on forum. It also applies to others. Im not a map guru, tho.
Let's start with Haxball default values for player and ball physics in primary maps.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 
	"playerPhysics" : {
"bCoef" : 0.5,
"invMass" : 0.5,
"damping" : 0.96,
"acceleration" : 0.1,
"kickingAcceleration" : 0.07,
"kickingDamping" : 0.96,
"kickStrength" : 5
},

"ballPhysics" : {
"radius" : 10,
"bCoef" : 0.5,
"invMass" : 1,
"damping" : 0.99,
"color" : "FFFFFF",
"cMask" : ["all"],
"cGroup" : ["ball"]
}
 


"bCoef" - Defines the bouncing coefficient. Values range: (-?;+?).

  • 0 - normal bounce

  1. "bCoef" : default
  2. "bCoef" : 3
  3. "bCoef" : 0.2
  4. "bCoef" : 0

"invMass" - The inverse of the mass. Values range: (-?;+?).
  • 1 but overdamped object will break things.
    [list]
  • 0 - none;
  • >=1 - object moves forever

  1. "damping" : default
  2. "damping" : 1
  3. "damping" : 0.4
  4. "damping" : -1

"acceleration" - This is how fast the player accelerates when moving in any direction. Values range: (-?;+?).
  • 0 - accelerates

  1. "acceleration" : default
  2. "acceleration" : 0.7
  3. "acceleration" : 0.025
  4. "acceleration" : -0.6

"kickingAcceleration" - Replaces normal acceleration when the player is pressing the kick button. Values range: (-?;+?).
  • 0 - player accelerates more when is kicking the kick button;
  • ="acceleration" - player won't slow down when kicking

  1. "kickingAcceleration" : 0.7
  2. "kickingAcceleration" : 0
  3. "kickingAcceleration" : -0.9

"kickingDamping" - Replaces the normal damping when the player is pressing the kick button. Values range: [0;1]. Some cases >1 but overdamped it will break things.
  • 0 - player stops moving when pressing the kick button;
  • >=1 - player moves forever when pressing the kick button;
  • ="damping" - Haxball doesnt use this attribute

  1. "kickingDamping" : 2
  2. "kickingDamping" : 0.5

"kickStrength" - Strength with which the ball will be kicked by the player. Values range: (-?;+?).
  • 0 - player kicks ball stronger

  1. "kickStrength" : default
  2. "kickStrength" : 12
  3. "kickStrength" : 1
  4. "kickStrength" : -8

"color" - The fill color of the disc, ball and segment.
"cMask" - Stands for collision it defines which layers this object can collide with. See more in other thread.
  • "all" - ball collides with any objects

"cGroup" - Stands for collision group, it defines in which collision layers this object lives. See more in other thread.
  • "ball" - all other objects lives with ball

"radius" - The radius of the disc/ball. Values range: [0;+?).
  • 0 - invisible;
  • >0 - radius equal on X-axis and Y-axis

Notes:
  1. Each GIF I'd changed only the specified thing and left others to default value. Changing more than one option produces different results. Combine it for your needs;
  2. "bCoef", "invMass" and "damping" shown only with ball and behaves the same on player;
  3. It's considered as normal all values in range [0:1]
  4. To look the same properties on other objects (segment, vertex, plane and disc) go to 2. article

See more:
1. About maps - cMask and cGroup
2. About maps - Object properties
3. About maps - Tips
4. About maps - Popular maps playerPhysics and ballPhysics
5. About maps - Special obstacles

Sources:
  1. New stadium features explained by Hasbro (direct download)
  2. Example stadium general definitions by Hasbro
  3. Damping in computer games


Edmunds  
Edmunds
Beiträge: 22
Punkte: 22
Registriert am: 08.04.2016


   


Xobor Xobor Forum Software
Einfach ein eigenes Forum erstellen
Datenschutz