Post subject: Half-Life Hazard Course TAS
Joined: 8/10/2011
Posts: 8
Location: Sweden
Link to video Download 60fps H264, Thanks to coolkid for host My first TAS test with HL. Using scripts to control the pause function in-game to simulate slowmotion and frameadvance. Which works better than it may sound. I can choose any rate of slowmotion, 1/2, 1/3 ect. The pauses will not show up using "viewdemo" cmd for playback. Hovever "playdemo" cmd will play demo exactly as they were recorded. Pause slowmotion is also a perfect tool for perfect bunnyhops. Since every -command gets killed once the game is paused. That means i will get a fresh +jump each new frame the game proceeds. Frameadvance is used very rarely. Almost only for the objectboosts. This is mostly because I gotta run the game at +200FPS for best acceleration. And it would take some time to frameadvance at that rate. And of course a speedometer to assist me. I'm very new to this kind of stuff, but if you have any questions, ask. Enjoy! map - time Old real-time run by quad & ray 2:42.26 t0a0 57,56 t0a0a 48,41 t0a0b1 13,95 t0a0b2 8,66 t0a0c 21,32 t0a0d 12,36 TAS 2:18.06 t0a0 51,37 t0a0a 43,45 t0a0b1 10,25 t0a0b2 7,64 t0a0c 23,33 (18,08) t0a0d 2,02 (7,27)
//pause slowmo
alias p4us3on "pausable 1;w;alias _special p4us3;p4us3;bind k p4us3off;bind space +jump;developer 1"
alias p4us3off "alias _special;bind k p4us3on;bind space +bhop;developer 1"
alias p4us3 "pause;wait;pause;wait;special" //ratio

//advance
alias advance "pause;w;pause"

AR-boosts
//gateboost 86hp 15ap
alias +lj "fps_max 250;force_centerview;+duck;+jump;w;-jump;w10;cl_pitchup -125;+attack2;w;-attack2;cl_pitchup 89.999;force_centerview"
alias -lj -duck
//window
alias +lj2 "fps_max 250;cl_pitchdown 20;cl_pitchup -20;w;+duck;+jump;w;-jump;cl_pitchdown 89.999;w10;cl_pitchup -130;+attack2;w;-attack2;cl_pitchup 89.999;force_centerview"
alias -lj2 -duck
//toxic 45-25
alias +lj3 "fps_max 250;force_centerview;+duck;+jump;w;-jump;w3;cl_pitchup -115;+attack2;w;-attack2;cl_pitchup 89.999;force_centerview"
alias -lj3 -duck

