• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

BZ2 hovercraft physics

Started by appel, July 24, 2008, 08:25:21 AM

Previous topic - Next topic

appel

Ok, I'm well on my way to recreate the physics... but need help with defining some more variables.

What about the variables in [CraftClass] variables?

braccelFactor = 0.03
Break-deacceleration factor?

velFactor = 0.2
How fast the craft speeds up? There is accelThrust in the HoverCraftClass, how is that one used in relation to this one?

steerFactor = 1.5
Supposed to be pitchFactor?

omegaFactor = 0.2
strafeFactor = 0.2
I know what those do.

avoidSpeed = 20;
topSpeed = 30;
What is the difference here? Why not just have one max-speed variable?


Thank you :)

General BlackDragon

those control how the AI moves, I think.

RD can explain more.



*****General BlackDragon*****

Red Devil

ZA knows those settings better.
What box???

appel

Quote from: General BlackDragon on August 04, 2008, 05:54:41 PM
those control how the AI moves, I think.

RD can explain more.

My understanding is that the ODF files represent a internal class hierarchy, e.g.

GameObjectClass (Contains the most basic and common variables among all game objects)
|
CraftClass (extends GameObjectClass. Contains the common variables among all craft/vehicle objects)
|
HoverCraftClass (extends CraftClass. Contains the common variables among all hovercraft vehicles)

appel

Ok, including those above I need more info on this:

alphaTrack = 22.0 //springs speed it rights itself
alphaDamp = 8.0 //shocks

Zero Angel

#20
The following is a list of AI parameters I created a long time ago for an experimental scout variant which was supposed to dogfight more like a human would. I dont know how much these params have changed since 1.3pb2, but these are my notes.


// AI Handling Info --
brAccelFactor = 0.85f; // Acceleration Level for strafing (changed for 1.3)
strafeFactor = 0.9f; // % of time that unit will strafe
steerFactor = 1.05f;  // Low values = slow AI steer
omegaFactor = 0.5f; // Amount of 'give' for target lead (changed for 1.3)
velFactor = 0.3f; // Thruster burst length [in % of desired velocity]
alphaScale = 0.6  // Overcompensate left/right aim (0.3 is default?)
omegaScale = 0.8  // Accuracy for opponent strafing in single direction (~0.75 is perfect?)

steerScatter = 0.3 // Allowed steer inaccuracy
pitchScatter = 0.1 // Allowed pitch inaccuracy

TopSpeed = 50 // Set this over actual top speed for more aggressive forward AI movement

velFactor has to do with whether the AI will feather the gas pedal, or step on it and then step off of it for a long time when going not at full speed. Ie: in other words, it has to do with how 'fine' the AI controls the thrust on the craft. A coarse setting would have the AI stepping on the gas for a long time, then letting it drift for awhile.

I think avoidspeed sets how fast the ships will move when they need to get around obstacles and such.

I'm not *too* sure about alphaTrack and alphaDamp, they're both pretty similar parameters, and I remember playing with them a few years ago. I know for one of them, it would affect how sturdy your craft was (ie: how affected it would be by omega kicks from explosions), and one (or maybe the same one) controlled how much the auto-leveling would kick in -- you could set it to 0, and your craft would somersault at the slightest provocation, but having a low setting of that would make it easy to look directly up.
QuoteAwareness, Teamwork, Discipline
Constantly apply these principles, and you will succeed in a lot of things, especially BZ2 team strat.
{bac}Zero Angel
Victory through superior aggression

appel

Quote from: Zero Angel on August 05, 2008, 12:36:25 AM
The following is a list of AI parameters I created a long time ago for an experimental AI scout which was supposed to dogfight more like a human would. I dont know how much these params have changed since 1.3pb2, but these are my notes.


// AI Handling Info --
brAccelFactor = 0.85f; // Acceleration Level for strafing (changed for 1.3)
strafeFactor = 0.9f; // % of time that unit will strafe
steerFactor = 1.05f;  // Low values = slow AI steer
omegaFactor = 0.5f; // Amount of 'give' for target lead (changed for 1.3)
velFactor = 0.3f; // Thruster burst length [in % of desired velocity]
alphaScale = 0.6  // Overcompensate left/right aim (0.3 is default?)
omegaScale = 0.8  // Accuracy for opponent strafing in single direction (~0.75 is perfect?)

