Posts for dan

dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Yes vote from me. I understand that some people don't like the glitched movement, but I think there was good movement for both vanilla and "glitched". For vanilla movment, the jump through the room after Crocomire and the moonfall to the waterway E-tank were both extremely satisfying to see. For the so-called glitched movement, the red tower "climb" and the post-Shaktool spark were also satisfying, at least for me. I will say, that I got to see preview some of the strats ahead of time, with days of buffer in between. When I watched the full TAS back all at once, I kind of realized just how much happens so quickly. Lag reduction was also entertaining for me. I liked how the zeelas died during the entry into Kraid's Warehouse. The Mickey mouse room "clean-up" was absolutely amazing. I am a fan of seeing enemies that are out of the way suddenly exploding. Also, I would like to talk about the grinding for item drops, because I think that was the most time-consuming portion of this TAS. Some sections had to be re-done to pick up extra health, and then be re-done a second time because it still wasn't enough health. I remember thinking at one point "Sniq is pushing Super Metroid to it's limits, but grinding for RNG is pushing Sniq to his limits". Finally, let's talk about the routing of this run. There are notable routing improvements:
  • 1 less trip to Norfair (two elevator rides)
  • Spineshark up two elevators
  • Removed both pauses to refill health from reserves
    • Added one pause to skip the Wrecked Ship Bowling statue
  • Botwoon and Golden Torizo skip
There is not much backtracking in this route, and the number of potential routing improvements are minimal:
  • Early collection of the waterway E-tank
  • Green gate glitch for right facing gates (Reverse Maridia entry and possibly Crocomire escape item)
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
moozooh wrote:
Withholding my vote and further comments until the Mother Brain 2 situation is solved (dan?).
I am a little disappointed that you inserted me into this the way you did. This is Sniq's time to shine, and this thread should be about him. That being said, I am in the process of writing a program to go through all the possible attack patterns for a given MB2 fight. The program is not ready yet, I do not know when it will be, I will keep making progress on it when I can. Suppose 20 frames could be saved. My understanding from talking to Sniq is that any changes to the MB2 fight would be part of a separate submission. You should not withhold your vote or comments because of me.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
This was a good game choice and an excellent TAS. Usually I watch two or three minutes of a TAS, get bored, and stop watching. I noticed I was still watching 20 minutes later, and decided to watch until the end. Yes vote for me.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
The first time I watched this TAS, generally speaking I loved the overworld and hated the underworld. I feel like this deserves more than a Meh though, based on all the effort put in, so I decided not to vote. Watching the TAS a second time, I was able to figure out that my main complaint is the lack of combat. If you ignore the required boss deaths, and the incidental deaths of enemies that are in Link's dash path and only one hit, there were 10 enemy deaths by my count. Four while farming rupees, three in ice palace, one guard dying off-screen, one guard after using the flute, and the vulture in the Bombos cutscene. Perhaps it would have been more enjoyable as a pacifist run. The low points for me were running under the back of Skull Woods, and dashing to Trinexx from Vitreous. The only interesting part of the underworld for me was when you were juggling Desert Palace and Thieves Town at the same time, and right when you were near the Power Gloves, you switch direction and pick up the Titan's Mitts instead. Also, I found it amusing when you went from Turtle Rock to Catfish, to pickup the medallion required for opening Turtle Rock. I was not a fan of the dam shenanigans however.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
I don't have the game anymore, unfortunately. But thank you for answering my question without making me feel too stupid :)
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
My brother found a shortcut on The Abyss about 20 years ago, it looks like no one is using the skip. I am not sure whether it is known or not. He used Mars Guo to do the skip because he had highest top speed by default. Based on the video below, there's a shortcut from about 25s to 58s on the lap timer for the first lap of the Abyss. This is from about 41s to 1:14s on the split timer. - It starts about when the split timer is 41.20 and race timer is 25.10. You can see the end of the track in the background to the left. - It ends about when the split timer is 1:14.56 and the race timer is 58.27. You can see the beginning of the track down to the left. Link to video To do the skip, before the track curves to the right, activate a full boost, and drive up the left wall. Even though it is see-through, it can be used like a ramp. You will catch some air, and can end up landing on the platform before the end of a lap. With a tight enough turn, you can have enough momentum to land on the last platform without falling.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
You might want to have a look at a Youtube video called "MarI/O - Machine Learning for Video Games" by Seth Bling. There are actually a couple machine learning examples when you Google the title. The initial video also has a link to the lua file used in the description. As for integrating torch into Bizhawk however, I have no idea about that.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Yes vote from me. I don't know much about the game, but I liked how both the movement and the attacks kept changing.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
I figured it might be more helpful if I post my final solution, complete with the processing script too. Using Git Bash on Windows, it processes ~1,000 frames per hour. Linux is probably faster, but you can kick off both scripts, start a TAS, and collect all the data hands-off. I'm sure there's a better way to sync the scripts other than testing that a file exists, but it's good enough for now. Download trace-every-frame.lua
Language: lua

