OpenUT99-Plus
Unreal Engine 1, rebuilt from scratch
Loading...
Searching...
No Matches
calibrate Namespace Reference

Functions

 parse_log (text)
 lane_of (y)
 step_report (tracks, walk_from=0.5)
 wedge (x0, x1, y0, y1, z0, z1, texture, name)
 size_label (lane)
 size_tag (lane)
 rises (kind)
 air_report (tracks)
 slide_report (tracks)
 entry_report (tracks)
 ledge_report (tracks, walk_from=0.5)
 wall_report (text)
 reach_report (text)
 build_lanes (mapgen, kind)
 compile_probe (mapgen)
 run_server (game, map_name, seconds, log_path)
 run_ours (ut_script, game, map_name, seconds)
 main (argv)
 over (rise, rest_z, top)

Variables

 HERE = os.path.dirname(os.path.abspath(__file__))
list STEP_HEIGHTS = [16, 24, 28, 29, 30, 31, 32, 40]
list RAMP_ANGLES = [30, 40, 44, 46, 50, 55, 60]
int RAMP_RUN = 192
list AIR_CONTROLS = [0, 0.05, 0.2, 0.35, 0.6, 1.0]
int AIR_Z = 1800
list SLIDE_ANGLES = [46, 50, 60, 70, 80]
int SLIDE_RISE = 400
int GRAVITY = 950
list ENTRY_LANES = [(46, 100), (46, 200), (46, 300), (46, 400), (46, 600), (55, 400), (65, 400), (80, 400)]
int ENTRY_RISE = 300
 LANE_Y0
 LANE_GAP
list LEDGE_LANES
list REACH_LANES
int REACH_X = 400
list WALL_LANES
int FLOOR = 0
dict MAPS = {"reach": "OU-Reach", "wall": "OU-Wall", "ledge": "OU-Ledge", "steps": "OU-Steps", "ramps": "OU-Ramps", "air": "OU-Air", "slide": "OU-Slide", "entry": "OU-Entry"}
 PROBE_RE = re.compile(r"(?m)^ScriptLog: PROBE (\S+) (" + r"\S+ " * 7 + r"\S+)")
 ADJ_RE = re.compile(r"(?m)^ScriptLog: PROBEADJ (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)")
 REACH_RE = re.compile(r"(?m)^ScriptLog: PROBEREACH (\S+) \S+ (\S+) (\S+),(\S+),(\S+) ")

Detailed Description

Measure the original engine with our probe (ADR 0008).

    python3 tools/probe/calibrate.py MAPGEN_DIR steps|ramps|air|slide|entry|ledge|wall|reach [--angles A,B,...] [--seconds S] [--no-build] [--ours UT_SCRIPT]

MAPGEN_DIR is a ut99-mapgen checkout set up as in DEVELOPMENT_GUIDE: ut/ holds a copy of the install with the
OldUnreal Linux patch that matches it (the server we measure); make-469e/ holds a System with the v469e Linux patch,
only to compile the probe (the 469f-rc5 Linux `ucc make` recurses forever into "Classes/./"). The runner compiles
tools/probe/OUProbe there (the package lands in ~/.utpg/System, where the server finds it), builds the calibration
map with mapgen, runs a dedicated server with the probe mutator and reads the probe lines from its log.
--ours runs the same probe in our engine too (`ut_script ut/ --map MAP?mutator=... S` with UTVM_LOG=1) and reports
both side by side.

Each calibration is a map of lanes; a ProbePawn walks +x along each one toward an obstacle of growing rise. Reports,
per lane, the obstacle, its rise and how high the pawn got: a pawn that gets over it is lifted by its rise.
"steps": steps of growing height. "ramps": true slopes (wedges, 192 units long) of growing angle.
"air": a ProbeFaller per lane, spawned 1,800 up with growing AirControl, falls while MoveTo pulls it forward;
reports its mean horizontal acceleration while falling and its top horizontal speed.
"slide": a ProbeDropper per lane dropped on a slope too steep to walk (wedges 400 high, --angles applies); reports
its steady acceleration along the slope while it slides down, against 950 sin(angle) (all of gravity along it).
"entry": ProbePawns walk into slopes too steep to walk (wedges 300 high) at several GroundSpeeds and angles; reports
the speed along the slope on the first ticks after the switch to falling and how high each gets (--angles: lanes
at those angles, all at 400).
"ledge": like steps, but too high to step, with bCanJump and the MoveTo goal on top of the ledge; reports whether
the pawn jumped, how high it got and where it ended up (on top or not). Lanes are (ledge height, JumpZ).
"reach": a ProbeReacher per lane asks pointReachable for a point 400 ahead: on top of a block ("up"), or on the floor
below the platform it stands on ("down"), with or without bCanJump and with several JumpZ; reports the answer.
"wall": a wall 200 high and 32 thick across each lane (lanes are its width and the offset of its centre), the goal
straight behind it; reports what
PickWallAdjust (called from HitWall) returns, the Destination it leaves, and whether the pawn got past the wall.

Function Documentation

◆ air_report()

calibrate.air_report ( tracks)
{lane: (horizontal acceleration while falling, top horizontal speed)} from the falling samples.

◆ build_lanes()

calibrate.build_lanes ( mapgen,
kind )

◆ compile_probe()

calibrate.compile_probe ( mapgen)

◆ entry_report()