steerScatter = 0.3 // Allowed steer inaccuracy
pitchScatter = 0.1 // Allowed pitch inaccuracy

TopSpeed = 50 // Set this over actual top speed for more aggressive forward AI movement

velFactor has to do with whether the AI will feather the gas pedal, or step on it and then step off of it for a long time when going not at full speed. Ie: in other words, it has to do with how 'fine' the AI controls the thrust on the craft. A coarse setting would have the AI stepping on the gas for a long time, then letting it drift for awhile.

I think avoidspeed sets how fast the ships will move when they need to get around obstacles and such.

I'm not *too* sure about alphaTrack and alphaDamp, they're both pretty similar parameters, and I remember playing with them a few years ago. I know for one of them, it would affect how sturdy your craft was (ie: how affected it would be by omega kicks from explosions), and one (or maybe the same one) controlled how much the auto-leveling would kick in -- you could set it to 0, and your craft would somersault at the slightest provocation, but having a low setting of that would make it easy to look directly up.

Ok, thanks. Seems like I'll just ignore those variables for now as they are AI.

Commando

AlphaTrack is not an ai only setting.  I had to lower alphaTrack for hovering assault tanks since it appeared to control the unit's rotational acceleration.

Red Devil

alphaDamp affects the smoothness of your forwards/backwards rotation, how much the bumps affect it, really.  Setting it to 12 will make your Scout real smooth.

Like Commando says, alphaTrack affects your longitudinal rotation.  Stick your arm straight out in front of you and twist it and it's that rotation.  Setting it high will make your ship go right side up quicker when it's upside down.
What box???

Red Devil

Here's some other settings you can use that I use in mine:

[GameObjectClass]

CanSelect = false // can select with point-and-space
NoShadow = false // never renders a shadow if true.

collisionRadius = 8.0
alwaysClip = 0

DoBettyHealth = true // true: do Betty health warnings
DoBettyAmmo = true // true: do Betty ammo warnings
DoBettyLost = true // true : betty voice when this craft is lost

Tuggable = -1 // -1 = default behavior, 0 = never tuggable, 1 = always tuggable

isStealth = false

IsSingle = false

playerOnly = 0

Mass = 10000

Lifespan = -1 // -1 == infinite; > 0 is # seconds of life before it goes *boom*


[CraftClass]

LeaveExplodeScorch = true
MaxScorchHeight = 20.0 // max height above ground to leave a scorch

ClosestEnemyGoodEyes = false // but defaults true for CLASS_TURRETTANK items

CraftTeamIsPilotTeam = true   // false
WeaponsConverge = true

Use13Aim = false            // If false, tries to use 1.2's aim code
Aim12Delay3 = 0.14          //.. Aim12Delay3 = 0.1, 0.14, 0.23333, 0.3
HoverAim12Delay3 = 0.6      //.. HoverAim12Delay3 = 0.5, 0.6, 0.83333, 1.0
AssaultAim12Delay3 = 0.7    //.. AssaultAim12Delay3 = 0.7, 0.7, 0.7, 0.7

Aim12CannonError3 = 0.2     //.. Aim12CannonError3 = 0.75, 0.5, 0.2, 0.0

Lifespan = -1 // -1 == infinite; > 0 is # seconds of life before it goes *boom*

HealthChangeLevelDelta = 0.2 // valid values are 0..1

AttackTaskAttackTimeout3 = 8.0
AttackTaskFleeTimeout3 = 20
AttackTaskStrafeAfterFlee3 = true
AttackTaskStrafeToFleeTimeout3 = 25

// AttackTaskAttackTimeout0 .. AttackTaskAttackTimeout3 = 8.0, 12.0, 16.0, 20.0
// AttackTaskFleeTimeout0 .. AttackTaskFleeTimeout3 = 50, 40, 30, 20
// AttackTaskStrafeAfterFlee0 .. AttackTaskStrafeAfterFlee3 = false, false, false, true
// AttackTaskStrafeToFleeTimeout0 .. AttackTaskStrafeToFleeTimeout3 = 0, 25, 50, 75

