Post subject: Chip's Challenge
Twisted_Eye
He/Him
Active player (398)
Joined: 10/17/2005
Posts: 632
Location: Seattle, WA
I saw the discussion about whether this game would be worth approaching and thought I'd put a video together to see what that would be like. Link to video This video TASes the first 19 levels in the original Lynx version of the game. If you can make it through these 15 minutes and feel like you could go through another...two and half, three hours, we've got something! The process of TASing this game is easy in a number of ways, but largely because the levels are almost entirely TAS-solved already--https://www.youtube.com/watch?v=EczCcswkoc0&list=PLA220B8606ECB5342&index=1 This link is a Youtube playlist of every level in the game played at the current optimal possible time, and a large majority of these videos' movements can be copied straight across to the Lynx version, with some changes to entertainment factor possible maybe without sacrificing time; I tried to really tease the teeth monsters in Level 19, for example. Captions would go a long way to making this game approachable, too. Another aid here: this page is a list of the high scores for time remaining on the clock for the Lynx version: http://www.jamesa7171.net/cc1lynx.htm This video runs short by a second in a couple levels, though I'm pretty sure that's due to a bit of a frame-rule issue where the sub-second timer doesn't properly reset between levels. I should also talk about what version of CC would really be the best to use. The Windows version includes a large amount of abuseable programming errors that speed up a bunch of levels, and I feel like the way movement is handled alone would speed up the run a lot, but I worry that it would be harder to watch with how jumpy it is, and I haven't been able to get Hourglass to work with the game at all anyway. Using Bizhawk to record the original Lynx version is actually really convenient and easy to do, but I don't know any of the other ports well enough to say if they'd be worth trying instead. I get the sense that it's just the Windows version that messed up the porting enough to be glitchy. Salvageable, or would there just be way too many dull maze-solving periods like Level 15, Elementary? I'm not exactly looking forward to Writer's Block or Pain, for sure, but if blobs and walkers can be RNG manipulated then there could be really interesting moments throughout as well.
Joined: 2/7/2012
Posts: 15
The RNG on the Lynx Chip's Challenge is initialized to the same state when a level is (re)started and called as needed. Walker movement depends only on the RNG and so their movements will be hard to manipulate. Blobs are a bit easier since they move based both on the RNG and the timer. (Pausing the game is perhaps useful.) Some quick comments about your WIP: Level 9: When pushing the second block into the bomb, you can save time using block slapping (though you might lose it later with the bugs anyway). Level 15: Near the finish, it is faster to have the thief take away your ice cleats. Level 20 (unfinished): It's not needed to take any chips as there's no chip socket. A question: If this version is TASed, how should the secret levels be handled? They can only be reached by entering a password, which seems to require resetting the Lynx. I think the best thing would be to have two TASes: one which plays the 144 regular levels, and another which plays the 4 secret levels via the password. The alternative approach would get the ending after the 144 levels, power cycle, and then play the secret levels and get the ending again.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
The TAS should do all levels and do them in whatever order gets them done the fastest IMO. Btw, I am very much looking forward to this TAS :D
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Twisted_Eye
He/Him
Active player (398)
Joined: 10/17/2005
Posts: 632
Location: Seattle, WA
EricS wrote:
If this version is TASed, how should the secret levels be handled? They can only be reached by entering a password, which seems to require resetting the Lynx. I think the best thing would be to have two TASes: one which plays the 144 regular levels, and another which plays the 4 secret levels via the password. The alternative approach would get the ending after the 144 levels, power cycle, and then play the secret levels and get the ending again.
I was thinking to power cycle immediately after finishing level 144, putting in the code for the final levels, and then letting that ending be the finish for the TAS. Or let the ending cycle through once, power cycle again, and then putting in the code for the secret Mandlebrot generator and letting that fill the screen! no Thanks for the level tips, too. --Fixing up Level 9 taught me more about block slapping--if I can't get it to slap immediately, I can push into a wall for three frames and then block slap just fine. Instead of slapping the one block, I could slap the next one as well. This helped in Level 15 at the very end as well, along with your thief trick which I really should've already known. I also cleaned up Level 17, the big chip-smiley-face level, by hitting the green button myself to save myself those frames of staring at a wall waiting for it to disappear. The game is relatively pleasant to edit without desyncing too hard, though saving an odd number of frames can change even-step/odd-step alignment. Until I saved time in level 17, the level with all the teeth and the dirt was going straight to the deaths.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Btw, for those who don't know the Windows vs Lynx ruleset differences in Chips Challenge, here's a good primer: http://chipschallenge.wikia.com/wiki/Ruleset#Lynx_ruleset
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Joined: 2/7/2012
Posts: 15
Here's some information about the randomness and other things. This is a lot easier thanks to Brian Raiter, who created the open source "Tile World" clone that aims to emulate both the MS and Lynx rulesets. It contains an RNG that duplicates the behavior of the RNG on the Lynx. Copied and adapted from the Tile World source code:
unsigned char prngvalue1;
unsigned char prngvalue2;