local FILENAME_PATTERN="C:\\ALL\\YOUR\\TRACE\\LOGS\\GO\\HERE\\%s\\frame-%06d.trace"; local DIRECTORY="TESTING"; -- Directory C:\ALL\YOUR\TRACE\LOGS\GO\HERE\TESTING must already exist function file_exists(file) local f = io.open(file, "r") -- Note: If you stop this Lua script at the wrong time, you may need to close lsnes in order to delete this file. if f then f:close() end return f ~= nil end function on_frame() local fiveFrameEarlier=(movie.currentframe()-5); if (fiveFrameEarlier > 0) then traceLogFile_fiveFramesEarlier=string.format(FILENAME_PATTERN, DIRECTORY, fiveFrameEarlier); local idle=file_exists(traceLogFile_fiveFramesEarlier); while idle do -- lsnes spits out the trace logs faster than the other script can process them -- if lsnes is more than 5 frames ahead of the processing script, -- then do nothing until the processing script catches up delay=123456; while (delay > 0) do delay=delay-1; end; idle=file_exists(traceLogFile_fiveFramesEarlier); end; end; exec("tracelog cpu " .. string.format(FILENAME_PATTERN, DIRECTORY, movie.currentframe())); end function on_frame_emulated() exec("tracelog cpu"); end
Download process-trace-logs.sh
Language: shell