//   These are skill-dependent tuning behaviors for craft that
// subcontract out parts of their behavior to
// AttackTask.cpp. AttackTaskAttackTimeout# is how many seconds a craft
// will be in 'STAND' mode (~= stand and fire), before it switches to
// 'FLEE' mode. (Note: people talking about scouts that run away all the
// time, this is the number to change-- make it a lot higher, and let the
// CraftClass::HealthChangeLevelDelta param take effect). The FleeTimeout
// is the number of turns (1/10 seconds, so that 50 == 5.0 seconds) is
// how long it'll stay in FLEE. If StrafeAfterFlee is true, when FLEE is
// done, it'll go to STRAFE, otherwise it'll go to
// BLAST. StafeToFleeTimeout is how many turns it'll be in STRAFE, then
// it'll switch to FLEE. [NM]

StrafeTimeBase3 = 0.5   //.. StrafeTimeBase3 = 0.5/1.0/3.0/5.0
StrafeTimeRandom3 = 0.5 //.. StrafeTimeRandom3 = 0.5/1.0/1.5/2.0
RetargetOnStrafe = true

// AI Settings

attackRange = 320.0 // for AttackTask.cpp
waitRange = 370.0 // for AttackTask.cpp
fireConeXBase = 0.2 // for AttackTask.cpp and other AI tasks
fireConeXSkillAdj = -0.05 // for AttackTask.cpp and other AI tasks
fireConeYBase = 0.2 // for AttackTask.cpp and other AI tasks
fireConeYSkillAdj = -0.05 // for AttackTask.cpp and other AI tasks
AttackTaskBlastDist = 40.0 // for AttackTask.cpp,
OffensiveProcessMadTime = 30.0 // for OffensiveProcess.cpp

PathingType = -1 // -1 = auto, 0 = Hover, 1 = Walker, 2 = Person, 3 = Tracked, 4 = Flyer
AvoidType = -1 // -1 = auto, 0 = None, 1 = force, 2 = plan

//xplSnipe = ""
//xplChunk = ""
//xplCrash = ""

//damageEffect1 = ""
//damageEffect2 = ""
//damageEffect3 = ""
//damageEffect4 = ""

chunkEffect1 = "iochnk01.xsi"
chunkEffect2 = "iochnk02.xsi"
chunkEffect3 = "iochnk03.xsi"
chunkEffect4 = "iochnk04.xsi"
chunkEffect5 = "iochnk05.xsi"
chunkEffect6 = "iochnk06.xsi"
chunkEffect7 = "iochnk07.xsi"

BailSound = "wohoo.wav" // Sound on pilot bailing out
CanAIEject = true // AI pilots can eject from this craft when destroyed
CraftTeamIsPilotTeam = false
CanBailout = true // default
CanUserBailout = true // Human can exit craft w/ Ctrl-B if true
CanUserHopout = true
CanRecycle = true // 'RECYCLE' shows up on the 0 key if true
needPilot = 1
canSnipe = 1
CanRescue = 1
//canHunt = 1
DAMAGE_SCALE = 0.05 // Scale in turning velocity into damage, on craft:ground or craft:building collisions
MAX_PILOT_HORIZ_VELOCITY = 25.0 // Max horizontal velocity a pilot can have when ejecting
RECYCLE_TASK_DIST = 10.0 // How far from the recycler until we're 'done' and recycle
// DoIdleDispatch = true

MIN_BOUNCE_VEL = 0.5

DAMAGE_SCALE = 0.05 // Scale in turning velocity into damage, on craft:ground or craft:building collisions
MAX_PILOT_HORIZ_VELOCITY = 25.0 // Max horizontal velocity a pilot can have when ejecting
RECYCLE_TASK_DIST = 10.0 // How far from the recycler until we're 'done' and recycle

OBJECT_ELASTICITY = 0.425   // 0.125
GROUND_ELASTICITY = 0.07125 // 0.03125
CollideTerrainSound = "silence.wav"    // "collide01.wav" // Sound on collision w/ terrain
CollideBldgSound = "collide02.wav"     // Sound on collision w/ building or immovable object
CollideOtherSound = "collide01.wav"    // Sound on hitting other objects
ExplodeSound = "Ordin_a.wav" // Sound when a craft explodes

DoBettyAttack = true // true: do betty attack warnings when this is damaged.

X_SPIN_RATE = 1.5707963267948966 // = 0.5f * PI;
Y_SPIN_RATE = 3.1415926535897932 // = PI;
Z_SPIN_RATE = 0.7853981633974483 // = 0.25f * PI;

What box???

appel

Thanks RD, all of this will help :)