static unsigned char lynx_prng(void)
{
    unsigned char n;

    n = (prngvalue1 >> 2) - prngvalue1;
    if (!(prngvalue1 & 0x02))
        --n;
    prngvalue1 = (prngvalue1 >> 1) | (prngvalue2 & 0x80);
    prngvalue2 = (prngvalue2 << 1) | (n & 0x01);
    return (prngvalue1 ^ prngvalue2) & 0xFF;
}
When a walker hits an obstacle, the RNG is called and the two lower order bits are interpreted as an integer from 0 to 3, dictating the number of 90 degree clockwise turns to make to find the walker's new direction. For example, 1 means turn right and 2 means turn around. The only way to manipulate walkers is indirectly, by doing something that affects when they run into something. Using this information, it's possible to find that the RNG state is a 16-bit field at address 0044. As for blobs, Brain Raiter states in http://www.muppetlabs.com/~breadbox/software/tworld/tworldlynx.html
Blobs have random movement which changes with each play of a level, in contrast with walkers, whose random movement is always the same. On the Atari Lynx, this was done by having the blobs' random numbers augmented with the current timer value, which meant that there were really only four possible random-number sequences for the blobs, and it could be controlled by controlling the stepping.
So, we should find the timer. There are multiple locations that appear to be timers, but the relevant one is an 8-bit field at address 002F. It is incremented every 3 frames, which is essentially this game's resolution. The two low bits in the timer are used together with the RNG to determine blob movement. The timer is only incremented when a level is being played. This means that (contrary to my previous suggestion) it is not possible to manipulate blobs by pausing. The only way is to alter the time spent on previous levels or restart the current level. Increasing the timer by 1 makes the blob directions rotate a quarter-turn counter-clockwise. Incidentally, the movement of teeth also depends on the timer. Unless they're being forced to move (ice, exiting a bear trap, etc.), teeth only initiate movement if the 4-bit in the timer is set (equivalently if the timer is 4, 5, 6, or 7 modulo 8.) So, levels with blobs have effectively 4 starting conditions, and levels with teeth have 8. By the way, here are some memory addresses I found, though I think most of them are useful more for cheating than TASing per se. The RNG and Timer are the major ones. The Multi Force Floor Direction controls the direction things are ejected from the "random" force floors. In the Lynx ruleset this is a complete misnomer since the directions just cycle clockwise. The direction persists between levels.
Domain RAM
SystemID Lynx
000A	b	u	0	RAM	Level Number - 1
1180	w	u	0	RAM	Time Left
0026	w	u	0	RAM	Chips Left
0064	w	u	0	RAM	Total Score % 2^16
0066	b	u	0	RAM	Total Score / 2^16
002A	b	u	0	RAM	# Red Keys
002B	b	u	0	RAM	# Blue Keys
002C	b	u	0	RAM	# Yellow Keys
002D	b	u	0	RAM	# Green Keys
0020	b	u	0	RAM	Have Cleats
0021	b	u	0	RAM	Have Magnet
0022	b	u	0	RAM	Have Heat Shield
0023	b	u	0	RAM	Have Water Shield
0044	w	h	0	RAM	RNG
002F	b	u	0	RAM	Timer
004A	b	u	0	RAM	Multi Force Floor Direction
Twisted_Eye
He/Him
Active player (398)
Joined: 10/17/2005
Posts: 632
Location: Seattle, WA
I'm trying to find a seconds timer so I can better predict when the clock drops seconds. 3BDB does a pretty good job, but it goes from 20-1 instead of 20-0 and is a little stilted about the counting. Still a perfect 60 frames per second loop, though. Point of which is, yeah, the timer glitch where your first second isn't always a full second does apply here. The only way to manipulate this is to wait in-level, either by starting a level and then restarting it at the right time or by waiting on the square before the exit until the right time to enter. Part of me is concerned about in-game time, since there has been an active Chip's community keeping devoted lists of best times and a TAS missing many of those times by exactly one in-game second just seems so wrong, haha. I was able to beat their time on level 24, Oorto Geld, through copious amounts of block slapping, at least. Thanks for the extra information on blobs. Knowing that there are only four possible routines they can follow motivates me to more thoroughly examine every possible outcome--I found a route through level 23, Blobnet, that meets the best times I could find, but it still looked kind of ugly to me. Having three more starting conditions I can repeat that process with to maybe find a faster/cleaner path is much better sounding than the worried 'it's not manipulable in-level, but nigh-infinitely manipulable before you start' pain in the ass condition.
Editor, Experienced player (885)
Joined: 1/23/2008
Posts: 529
Location: Finland
Chip's Challenge? Nice... I remember playing this a lot on Windows back in the day. Isn't it possible to skip levels by dying enough times in them? Could that be used as a time saving strategy?
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
AKheon wrote:
Chip's Challenge? Nice... I remember playing this a lot on Windows back in the day. Isn't it possible to skip levels by dying enough times in them? Could that be used as a time saving strategy?
Yeah you can skip levels if you die enough in a lot of games. You usually ban that technique in speedruns because it's really boring for both the runner and the audience. Who wants to see how fast you can NOT do any content in the game? (I mean, you could always just enter the password for the last level then beat only one level. Obviously that's not going to be interesting too.)
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Twisted_Eye
He/Him
Active player (398)
Joined: 10/17/2005
Posts: 632
Location: Seattle, WA
Here's a progress update. I'm stuck on level 35, Lemmings, at the moment. I'm having a hard time getting the fireballs disrupted properly like in the demonstrations and explanations I'm finding online. The Lynx record is the same as the Windows record, so there's got to be a way to make this work somehow. Part of the reason it has been over a month is that I redid much of the first 20 levels to switch to best in-game time, so that all of the level times at least match the known records. Furthermore, levels 2 and 24, Lesson 2 and Oorto Geld, I've been able to get a better time than the record by one second. I also spent a lot of time on level 23, Blobnet, but I haven't been able to beat the best time. The path in this WIP is one of the only ties I could find, and even then the end looks pretty ugly. I feel like it must be possible to improve this by another second, but I just haven't been able to yet. The game's somewhat edit friendly, so if I get inspired later and find a successful route, I can just patch it in. Link to video And here's the .bk2 to download: http://tasvideos.org/userfiles/download/20189616912395663 Using turbo to get through the longer stages may be better than trying to skip through the Youtube video.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
That Oorto Geld strategy is beautiful <3
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
The music in this version makes my ears bleed, and the conveyor belts make my eyes ache. Which is why I pushed for the DOS version. Anyway, enough whine. The progress you made is fantastic, and once muted it's not boring for one bit (pun intended). Everyone thought I was expecting too much from a CC TAS when I thought it could improve some of the RTA times. 2 levels improved already! I do hope you manage to find an improvement in Blobnet, that level deserves it so hard! Keep it up!
Joined: 2/7/2012
Posts: 15
Excellent work! Especially on beating the records. I probably should have mentioned this before (sorry), but the Lynx records were achieved on the Tile World reimplementation of the Lynx behavior. Tile World doesn't allow for all the kinds of block slapping achievable on the original game. (In particular, I don't think your route on level 2 can be performed in Tile World.) So block slapping may well allow for more record breakage. The RNG for blobs (but not for walkers) is also different in Tile World. This TAS will be nice, even if the mazes can be boring.
Twisted_Eye
He/Him
Active player (398)
Joined: 10/17/2005
Posts: 632
Location: Seattle, WA
So I took a break for a couple months, dealing with some life stuff--good life stuff, promotion and buying a house--and decided to spend the weekend putting in some hours developing this run further. Here's an update: Link to video Lemmings was giving me fits trying to find a working solution, so I grabbed a best-right-now that's 11 time units short and moved on. This whole run is going to have at least one final pass before I submit it, as every once in a while I find some new trick that might apply earlier in the run. I expect to be redoing a bunch of levels--I think someone beat my fancy Oorto Geld time?--so squeezing in a better Lemmings will happen at some point anyway. The video goes all the way up to Level 54, Grail. I am stuck again, as I'm really really close to tying the posted best time and am out of ideas for where to find that missing couple steps. That's the only other bad news at the moment--36, Ladder, 37, Seeing Stars, and 53, Traffic Cop, all received times better than the high scores! Seeing Stars is exactly what I was hoping this TAS would look like when it came time for the massive 'move blocks around into tiny water squares for minutes at a time' levels to come around, as there's precise block slapping all over the place to save time. 'Pain' is going to be a crazy level that I'm almost dreading as much as curious about improving... I've also started up an online spreadsheet for myself to track my times that others can follow. Link is here.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Finally got around to watching this. Great job! Love the Lemmings solution, even if it's suboptimal.
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Player (19)
Joined: 5/22/2012
Posts: 26
This is a project I'd be willing to try to help out on-only stumbled across the 2nd WIP earlier today, and took a look at Oorto Geld after seeing it was a second short. Long story short, I copied the beginning, tweaked it for Tile World Lynx (same amount of time to set up, just allowing the fast ending), and then found a 427 that took 0 blocks into glider rooms. Video. This should directly transfer to the Atari Lynx, with additional moves to spare from TW Lynx being more limiting with block slaps. I also know of a few other faster ways to do things not on the ChipWiki channel (a way of doing the 2nd block room in Mixed Nuts 2 moves faster than what's there, for one-that one can be found in the public TWS: the public TWS is also more up to date on routes than ChipWiki, notable on Amsterdam). I've never TASed before, though. Not sure if that'd be prohibitive :P edit: Noticed the detouring into the toggle room above the first completed glider cage saves 8 moves of detouring later and costs less than that in terms of waiting inside the room. I couldn't find a way to prevent the subsequent rooms from equalizing the time saved there, unfortunately.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Hey, if you can find solutions better than Twisted Eye, I'd say you're already ready to help :D Just upload the work you've done so it can be used!
My Chiptune music, made in Famitracker: http://soundcloud.com/patashu My twitch. I stream mostly shmups & rhythm games http://twitch.tv/patashu My youtube, again shmups and rhythm games and misc stuff: http://youtube.com/user/patashu
Player (19)
Joined: 5/22/2012
Posts: 26
Been hoping this project hasn't died, but anyway, there's actually been a fair amount of work done on CC1 Lynx lately. Notable improvements I know about: Digdirt, Underground: both can be done one second faster than the MS route by exploiting the fact that dirt is only cleared when Chip is completely in the tile. These routes are both in the Lynx public TWS linked below (I added Digdirt just now, actually). Spooks: apparently there are relatively easy to find improvements to the public MS route based on the route. The beginning is the same, though: that much was confirmed. the 547.6 MS route seems to translate directly to Lynx, perhaps with a 3 tick wait somewhere. Cityblock: I set a new record in MS. Not going to post the exact route here (since at least one other person is looking for it) but I'd be willing to chip in (ha, ha) when it comes to this level in the TAS, as at least 2 of the tricks I found apply directly. Cake Walk: 701 was scored in Lynx by using a different bridging path and a metric ton of block slaps-I don't know the specifics, but I do know that it collected the blue key and used the force floor adjacent to the blue lock to not need to turn the blocks as far. Also I thought this was linked earlier, but here's some optimized runs of most of the game, with commentary, in Lynx: https://www.youtube.com/watch?v=6_WBYSF1pkQ&list=PLS3YWq7Lf_PLPDGrL1bu08_1tA7wSZ_Eb Lastly, there's now a Lynx public TWS: http://www.davidstolp.com/old/chips/tws/?set=CHIPS-lynx Mostly inoptimal, but there should be some useful routes in here. Maybe if this is still dead come next year I'll have to do it..maybe after working on CCLP3 more
Warepire
He/Him
Editor
Joined: 3/2/2010
Posts: 2178
Location: A little to the left of nowhere (Sweden)
How's it going Twisted Eye?