function processTraceLog { traceLogToAnalyze="$1"; matchLines=$(grep '^[0-9a-f]\{6\} \(\(st\|ld\)a \$0123\|jsl $456789\)' $traceLogToAnalyze | grep -v '^\(123456\|789abc\|def012\)'); numMatches=$(echo "$matchLines" | grep -c '.'); echo "$traceLogToAnalyze:$numMatches"; if [ $numMatches -gt 0 ]; then echo "$matchLines" | cut -b -36 | sed 's/^/ /g'; fi; # cannot delete current file if the Lua script is checking to see if it exists while [ -f $traceLogToAnalyze ]; do rm 2>/dev/null $traceLogToAnalyze; sleep 1; done; } touch output.log; while [ 1 -eq 1 ]; # infinite loop do if [ $(ls -1 *.trace | wc -l) -gt 1 ]; then # the next trace file has started, so the previous is finished processTraceLog $(ls -1rt *.trace | grep -v 'output.log' | head -n 1) | tee -a output.log; fi; done;
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
That was incredibly helpful. Thank you. Finished script:
local FILENAME_PATTERN="C:\\ALL\\YOUR\\TRACE\\LOGS\\GO\\HERE\\%s\\frame-%06d.trace";
local DIRECTORY="TESTING"; 
-- Directory C:\ALL\YOUR\TRACE\LOGS\GO\HERE\TESTING must already exist

function on_frame()
  exec("tracelog cpu " .. string.format(FILENAME_PATTERN, DIRECTORY, movie.currentframe()));
end
function on_frame_emulated()
  exec("tracelog cpu");
end
Post subject: Lua command to control the tracelogger
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
I would like to create frame-specific trace logs for semi-automated analysis of existing TASes. My idea is to have a separate process grep for a couple things from each trace log, save that information elsewhere, and delete the frame-specific trace log. That way, I can start the Lua script, play a section of the TAS, go do something, and have results to look at when I come back. From there, I can identify frames of interest for further analysis. Some ideas include calculating the percentage of idle instructions in each frame for lag reduction, as well as identifying the multiple areas of code where the game reads the RNG variable. I read the Lua documentation and did not see a Lua method available to control the tracelogging. Would it be difficult to change lsnes-bsnes to expose this via a Lua command? In the past, I have copy-pasted the output from the tracelogger window, and cut the tracelog apart via a script. This still requires some manual effort. Having separate trace log files would require less disk space, and maybe even cause less I/O overhead too. Sample Lua script
local PROCID_CPU=0; 
function on_frame()
  -- Not valid Lua
  debug_context::tracelog(PROCID_CPU, string.format("C:\\Path\\To\\My\\Trace\\Logs\\frame-%06d.trace", movie.currentframe()));
end
on_frame_emulated()
  -- Not valid Lua
  debug_context::tracelog(PROCID_CPU, "");
end
Sample Log output
Loaded 'C:\Path\To\Someone\Elses\TAS\finished-tas.lsmv' in 549032 microseconds.
Tracelogging processor #0 to 'C:\Path\To\My\Trace\Logs\frame-000165.trace'
Stopped tracelogging processor #0
Tracelogging processor #0 to 'C:\Path\To\My\Trace\Logs\frame-000166.trace'
Stopped tracelogging processor #0
Tracelogging processor #0 to 'C:\Path\To\My\Trace\Logs\frame-000167.trace'
Stopped tracelogging processor #0
  .
  :
Thanks.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Memory wrote:
If they HAD to give an opinion why would the poll be anonymous to begin with. Also again there are very valid reasons to not like this specific Super Metroid TAS. For example they may be fans of less glitchy prior TASes.
What if I am butthurt that IGT optimization fell out of favor for RTA optimization. Can I vote No out of spite? Can I vote No twice if I have two accounts? P.S: I am playing the devil's advocate here. I voted Yes, and I've already told Sniq many times that he does great work. P.P.S: I don't mean to drag this thread off-topic, so let's get back to feedback on the TAS.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Before I vote No, I did want to recognize that clearly a lot of time and hard work to make this TAS. Being able to push the game like this is far from trivial. I would describe the TAS both as art, and also not entertaining. I agree with "lengthy and dry" as well. My main concern is the repetition, both with the glitches, and revisiting the areas. I am sure everything was necessary from a technical standpoint, but I could not follow the route at all. In fact, I thought I was finally getting a hang of the route when you were almost to the Spirit Temple boss, but then you backtracked into earlier parts of the dungeon before proceeding to the boss. The most entertaining parts for me was when Link was floating high above the Gerudo Desert as Epona trampled the Gerudo guards, and also a surprise pop song on the ocarina. The down time of this TAS was all the setup for the tricks, like using Farore's Wind to load at an unexpected position, the bomb hovering, or playing a song using an item other than the ocarina.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
mkdasher wrote:
Also I have another question, everytime frameadvance is called the whole lua is cleared. Is there a way to refresh the lua manually and only update it when I want to?
I was operating under the assumption that reading memory is the slow part. My idea was to read the memory on certain frames, and stick them in a local Lua variable so it can be drawn every frame. Also, after seeing where you are going, I underestimated just how much you were doing. Wow.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Amaraticando wrote:
I don't see how any of the events would help, since there's no gui/on_paint event. Using onframestart or onframeend will call the registered function as often as putting it inside a while loop.
There are other events like event.onmemoryread and event.onmemorywrite. I specifically gave a partially correct answer to encourage going to the link and reading about the other events. I have not used them, but I'm guessing they would be analagous to what mkdasher mentioned above
mkdasher wrote:
emu.registerafter() for memory reading / writing and calculations.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
mkdasher wrote:
When I do lua scripts on Desmume I usually call gui.register() to draw stuff, and emu.registerafter() for memory reading / writing and calculations. Is there any similar solution in Bizhawk?
See http://tasvideos.org/BizHawk/LuaFunctions.html, specifically the event tab. The following works, although you may need a command to unregister the function if you reload the script. I've noticed a weird quirk where you have multiple definitions of the same function and the workaround is to manually clear the registered functions.
local function mkdasher()
  .
  :
end

-- define an anonymous wrapper function that calls the named function
event.onframestart(function() mkdasher() end, "mkdasher")
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
You mentioned this is an autoscroller, how much time does the speed upgrade save? You may want to consider not collecting any items/upgrades as a goal of your TAS. Also, if you don't want to take damage in certain areas, if possible, consider not taking any damage at all, also a goal for the TAS.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Yes vote from me. I thought I kept up with Super Metroid well enough that I would have a good idea what Sniq's "crazy route" was going to be, but I was caught completely off guard and ended up thinking to myself "Hacks! Lies!"
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
I had an idea for a new TAS route for 100%, but I would like to bounce it off everyone here before I try anything, especially since I have not done any TASing. This route would be PRKD like Any% Speedruns, but collect Wrecked Ship Reserve Tank, then Grapple Beam, then Speed Booster. Route: 1. Early game a. Standard Early game b. Go up Red Tower, grab both PB packs, then up to Crateria c. Bomb jump to get Crateria Power bombs 2. Wrecked Ship a. Doppler Phantoon, clear out the Wrecked ship as normal b. At Bowling, do the Reserve Tank cutscene skip rather than Robot Flusher c. Crystal Flash at Gravity suit to get a spike suit. Samus will already be low on health d. Use wall jumps and the spike suit to get the Wrecked Ship Reserve Tank 3. Norfair a. Crystal flash spike suit on the elevator into Norfair b. Go for ice beam and mock ball under gates c. Get ice missiles, then use the next Norfair elevator spark suit to get to Crocomire d. Clean up Crocomire area, and return to Business Center, grab high jump boots (As much as I would love to see high jump room done counter-clockwise starting with a speedball, it's probably slower to pick up High Jump boots the second time through and/or do the room backwards) e. Hell run for Speed Booster and Wave Beam f. Enter Lower Norfair like Any% Speedruns g. Do Lower Norfair like 100% TAS (although without Plasma Beam) h. Exit Lower Norfair, clean up Bubble Mountain, leave through Frog Speedway 4. Kraid (like 100% TAS) 5. Maridia (like 100% TAS, with spring ball improvement) 6. Final clean up a. Head back to Green Hill Zone, grabbing X-ray scope on the way b. Clean up Pink Brinstar and double back to GHZ c. Clean up Blue Brinstar like 100% TAS d. After the "Final Missile Pack", detour to the gauntlet 7. Tourian Edits: Moved X-ray scope from 3a to 6a, also fixed numbering on bullet 3, removed question about ice beam
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
It looked like you were moving as fast as you can, and did not have any unnecessary backtracking. My favorite part was towards the end of Level 19. Yes vote.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Spikestuff wrote:
Ridley & Mother Brain kinda brought everything to a stop. Sorry but I have to vote Meh on this.
They could have done a 12% TAS without Charge beam...
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
I can't vote, but I would have voted yes. The multiple deaths was a little lame, but the movement remained interesting the entire time.
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
I would have voted Meh if I had the option. A minute into the run, you establish already that you can fly, at constant speed, over or plow through the enemies with no trouble. Unfortunately, that's what happens for the rest of the run too. My favorite parts were when you broke this monotony, namely taking damage from a Medusa Head and breaking open the four secret walls. Finally, there wasn't much to appreciate aside from firing rapidly with 100% accuracy. This run was so safe, there were no seemingly close calls or danger. You spawned almost every heart and collected almost none of them, as if to say "Look how easy this is".
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
At 36:18, you enter the red palace and immediately go down two floors on the elevator. Is there a reason why you cannot crouch stab on the first screen like you do almost every other time you are going down an elevator?
dan
He/Him
Experienced Forum User
Joined: 9/23/2016
Posts: 25
Thanks for the picture, it was really helpful.
  1. I am making the same assumption that stages take approximately the same time to complete.
  2. My solution also has 6 passes and two small clean-ups, but I have 16 replays instead of 31.
Legend
*<stage>  means replaying this stage
duplicate means replaying two consecutive stages
1-?? could mean 1-08 or 1-12
4-?? could mean 4-03 or 4-11
END means end of the pass
Stats
124/108 stages, 16 replays, 1 duplicate (3-E2 -> 4-06)
Routing
Pass 1 (23 stages, 0 replays, 0 duplicates)
 1-01 -> 1-07 -> 1-08 -> 1-14 -> 1-15 -> 1-A3
      -> 2-12 -> 2-13 -> 2-14 -> 2-15 -> 2-C
      -> 3-01 -> 3-06 -> 3-14 -> 3-E2
      -> 4-06 -> 4-14 -> 4-13 -> 4-G
      -> 5-06 -> 5-07 -> 5-22 -> 5-29 -> END

Pass 2 (20 stages, 1 replays, 0 duplicates)
*1-01 -> 1-02 -> 1-03 -> 1-04 -> 1-09 -> 1-11 -> 1-?1
      -> 2-02 -> 2-04 -> 2-B1
      -> 3-02 -> 3-07 -> 3-?3
      -> 4-02 -> 4-01 -> 4-08 -> 4-F
      -> 5-02 -> 5-01 -> 5-09 -> END

Pass 3 (22 stages, 4 replays, 0 duplicates)
*1-01 -> 1-05 -> 1-06 ->*1-?? -> 1-13 -> 1-12 -> 1-A2
      -> 2-09 -> 2-10 -> 2-11 -> 2-?2
      -> 3-13 ->*3-E2
      -> 4-05 -> 4-12 ->*4-G
      -> 5-05 -> 5-14 -> 5-13 -> 5-21 -> 5-20 -> 5-28 -> END

Pass 4 (12 stages, 3 replays, 1 duplicates)
*3-06 -> 3-15 ->*3-E2
      ->*4-06 -> 4-07 -> 4-15 -> 4-H
      -> 5-08 -> 5-15 -> 5-23 -> 5-30 -> J2 -> END

Pass 5 (20 stages, 3 replays, 0 duplicates)
*1-06 -> 1-10 ->*1-09 -> 1-A1
      -> 2-05 -> 2-06 -> 2-08 -> 2-B2
      -> 3-05 -> 3-10 -> 3-12 -> 3-E1
      -> 4-04 -> 4-11 ->*4-G
      -> 5-04 -> 5-12 -> 5-19 -> 5-27 -> J1 -> END
      
Pass 6 (23 stages, 3 replays, 0 duplicates) 
*1-A1 -> 2-01 -> 2-03 -> 2-07 ->*2-B1
      -> 3-04 -> 3-09 -> 3-08 -> 3-11 -> 3-D
      -> 4-03 -> 4-09 ->*4-F
      -> 5-03 -> 5-11 -> 5-10 -> 5-16 -> 5-17 -> 5-18 -> 5-26 -> 5-25 -> 5-24 -> 5-I -> END
  
Clean Up (4 stages, 2 replays, 0 duplicates)
*2-B1 -> 3-03 -> END
*4-?? -> 4-10 -> END
Zone 5 Notes:
  1. There is quite a bit of symmetry in Zone 5, so there are more combinations of the same stages in different orders.
  2. From 4-F -> 5-01 -> 5-09 can be swapped with 4-F -> 5-03 -> 5-11, but 5-02 needs to come before either 5-01 or 5-03
  3. From 5-10 to 5-25, you can do 5-16 through 5-18 in the fastest order
  4. From 5-16 or 5-18, you can do 5-24 through 5-26 in the fastest order