Challenge Series #5: TGM1 Secret Grade

Thread in 'Competition' started by JBroms, 10 Feb 2018.

  1. I'm playing this. I think I got an S8 at best yesterday so I haven't clipped any video or taken screenshots yet.

    Man, I was getting better final staircases in NES. Going to have to adjust to how to manipulate the stack under TGM's randomizer, steeper speed curve, and stricter death conditions.
  2. Unless someone can help me get my MAME setup working, I'm not going to be able to officially participate :( (If I DO end up getting a GM, I wanna be able to post a video of it, not just a screenshot).

    Amnesia gave me a copy of his setup and I modified the paths so everything launches properly, but I had problem immediately.

    There are three scripts in the main folder:
    @echo off
    rename nvram\%1.nv backup_%1.nv
    copy inp\lastplay%1.nv nvram\%1.nv
    mametgm64.exe -window -aviwrite %1.avi -playback lastplay%1.inp %1
    del nvram\%1.nv
    rename nvram\backup_%1.nv %1.nv
    @echo off
    rename nvram\%1.nv backup_%1.nv
    copy inp\lastplay%1.nv nvram\%1.nv
    mametgm64.exe -window -playback lastplay%1.inp %1
    del nvram\%1.nv
    rename nvram\backup_%1.nv %1.nv
    @echo off
    del inp\lastplay%1.inp
    del inp\lastplay%1.nv
    copy nvram\%1.nv inp\lastplay%1.nv
    mametgm64.exe -record lastplay%1.inp %1
    The first problem I ran into was when I tried running "recordplay.cmd" (I ran "recordplay.cmd tgmj"), I got these three errors:
    Unable to create the Direct3D device (8876086C)
    Unable to initialize Direct3D
    Unable to complete window creation
    I seemed to have fixed that part by changing the video option in the mame.ini from "d3d" to "opengl". But then when I tried the record option ("aviwrite.cmd tgmj"), I got these errors:
    Invalid video value opengl; reverting to gdi
    Fatal error: Failed to open file for playback (src/emu/inptport.c:4425)
    I just re-reviewed the code in the aviwrite.cmd file and it looks like it's either coded for the wrong path/file info, or else the files that my exe is generating are not the same names. For instance, the code says "copy inp\lastplay%1.nv nvram\%1.nv", but all the files in the inp folder have extensions with .inp (not .nv)

    so I created a copy of the aviwrite.cmd file and tweaked it to what I thought might work, and I was able to get it to run, but have no idea how to get it to actually start the previous game and record it... all that happened was the game launched like normal and nothing else happened (I was expecting something to happen automatically, but I clearly don't understand how all this works yet). I also had to tweak the command to get the game to run in record mode without crashing by adding the switch "-video d3d" since the command also included the "-window" switch.

    Here's the code I put in my modified aviwrite-shuey.cmd file (I also manually made copies of my first game's "lastplay.inp" and "tgmj.nv" files so I could test with the following code below):
    @echo off
    mametgm64.exe -video d3d -window -aviwrite tgmj.avi -playback lastplay.inp tgmj
    del nvram\tgmj.nv
    rename nvram\tgmj_backup_2018-02-11_1012.nv tgmj.nv
    So I'm currently at a point where I'm able to play a game without any problems, but trying to record a replay of my last game is not working...
  3. @Shuey -- in the meantime if you at least have an .inp and associated .nv, you can share that. Someone else may be able to render a video for you. Hopefully we can also sort out the exact nature of the error you're hitting.
    Amnesia and Shuey like this.
  4. tgm_secret_s9-166.png
    Got a one-away -- staircase cleanup was looking pretty pop but there was no I-piece available to cover the top in the last few pieces.

    Also the Extron line doubler I'm using to play on a VGA monitor at my desk is actively trying to die during some runs. I ordered another since a fully working one is probably pretty useful. Hopefully I don't get a record when the video is wobbling or colors are going out? :V
  5. Cool, thanks for the tip and info Kitaru! BTW, dang!! You were SO close to the GM with that run! :o Not to mention you pulled it off at such a high level when the speed is far more challenging!
  6. Amnesia

    Amnesia Piece of Cake

    To make GM, or whatever, you just need to close the square but not to complete the line ?
  7. The 19th row needs to be completely filled, except for the first square in the row (like Kitaru's screenshot), AND the empty square in row 19 needs to be covered by a piece in row 20. So if he had gotten an I piece, he could've laid it flat across the hole in row 19, completing the game with a GM secret grade.
  8. Somebody please help me here... Muf's "Create AVI from last TGM1 replay" shortcut basically launches this command:
    aviwrite.cmd tgmj
    Again, here is the code from his aviwrite.cmd file:
    @echo off
    rename nvram\%1.nv backup_%1.nv
    copy inp\lastplay%1.nv nvram\%1.nv
    mametgm64.exe -window -aviwrite %1.avi -playback lastplay%1.inp %1
    del nvram\%1.nv
    rename nvram\backup_%1.nv %1.nv
    I'm not concerned with any of the lines for backing up and restoring my nvram or lastplay because I've already got backups of those. The main thing I'm trying to get to work is the core command of this script. What I'm expecting and what's actually happening are two different things... based on what's listed in line 4, and based on the names of my files (tgmj.nv and lastplay.inp), I would think that this command should work for converting my last game into an avi file:
    mametgm64.exe -window -video d3d -aviwrite tgmj.avi -playback lastplay.inp tgmj
    When I run that command, the game successfully opens in a window, a credit is automatically inserted and the game automatically starts. But then I get an out of sync message and the pieces just fall (it doesn't actually play my inputs from my last game).

    What am I missing!? :-S...
  9. There we go, got footage but due to me being on a Potato Computer at the moment it dropped a bajillion frames on the recording so I won't post that
    JBroms, Echo, Oliver and 1 other person like this.
  10. Do we have any "guides" or good tips for what to go for in a secret grade challenge? Building for stuff like that seriously messes with my idea of Tetris stacking, but I guess getting "creative" like that is always good practice.

    I guess, like all Tetris, it's just down to practice, but I feel like I'm missing out on a lot of placements that should be extremely simple. Also, for some reason it's easier for me to do secret grade on NES (with its limited rotations and much more random piece selections) that it is on TGM.
    xyrnq likes this.
  11. There is no way NES is easier than TGM or TAP :p Not that TGM or TAP is great for it.

    I think this guide is a good introduction to it:

    In my opinion, the best way to start is to set up for a S piece in the bottom left corner (leave a two wide gap with your first piece from the left wall), but if you get a T, L, S or even better an I, T, L, S those starts are great!
  12. I agree... which is why it annoyed me. :p
    NES does stay slow and manageable for longer though.

    Thanks for the link
  13. For some reason I decided to try NEStris secret grade yesterday and in only a couple attempts, I tied my pb in both TGM and TAP:

    Qlex, xyrnq, Archina and 2 others like this.
  14. I have compiled all I could think of for a start (excuse the dumb cases it was probably late at night when i made this) so you got a lot of options. I still think the S strategy is the most reliable when you have no previews since it literally only takes one piece to setup. (edit I can't tell the difference between J and L after playing for like a couple years now apparently)

    On top of this, if anyone wants/needs it, here are a few turnaround strategies I can think of.
    K, Kitaru, JBroms and 3 others like this.
  15. NES is potentially more doable at GM level because you get a bit more leeway at the ceiling (Level 0-2 gravity + ARE is more than TGM lock + ARE, flat L/J/T are one row higher than Sega/TGM rotation so you can pole vault over some row 19 obstructions, death is on overlapping lock rather than overlapping spawn so you're allowed to move pieces out of a death condition and continue play, some galaxy brain level strats where you intentionally orphan blocks from L/I in the vanish zone before clearing lines to make a perfect staircase). It's just the randomizer that's less intuitive to read (although theoretically still has some properties that may make it "readable"). :p
  16. K


    i wouldn't be so sure about that... but actually it is an unquestionable question..
  17. Considering that I learned how to play secret grade today and only today....

    Jago: Honestly I couldn't believe that it had NEVER been done, but @Kitaru could not find anything, and I did not get replies about it from Pier21 or Mihara on Twitter. It has probably been done but no documentation exists.

    Attached Files:

  18. K



    i will not try to enhance that.
  19. Muf


    Like I told you on Facebook messenger, you SHOULD be concerned with backing up and restoring your nvram, because your inp file is desyncing. You HAVE to restore the nvram from exactly BEFORE you played the session contained in your inp file, or else the inputs will desync because of a mismatched RNG state.

    The batch files will work as-is (aside from any d3d / opengl quirks that you were experiencing) and I don't recommend messing with the mechanism that copies around the nvram files because you will experience exactly the problems you're describing.
    Shuey likes this.
  20. [​IMG]

    Attached Files:

Share This Page