//Triggerdelay
fps_max 200;lj;+moveleft;speak left;+jump;w300;w30;speak one;reset;+duck;+ag;+moveleft;w30;+moveright;speak right;w50;w20;reset;w50;w15;speak two;+forward;w10;reset;lj;+moveright;speak right;+jump;w200;speak three;reset;+moveleft;speak left;+jump;w100;w30;speak four;reset;;+forward;lj;w20;lj;w20;lj;w20;lj;w20;lj;w20;lj;w20;lj;w20;lj;w20;lj;+duck;w45;pause1;reset
Joined: 7/7/2011
Posts: 140
Location: Germany
nice idea and well executed!
How should I know what I think before I read what I post?
Tub
Joined: 6/25/2005
Posts: 1377
sweet, well done!
m00
Post subject: Re: Half-Life Hazard Course TAS
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
quvu wrote:
Pause slowmotion is also a perfect tool for perfect bunnyhops. Since every -command gets killed once the game is paused. That means i will get a fresh +jump each new frame the game proceeds.
Doesn't that mean that the run is impossible to replicate in real-time, even if you had perfect reflexes? Because in a real-time run you either can't get that fresh +jump on each new frame, or you would have to pause, which would add at least one additional frame to the run. In other words, technically speaking this is cheating.
Editor, Skilled player (1441)
Joined: 3/31/2010
Posts: 2113
Dear lord, this is awesome. I've seen many of those tricks before, but never quite to the optimization and perfection to a TAS. It only makes me more exciting, thinking about how the full game would look. And, how fast it'd be.
Post subject: Re: Half-Life Hazard Course TAS
Joined: 8/10/2011
Posts: 8
Location: Sweden
Warp wrote:
quvu wrote:
Pause slowmotion is also a perfect tool for perfect bunnyhops. Since every -command gets killed once the game is paused. That means i will get a fresh +jump each new frame the game proceeds.
Doesn't that mean that the run is impossible to replicate in real-time, even if you had perfect reflexes? Because in a real-time run you either can't get that fresh +jump on each new frame, or you would have to pause, which would add at least one additional frame to the run. In other words, technically speaking this is cheating.
Ofc it's possible to make perfect jumps in real-time. +jump the first frame you touch the ground. Thanks to you others. :>
Lex
Joined: 6/25/2007
Posts: 732
Location: Vancouver, British Columbia, Canada
That was great! I downloaded the 60-fps video and watched it. Awesome!
MESHUGGAH
Other
Skilled player (1920)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Some questions and tips: #1 - Did you used TAS-Life? I already wrote at sda thread that it isn't the best choice since it's still has communication during pauses and makes real TAS techniques uneffective (just like jumpbug). #2 - Host_framerate 200? developer 1? Both of them f***s up the physics, making them impossible to do it realtime or even TASed on legal settings. Also most of the time you didn't make use of strafing in the air (80% of the run, here are some times on the video where you could apply it to be faster (maybe 10+ secs improvement?): 0:18, 0:31, 0:37, 0:50, etc etc)). Also you slowdown at ladderjump which could be much faster with right accelerating, you could apply some ground strafe even there. 1:00 you could strafe more to advance the gap since you already have the LJ module 1:05 you slowdown again at the ladder, it's faster with S+D+45 degree to South+East on ladders. I also think ladderbhop could be inserted here 1:29 start bunnyhopping before waiting the door to gain frames or +1 sec. 1:30~1:53 sometimes you lose some frames because of very sharp turns, they must be calculated 1:52 you should try to jump on the fence and strafe more to skip the water and instantly do grenade boost 2:10 you could try to press both buttons in 1 jump without slowing down that much 2:18 I never saw that you can completely skip the barney spart. I would like to know how did you achieved that. It was a good run btw for your first time, keep up the good work. edit: also the "wait" in HL is not the best, the more wait you insert the more will desynch (you will have to wait to processs your next series of input through command line).
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 8/10/2011
Posts: 8
Location: Sweden
MESHUGGAH wrote:
lots
Relax some, this wasn't that a serious project. It was made only within few days. But i still doubt that its improvable with 10s with better strafing only. #1 I didn't use TASmod. But I used techniques from it (pause cmd to simulate). It had some problems with the toggling for slowmo and different modes. So I did it just as good with my own aliases. Is there any other "choices"? mousesupport to hourglass? ^_^ I'd really like to see a frame perfect run of HL. Each frame with calculated angle for optimal accel. #2 host_framerate 0 (off, default). fps_max 250, mostly. Why would fps change anything from realtime? I know the strafing isn't perfect. but also strafing more makes the path longer, and in some cases slower. 1:00 didn't understand that one. 1:05 I belive freefalling down is faster than dual-vector the ladder. Ya I think I could use the ladder to get the speed required to make a LJ. 1:29 A LJ is instantly 560ups. And to make a bhop to be faster for that short distance coming; door to wall. It would have to be perfect timing in under the door, which i felt wasn't worth it. 1:30~1:53 yes this is a the part im most unsatisfied with. i don't believe its too sharp, but i could add more intense strafing. 1:52 LOL, I gotta get into the water to change level. 2:10 The second button cannot be activated until the doors are fully open. thats why the path is straight to the first one. 2:18 trigger_changelevel wont occur until the running alias runs out. so i can reposition myself to a spot where the maps are overlapping. hence spawn outside the barney part. some examples: http://www.youtube.com/watch?v=AKIpyz0EjuY#t=11m56s http://www.youtube.com/watch?v=8FVIjZ4Dc74 sorry for the english, im pretty tired. Using wait's is not a huge problem. as long as you dont use a bunch of them in same in same line. especially not at 250fps. but they are very accurate for the boost scripts ect. they're also needed to perform the triggerdelay trick. Thanks for review.
MESHUGGAH
Other
Skilled player (1920)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Just to clarify, I know that it's just a start of something "new", everything I say is just for helping you.
quvu wrote:
Is there any other "choices"? mousesupport to hourglass? ^_^ I'd really like to see a frame perfect run of HL. Each frame with calculated angle for optimal accel.
In the future. Perfect run needs some reverse engineering for more groundbreaking TAS only techniques like jumpbug. Also it's still not documented that how the floating point error changes different frictions and acceleration. There are many bugs with HL that makes impossible to do a frame perfect run through aliases/cmds (the smallest FPS change changes everything!).
quvu wrote:
#2 host_framerate 0 (off, default). fps_max 250, mostly. Why would fps change anything from realtime? I know the strafing isn't perfect. but also strafing more makes the path longer, and in some cases slower.
As I mentioned, the floating point error also changes acceleration (speed). One of the fastest way to increase speed depending on settings (for HL: sv_airaccelerate 10, sv_airmove 1) is doing very rapid "degree mirroring". To understand what I'm talking about, try alternating the view offset through every frame to the opposite side for example: (only pseudo code) Frame 0: cl_yawspeed 300 or something high Frame 1: +moveleft; +left; Frame 2: -moveleft; +right; +moveright; Frame 3: -moveright; +moveleft; +left Watch this (notice it's counter-strike and different thing, but you will understand what I'm talking about): http://www.youtube.com/watch?v=s8Zq0e4NPqA timing notes: 1:00 didn't understand that one. -> you could jump earlier and strafe more to advance the gap because jumping with it is faster than bunnyhopping. 1:05 I belive freefalling down is faster than dual-vector the ladder. Ya I think I could use the ladder to get the speed required to make a LJ. -> I think that ladderbhop (jumping down from the ladder with maximum 299.999 prespeed then jumping on the floor) is also helps you to complete faster this part, maybe I'm false, I only watched the video 2 times. 1:29 A LJ is instantly 560ups. And to make a bhop to be faster for that short distance coming; door to wall. It would have to be perfect timing in under the door, which i felt wasn't worth it. -> I didn't know there's a trick that adds more speed at doors to the LJ.* 1:30~1:53 yes this is a the part im most unsatisfied with. i don't believe its too sharp, but i could add more intense strafing. 1:52 LOL, I gotta get into the water to change level. -> Really? I played ages ago but I thought it's enough to jump near to the end of the water, sorry 'bout that. 2:10 The second button cannot be activated until the doors are fully open. thats why the path is straight to the first one. -> Same as above. 2:18 trigger_changelevel wont occur until the running alias runs out. so i can reposition myself to a spot where the maps are overlapping. hence spawn outside the barney part. some examples: http://www.youtube.com/watch?v=AKIpyz0EjuY#t=11m56s http://www.youtube.com/watch?v=8FVIjZ4Dc74 sorry for the english, im pretty tired. -> Well yes. That was I wrote about aliases/cmds f***ks up things in HL. I'm pretty sure there are more abusable tricks for this.
quvu wrote:
Thanks for review.
Your welcome. I think I will find some time to find other tricks at aliases. Also I will write up some formulas I found out for HL physics, I'm pretty sure they will be useful for frame wars also.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 8/10/2011
Posts: 8
Location: Sweden
Cool man! However the only efficient scripts I've seen on youtube are using 100 airaccelerate (script doesn't have to bee that accurate to be effective I guess?). And also fps values were the game runs in slowmotion, which is pretty ironic for a speedrun. 299,999 is the maximum speed before the cap in counter-strike I believe? which is irrelevant here. Max laddervelocity is 400. However the LJ module is 560. I'd really like to know if you find some nice stuff :> cheers
MESHUGGAH
Other
Skilled player (1920)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Well yes, I used to play Counter-strike that's why I wrote the bad pre. Here's an sda thread about HL + TAS: http://forum.speeddemosarchive.com/post/half_life_tas.html (I'm OlikA @ sda, that was the thread actually made me discover and join to tasvideos)
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 8/10/2011
Posts: 8
Location: Sweden
MESHUGGAH wrote:
Well yes, I used to play Counter-strike that's why I wrote the bad pre. Here's an sda thread about HL + TAS: http://forum.speeddemosarchive.com/post/half_life_tas.html (I'm OlikA @ sda, that was the thread actually made me discover and join to tasvideos)
Cool, that makes sense. I'm quadrazid @SDA obviously, I was following that thread as well. I didn't have that much knowledge back then though. I find it amusing that I was right about this one :> link
MESHUGGAH
Other
Skilled player (1920)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
quvu wrote:
I find it amusing that I was right about this one :> link
+++ As soon as I can go home I will search up my personal notes about HL engine, mostly about movement and speed change, frames and some glitch searching.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
MESHUGGAH
Other
Skilled player (1920)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
I couldn't find all of them, but here's some informations: General, already known tricks/glitches other than SDA threads: http://xtreme-jumps.eu/page.php?59 (Counter-Strike kreedz tutorial, strafing and movement tricks) http://www.fortress-forever.com/fpsreport/ (FPS changes) Speed can be altered by many things: - the position you are standing (whole numbers versus floating points) - the view angles you are facing (same. there's even difference between 0 and 90 degree) - the buttons you press and their timing (as far as I know, the inputs are polled more than once / frame) - FPS The smallest rotation (mouse movement/+left&+right) in the game is 360 degree/65536 (smallint) = 0.005493. Notice that the floating point error sometimes doesn't let you do that small rotation. The fastest speed of wallrub can be gained by standing besides a wall and looking it with 27,15820312 degrees (-62,84179687 degrees is a bit slower but it's depends on what buttons you press and position). General techniques to be faster all the time - Use "standup" bhops (1st link 8.2 section): gives a vertical boost (of 2 units maybe?) that also makes the jump longer and higher, even in consecutive rows. - Strafing very rapidly (frame by frame) in the air gives you a huge boost to jump much longer. I don't have 100% correct formula, so I just leave this: To gain speed, you have to press the same direction button you are facing (A at left, D at right). You can only do small angle changes at slow speed and higher angle changes at fast speed. So you have to dynamically increase the viewangles from frame to frame. Just to show the greatness of this trick: A normal jump in Counter-Strike with 0 strafes is 215 unit while strafing 8 is 257. Now consider that in HL you move faster. Sounds great, isn't it? - To start bhopping faster, you can do a standup countjump (1st link 12.0 section): +duck for one frame, +duck before touching the ground, -duck when touched the ground and +jump. This way you can increase your speed while falling down and get extra 2 units vertical height and jump much longer. - You can "surf/slide" (1st link 7.0 section) in the pipes, sometimes it could be faster then bhop with slowdowns (0:47~0:52 in your TAS). However this is really depends on specific scenarios. Just a slight trick. I will look up HL again later.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 8/10/2011
Posts: 8
Location: Sweden
Hows it going meshuggah? anything new? lol, i almost feel offended getting linked to a tuturial, i'm not that noob. Most of that other stuff is for CS only anyway (wallrub, standup bh ect.) And using cj start in HL would only be applicable to get better distance/pattern to an obstacle i think. And in fact, I do surf in the pipes a bit, but the slope is not high enough, so surfing all way through would be slower. And I'm not sure if its even any slowdown in there. Now to the interesting part, frame by frame strafing. Of all the clips on youtube of this kind of stuff, 99% is done with 100airaccelerate. I've tried this and its not very sensitive about the yawspeed. Compared to default 10airaccelerate, which is extremely sensitive. I would need some kind of yawspeed/ups ratio to make this perfect. Any ideas how to calculate this?
MESHUGGAH
Other
Skilled player (1920)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
quvu wrote:
Hows it going meshuggah? anything new?
I mostly do/did other stuffs (rockin kat's @ DTC4, battletoads).
quvu wrote:
lol, i almost feel offended getting linked to a tuturial, i'm not that noob. Most of that other stuff is for CS only anyway (wallrub, standup bh ect.) And using cj start in HL would only be applicable to get better distance/pattern to an obstacle i think.
Both wallrub and standup works in HL. Everything which shown there works in HL too. Counter-Strike only modified the maximum player speed and maybe the sideway speeds. You can test it by putting AMXMOD and downloading any ljstats for CS, it will show the correct values for HL too (I tested it long time ago, but if it doesn't work, I can write a plugin for you). I submitted a demo on SDA which shows the ability to jumpbug (which I did without tool assisting), IIRC it showed the speed values.
quvu wrote:
And in fact, I do surf in the pipes a bit, but the slope is not high enough, so surfing all way through would be slower. And I'm not sure if its even any slowdown in there.
It's hard to surf in 10aa (original, default value that both HL and CS uses by standard). But it's can be used for avoiding damage by surfing on even very small slopes to decrease the speed. Also it's faster to get maximum speed (if it's very long and you can move downward while surfing, therefore it's depends on the surface/part).
quvu wrote:
Now to the interesting part, frame by frame strafing. Of all the clips on youtube of this kind of stuff, 99% is done with 100airaccelerate. I've tried this and its not very sensitive about the yawspeed. Compared to default 10airaccelerate, which is extremely sensitive. I would need some kind of yawspeed/ups ratio to make this perfect.
Yes, but it's works on 10aa too. The main difference between 10aa and 100aa is that you have to be perfect, otherwise you lose speed if 1. moving the mouse in the wrong way (pressing A and mouse to right/pressing D and mouse to left) 2. moving too fast with the mouse 3. pressing forward longer than it required (you should immediatly stop W when you jumped) 4. ducking and strafing (will decrease dramatically) I still didn't calculated the correct ratio, but I'm sure that it's depends on the actual speed. You can only do small strafes when you have small speed, but you can do "higher" strafes (moving the mouse much more to the left/right) if you have high speed. Therefore, you have to dinamically increase the "distance" of your mouse movements as the speed increases.
quvu wrote:
Any ideas how to calculate this?
I already tried to calculate the HL's ratio of this, but it's ridiculous. The game does input polling many more times (more than 3 times) per frame, IIRC it polls mouse more often than the keyboard. I also couldn't have luck with the cl_yawspeed (getting out of sync because of the slightiest frame drop changed the turning). There are too many factors that changes the speed/distance, so I can't come up with correct values. I tried other techniques (making a plugin which reads an input file and interprets it from frame to frame, making an EXE that does some keybd_data) but all of them failed because of various frame drops.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 8/10/2011
Posts: 8
Location: Sweden
MESHUGGAH wrote:
quvu wrote:
Hows it going meshuggah? anything new?
I mostly do/did other stuffs (rockin kat's @ DTC4, battletoads).
ok, now it's time for HL then :D
MESHUGGAH wrote:
quvu wrote:
lol, i almost feel offended getting linked to a tuturial, i'm not that noob. Most of that other stuff is for CS only anyway (wallrub, standup bh ect.) And using cj start in HL would only be applicable to get better distance/pattern to an obstacle i think.
Both wallrub and standup works in HL. Everything which shown there works in HL too. Counter-Strike only modified the maximum player speed and maybe the sideway speeds. You can test it by putting AMXMOD and downloading any ljstats for CS, it will show the correct values for HL too (I tested it long time ago, but if it doesn't work, I can write a plugin for you). I submitted a demo on SDA which shows the ability to jumpbug (which I did without tool assisting), IIRC it showed the speed values.
At least wallstrafe as its called in HL have different angle than the cs-wallrub. The original wallstrafe was "removed" from counterstrike back in 1.3 or so. And I must admit im not sure about the details of standups. In CS you loose height after a few bhops? However, Im pretty sure that is not the case in HL.
MESHUGGAH wrote:
quvu wrote:
And in fact, I do surf in the pipes a bit, but the slope is not high enough, so surfing all way through would be slower. And I'm not sure if its even any slowdown in there.
It's hard to surf in 10aa (original, default value that both HL and CS uses by standard). But it's can be used for avoiding damage by surfing on even very small slopes to decrease the speed. Also it's faster to get maximum speed (if it's very long and you can move downward while surfing, therefore it's depends on the surface/part).
Yeah, thats what i meant with the slope being to low in height.
MESHUGGAH wrote:
quvu wrote:
Now to the interesting part, frame by frame strafing. Of all the clips on youtube of this kind of stuff, 99% is done with 100airaccelerate. I've tried this and its not very sensitive about the yawspeed. Compared to default 10airaccelerate, which is extremely sensitive. I would need some kind of cl_yawspeed/units per second ratio to make this perfect.
Yes, but it's works on 10aa too. The main difference between 10aa and 100aa is that you have to be perfect, otherwise you lose speed if 1. moving the mouse in the wrong way (pressing A and mouse to right/pressing D and mouse to left) 2. moving too fast with the mouse 3. pressing forward longer than it required (you should immediatly stop W when you jumped) 4. ducking and strafing (will decrease dramatically) I still didn't calculated the correct ratio, but I'm sure that it's depends on the actual speed. You can only do small strafes when you have small speed, but you can do "higher" strafes (moving the mouse much more to the left/right) if you have high speed. Therefore, you have to dinamically increase the "distance" of your mouse movements as the speed increases.
Yeah, the turnangle for each frame, for each speed speed differs a lot. that was kinda the point.
MESHUGGAH wrote:
quvu wrote:
Any ideas how to calculate this?
I already tried to calculate the HL's ratio of this, but it's ridiculous. The game does input polling many more times (more than 3 times) per frame, IIRC it polls mouse more often than the keyboard. I also couldn't have luck with the cl_yawspeed (getting out of sync because of the slightiest frame drop changed the turning). There are too many factors that changes the speed/distance, so I can't come up with correct values. I tried other techniques (making a plugin which reads an input file and interprets it from frame to frame, making an EXE that does some keybd_data) but all of them failed because of various frame drops.
For now, I do with cl_yawspeed and +left/+right. If you have FPS somewhat in level, I think it would work out quite well. At least for the effort. And probably a lot faster than a manual human. I just have a "+moveright;+right..." script going constantly. And have an ascending/descending alias to manually alter the yawspeed (with 100 differentials maybe) as the velocity changes. I'd be glad to hear if you find more info.
MESHUGGAH
Other
Skilled player (1920)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
quvu wrote:
At least wallstrafe as its called in HL have different angle than the cs-wallrub. The original wallstrafe was "removed" from counterstrike back in 1.3 or so. And I must admit im not sure about the details of standups. In CS you loose height after a few bhops? However, Im pretty sure that is not the case in HL.
You are right, I forget that. Wallstrafe is different in HL.
quvu wrote:
I just have a "+moveright;+right..." script going constantly. And have an ascending/descending alias to manually alter the yawspeed (with 100 differentials maybe) as the velocity changes. I'd be glad to hear if you find more info.
As I said about keybd_events: http://pastebin.com/KJxgPB8p. I didn't debugged HL so that's why I didn't implemented the actual framerate as a constant. Also this was only an experiment, it lacks the high frequency timer too and the dynamically changing yawspeed.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Joined: 10/31/2006
Posts: 134
The OP's video was pretty damn awesome! More!
Joined: 2/3/2013
Posts: 320
Location: Germany
All syllogisms have three parts, therefore this is not a syllogism.