|
OpenUT99-Plus
Unreal Engine 1, rebuilt from scratch
|
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+) ") | |
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.
| calibrate.air_report | ( | tracks | ) |
{lane: (horizontal acceleration while falling, top horizontal speed)} from the falling samples.
| calibrate.build_lanes | ( | mapgen, | |
| kind ) |
| calibrate.compile_probe | ( | mapgen | ) |
| calibrate.entry_report | ( | tracks | ) |
{lane: (speed along the slope on the first three falling ticks after walking, highest z)}.
| calibrate.lane_of | ( | y | ) |
Lane index of a y coordinate (nearest lane centre).
| 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.
| calibrate.main | ( | argv | ) |
| calibrate.over | ( | rise, | |
| rest_z, | |||
| top ) |
| calibrate.parse_log | ( | text | ) |
Probe lines -> {pawn name: [(t, x, y, z, physics, vx, vy, vz)]}, in log order.
| calibrate.reach_report | ( | text | ) |
{lane: pointReachable answer}, from the PROBEREACH lines.
| calibrate.rises | ( | kind | ) |
| calibrate.run_ours | ( | ut_script, | |
| game, | |||
| map_name, | |||
| seconds ) |
| calibrate.run_server | ( | game, | |
| map_name, | |||
| seconds, | |||
| log_path ) |
| calibrate.size_label | ( | lane | ) |
| calibrate.size_tag | ( | lane | ) |
| 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).
| calibrate.step_report | ( | tracks, | |
| walk_from = 0.5 ) |
{lane: (rest z before walking, highest z while walking)} for the steps map.
| calibrate.wall_report | ( | text | ) |
{lane: (first PickWallAdjust result, Destination it left, x of that call, farthest x reached, physics after)}.
| 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.
| calibrate.ADJ_RE = re.compile(r"(?m)^ScriptLog: PROBEADJ (\S+) (\S+) (\S+) (\S+) (\S+) (\S+)") |
| list calibrate.AIR_CONTROLS = [0, 0.05, 0.2, 0.35, 0.6, 1.0] |
| int calibrate.AIR_Z = 1800 |
| list calibrate.ENTRY_LANES = [(46, 100), (46, 200), (46, 300), (46, 400), (46, 600), (55, 400), (65, 400), (80, 400)] |
| int calibrate.ENTRY_RISE = 300 |
| int calibrate.FLOOR = 0 |
| int calibrate.GRAVITY = 950 |
| calibrate.HERE = os.path.dirname(os.path.abspath(__file__)) |
| calibrate.LANE_GAP |
| calibrate.LANE_Y0 |
| list calibrate.LEDGE_LANES |
| 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"} |
| calibrate.PROBE_RE = re.compile(r"(?m)^ScriptLog: PROBE (\S+) (" + r"\S+ " * 7 + r"\S+)") |
| list calibrate.RAMP_ANGLES = [30, 40, 44, 46, 50, 55, 60] |
| int calibrate.RAMP_RUN = 192 |
| list calibrate.REACH_LANES |
| calibrate.REACH_RE = re.compile(r"(?m)^ScriptLog: PROBEREACH (\S+) \S+ (\S+) (\S+),(\S+),(\S+) ") |
| int calibrate.REACH_X = 400 |
| list calibrate.SLIDE_ANGLES = [46, 50, 60, 70, 80] |
| int calibrate.SLIDE_RISE = 400 |
| list calibrate.STEP_HEIGHTS = [16, 24, 28, 29, 30, 31, 32, 40] |
| list calibrate.WALL_LANES |