calibrate.entry_report ( tracks)
{lane: (speed along the slope on the first three falling ticks after walking, highest z)}.

◆ lane_of()

calibrate.lane_of ( y)
Lane index of a y coordinate (nearest lane centre).

◆ ledge_report()

calibrate.ledge_report ( tracks,
walk_from = 0.5 )
{lane: (rest z, jumped, top z, z over the ledge)}: jumped is whether the pawn left the floor upward after it began
walking; z over the ledge is the lowest z once past its front edge (x > 256 + radius), None if it never got there.

◆ main()

calibrate.main ( argv)

◆ over()

calibrate.over ( rise,
rest_z,
top )

◆ parse_log()

calibrate.parse_log ( text)
Probe lines -> {pawn name: [(t, x, y, z, physics, vx, vy, vz)]}, in log order.

◆ reach_report()

calibrate.reach_report ( text)
{lane: pointReachable answer}, from the PROBEREACH lines.

◆ rises()

calibrate.rises ( kind)

◆ run_ours()

calibrate.run_ours ( ut_script,
game,
map_name,
seconds )

◆ run_server()

calibrate.run_server ( game,
map_name,
seconds,
log_path )

◆ size_label()

calibrate.size_label ( lane)

◆ size_tag()

calibrate.size_tag ( lane)

◆ slide_report()

calibrate.slide_report ( tracks)
{lane: steady acceleration along the slope while sliding down}: the median of the per-tick speed gains over
the samples moving back (vx < -1) above the slope's lower third, leaving out the first two (the landing).

◆ step_report()

calibrate.step_report ( tracks,
walk_from = 0.5 )
{lane: (rest z before walking, highest z while walking)} for the steps map.

◆ wall_report()

calibrate.wall_report ( text)
{lane: (first PickWallAdjust result, Destination it left, x of that call, farthest x reached, physics after)}.

◆ wedge()

calibrate.wedge ( x0,
x1,
y0,
y1,
z0,
z1,
texture,
name )
A mapgen brush rising along +x from (x0, z0) to (x1, z1): a true slope, not stairs.

Variable Documentation

◆ ADJ_RE

calibrate.ADJ_RE = re.compile(r"(?m)^ScriptLog: PROBEADJ (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)")

◆ AIR_CONTROLS

list calibrate.AIR_CONTROLS = [0, 0.05, 0.2, 0.35, 0.6, 1.0]

◆ AIR_Z

int calibrate.AIR_Z = 1800

◆ ENTRY_LANES

list calibrate.ENTRY_LANES = [(46, 100), (46, 200), (46, 300), (46, 400), (46, 600), (55, 400), (65, 400), (80, 400)]

◆ ENTRY_RISE

int calibrate.ENTRY_RISE = 300

◆ FLOOR

int calibrate.FLOOR = 0

◆ GRAVITY

int calibrate.GRAVITY = 950

◆ HERE

calibrate.HERE = os.path.dirname(os.path.abspath(__file__))

◆ LANE_GAP

calibrate.LANE_GAP

◆ LANE_Y0

calibrate.LANE_Y0

◆ LEDGE_LANES

list calibrate.LEDGE_LANES
Initial value:
1= [(77, 325), (78, 325), (77, 325, (17, 50)), (78, 325, (17, 50)), (98, 325, (17, 50)),
2 (100, 325, (17, 50))]

◆ MAPS

dict calibrate.MAPS = {"reach": "OU-Reach", "wall": "OU-Wall", "ledge": "OU-Ledge", "steps": "OU-Steps", "ramps": "OU-Ramps", "air": "OU-Air", "slide": "OU-Slide", "entry": "OU-Entry"}

◆ PROBE_RE

calibrate.PROBE_RE = re.compile(r"(?m)^ScriptLog: PROBE (\S+) (" + r"\S+ " * 7 + r"\S+)")

◆ RAMP_ANGLES

list calibrate.RAMP_ANGLES = [30, 40, 44, 46, 50, 55, 60]

◆ RAMP_RUN

int calibrate.RAMP_RUN = 192

◆ REACH_LANES

list calibrate.REACH_LANES
Initial value:
1= [("up", 29, 0), ("up", 30, 0), ("down", 24, 0), ("down", 25, 0), ("up", 52, 1), ("up", 53, 1), ("down", 118, 1),
2 ("down", 119, 1), ("up", 52, 400), ("up", 53, 400), ("up", 40, 250), ("down", 119, 250)]

◆ REACH_RE

calibrate.REACH_RE = re.compile(r"(?m)^ScriptLog: PROBEREACH (\S+) \S+ (\S+) (\S+),(\S+),(\S+) ")

◆ REACH_X

int calibrate.REACH_X = 400

◆ SLIDE_ANGLES

list calibrate.SLIDE_ANGLES = [46, 50, 60, 70, 80]

◆ SLIDE_RISE

int calibrate.SLIDE_RISE = 400

◆ STEP_HEIGHTS

list calibrate.STEP_HEIGHTS = [16, 24, 28, 29, 30, 31, 32, 40]

◆ WALL_LANES

list calibrate.WALL_LANES
Initial value:
1= [(40, 0), (46, 0), (48, 0), (46, -20), (46, 20), (66, 0, (25, 39)), (70, 0, (25, 39)), (40, 0, None, 40),
2 (200, 0, None, 40)]