Jump to content
IGNORED

VGS NES Weekly Contest - KLAX


BeaIank

Recommended Posts

Events Helper · Posted
1 hour ago, Bearcat-Doug said:

If I can make the top 8, it would be mathematically possible for me to move up to 8th on the overall leaderboard. If I can beat @Jeevan, I'd play you in the second round.

so participate is what u are telling me?  fml, why can't I just coast to the tourney 😒.  Now I have to try damn you!

Link to comment
Share on other sites

2 hours ago, Bearcat-Doug said:

The turnout was really low this week. It looks like I might make the top 8 by just posting a score.

Yeah i just counted through I think I'm in 4th but everything else is same as leaderboard.  Lately Ive just been trying my hand at playing on the final Sunday only.  It would be one my better time to point value translations through the year if not the best, only spent 30 minutes on it.  But then again it depends on what stratosphere mbd's score is in.

Anyway my reflexes have improved generally but lesson learned about not prepping enough, I know there's quite a few potential points I left on the table in several contests.  If low seed it be it's all on me

Link to comment
Share on other sites

And here are my findings. I've actually looked into Klax before, so I already had some of the ram locations mapped out. However, I really didn't dig very far into the code this time. I just worked out the RNG code. The important bit is the RNG is seeded by the first frame it is called which happens to be the frame that the first piece spawns. Even more importantly, the RNG is only updated twice per piece spawned and that's it. Once for the piece color and again for it's column (the piece that starts on the paddle is determined first and obviously doesn't pick a column). So, you can get the same pieces every time if you hit that first RNG call on the same frame (or a multiple of 256 away).

Now that question becomes, which of the 256 frames should we start on and how many pieces should we delay in level 1. And the answer to that was to write a script that finds the best setup for me. I started by trying to find and 4 column set up like in that video I posted (and gives ~1.7 million), but quickly I realized a 5 column might be possible. And sure enough I found that frame 0x9e with delaying 34 pieces in level 1 would work. It gives you a 20 blue to make the 5 columns of 4, 7 yellow to make the T shape, 3 pink that you can make a normal klax with to remove, 6 green to make another 2 klaxes, and finally 5 red to make a klax with 3 and drop the last two in the two free misses. It is kind of lucky that this setup exists at all considering you can only delay up to around ~50 in the first level with the drop meter on. The next one is at a ~350 piece delay although when I check the density at all the delays below 10,000 there were ~200, so roughly 1 out of 50.

Now it's down to execution. The first trick is hitting that first RNG frame on frame 414 (since frame 158 is too early). Luckily, the settings persist though a reset, so set those first. Then, I had to wait for a certain note in the title screen music before hitting start and spamming A to get though the tutorial screens. It takes many tries to hit the correct frame, but eventually you'll get it. I could tell if I got the right one by looking at the piece colors and positions. If I didn't get it, I wrote a script that lets me enter the piece info and tells me how far I was off so I could adjust. Interestingly when I switched from emulator (which I was using to practice) to the real NES, I had to change the note in the music to the next one to account for a reduction in input lag.

Once I hit the right frame, the setup I came up with for level 1 was fairly easy. I just needed to make sure that the 34th pieces spawns before finishing the level. Then is when the fun begins. The piece order is no too bad except a little at the end. There it gives you yellow, yellow, blue for the last three pieces. The yellow needs to be last piece for the combo, however the pieces seem to come too fast to flip up the first yellow between the blue and the next piece (which I cannot allow to drop since I've already used up my two free drops with the extra reds). So, I came up with a complicated set up that put it right after the next piece so I could flip that one up too. After some practice I wasn't as consistent as I hoped. But, then I realized that we can make enough space between blue and the next piece by pressing down at the right time earlier to speed things up. There's not a lot of slack, but just enough to be a bit more consistent.

So, after a bit of save state practice, it was on to the real thing. I got the right frame pretty quickly and nailed everything else first try. And that's the score I posted. However, afterwards I realized that you could squeeze out a few more thousand by clearing 3 of the 4 pre-combo klaxes with a diagonal instead of a horizontal (the fourth comes too late to allow room for a diagonal, but it too might be possible with a clever enough setup).

Link to comment
Share on other sites

Oh, yeah. I uploaded my script if anyone was interested (it's very hacky so be warned, e.g. all the 16s in variable names and such should be replaced by 20s but I was lazy): https://gist.github.com/bbernardoni/01288fd0b46af5ff03dd90f9617a533d

The RNG function is pretty bizarre. There are three bytes that store the RNG seed ($9F, $A0, and $A1). $A0 and $A1 combine to form a 16-bit LFSR. $9F is quintupled and incremented every RNG call and is also the one that is initialized to the frame number of the first call. The effective random number is the XOR of all three bytes and then scaled to the desired range such as between 0-4 for the column.

Link to comment
Share on other sites

2 hours ago, Bearcat-Doug said:

I agree. It was fun during the 2015 contest when everyone was just playing it normally. I'm guessing that it's been broken now to the point where it won't be appearing in any future contests.

Hmm, I wonder if there's a way to solve it. I guess you would just have to ban RNG manipulation as well as trying to figure out the RNG seed you did start with (as that would tell you upcoming pieces). That should take away all the broken parts. 

But then we are back to the problem with the last time Bea won. You would probably need a different goal then plain high score. 

Link to comment
Share on other sites

Events Team · Posted

It is doable to do a progress + low score ruleset for this, but low score takes part of the fun of the game.
Progress + highest score means nailing the first 3 stages with the max score possible for them and then sailing through.

Another permutation that I can think of is a slight modification of the current ruleset. Progress + highest score of your last stage.
But that will require the players to always take a picture at the start of the current stage in case they die there.

Link to comment
Share on other sites

  • The topic was unpinned

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...