Post subject: Pac-Man 2: The New Adventures
Joined: 4/24/2012
Posts: 129
Location: Atlanta, GA
Hello--Long-time lurker deciding to make a significant post for the first time. I recently gained a bit of interest in doing a real-time run of this game, as I grew up with it and enjoyed all the interactions available. For those unfamiliar with the game, it is kind of a point-and-click adventure game. The player has to guide Pac-Man through areas to complete objectives, either by shooting objects with a slingshot or by telling Pac-Man to look in a direction. On the surface, it seems like a really simple "point A to point B" game that is unsuitable for any significant entertainment in terms of a speedrun, but as I found while playing around yesterday, routing ends up being quite a fun puzzle, due to the myriad of ways things change as a result of Pac-Man's mood, the ability to skip certain triggers by interacting with the world, the Super Pac-Man power-up (which has a long animation but skips long stretches of obstacles), death warps...I've had this game since I was a small child and I've played it to death, but even now I'm finding new animations and situations I'd never seen before. Anyway, I decided to try experimenting to find a good route. I couldn't find any info on these forums or the SDA forums, and the only speedrun I could find was a real-time run from 2007 that seems to be quite unoptimized: https://www.youtube.com/watch?v=D6HQtmkcdX8 This run doesn't really mess with Pac-Man's mood or see if the environment can get him around faster. After about an hour of messing with the world, I was able to shave about ten seconds off the time of the first stage, in what I feel is pretty entertaining in comparison (turn on annotations for the best effect): https://www.youtube.com/watch?v=njkY9CqNgJg Within that, various button optimizations would be for stops via the "Look" command could be made better in a TAS (the previous video was done in real-time for fun), getting the crow to knock down the bottle as far left as possible, faster cow interactions, and knocking on the door when you're directly below it. As far as I can tell, there's no good way to shorten the animation after running from the fan. I played around with Stages 2 and 3, as well; might make videos there soon. I found a handful of ways to speed those up. It's worth noting that there are only four stages, so the game is quite short. Just thought I'd post here to see if anyone wanted to help me route it and/or if someone was looking for a fun diversion to work with. In working up to the end of Stage 3, outside of when it is mandatory (to get the ghosts' ID cards), Super Pac-Man only appears to be faster for movement at the top of the mountain, and only barely (stupid balloon).
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
This is one of those games that everyone is always like 'This should get a TAS' but then someone else says 'The RTA speedrun is basically what the TAS would look like, so there's no point.' Interesting to see we've been proven wrong!
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: 4/24/2012
Posts: 129
Location: Atlanta, GA
Apparently, only a bit of encouragement was necessary to get me started on a TAS. I decided to try my hand at the first stage. I've never made a movie before, but I've spent enough time watching them and reading authors' notes that I feel I have the hang of a lot of the tools involved. (Related: Can somebody tell me how to edit a movie's inputs? I accidentally had my Frame Advance hotkey on the same input as the R button. R has no use in this game [unless such inputs can manipulate lag frames; gotta test that], but I would certainly rather have all my inputs actually "matter," you know...?) I decided to try and optimize the route shown in the previous video; here's a WIP at the end of Stage 1. It's largely the same as the previous video, but with TAS precision on shots/movement and a bit of playaround where it doesn't cost time: https://www.dropbox.com/s/iccevy244fy95rk/Pac-Man%202%20Stage%201.bk2?dl=0 Some notes: You can get Pac-Man to interact with something on the same frame that a screen starts to fade out, but almost all interactions stop him in his tracks (easily tested by shooting him or looking; the result happens at the beginning of the next screen). This means that it's generally of no use, but since there are a few "active" frames during the fade-out that walking wouldn't help, if there is a situation where outright shooting him to change his mood while he is walking is the fastest method, you can shave about six frames of it by doing it during the screen transition. With my casual testing up to Stage 3, this does not appear to be the case, but, who knows? Might be useful later... You have to hold B (X for Power Pellets) for 16 frames to "ready" the slingshot, and it takes 9 frames after releasing a normal shot for it to hit; Power Pellets are much slower and seem to hit the ground faster if you aim lower on the screen. The Look command (Y button) works on Pac-Man after 29 frames and is "active" for about 15 frames after; if he is doing pretty much else at the time, he will ignore your Look command. Pac-Man's interactions generally have three states: One where he completely ignores slingshot shots (useless in terms of manipulation), one where he will react to shots but restarts his previous animation soon after (worse than useless, since it makes you take even longer), and one where he reacts to a shot and then starts walking. There does not appear to be any pattern behind which state each animation has, so I'm basically just doing trial-and-error on everything there. The last one is very important and can be seen in my WIP; I skip his checking out the cow and his long "relief" animation after getting attacked by the crow. It's not always faster (which is why I don't shoot him after running from the fan), but the frames can really add up. I have a route in mind for Stage 2, which I should start sometime soon; I would be happy to share the blueprints if anyone wanted to talk about it, but I imagine this game isn't one that people know very well, so I might just end up ruining surprises for people that way. If not, let me know and I'll gladly post it up.
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
If you want people to look over your run, you can try and get into contact with mecharichter (he's done speedruns/playaround in this game before) or of course TJazZ himself.
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: 4/24/2012
Posts: 129
Location: Atlanta, GA
Good idea; I'll look around and send some messages. I decided to crank out a working Stage 2 today: https://www.youtube.com/watch?v=rekqSQ4R93 I found a couple of potential improvements looking at the whole thing at once, so I plan on redoing this, regardless. Another need for understanding how to edit inputs in the hopes that I can save myself a bunch of time and effort... There are a couple missed inputs in the mine cart scene: A "wasted" slingshot use and a "faster" while Pac-Man's already in the air that may have cost a decent handful of frames. Ignoring the orange ghost after the mine cart will prevent the water drop from triggering before collecting the ID. This would eliminate the need for making bringing Pac-Man to an angry mood with a slingshot hit, saving a couple seconds. Also, perhaps I could try more "fun" movements with the cursor, but that's probably the least fun of this experience on my end... I am personally surprised at how varied moving through the village has been so far; even in my Stage 3 experiments, there's a different way for going through the farm that is only better for Stage 3/4!
Joined: 4/24/2012
Posts: 129
Location: Atlanta, GA
Redid Stage 2 with the aforementioned improvements. Getting the ghosts to work with me after the mine cart section took a while, but I finally got it to work (and got the ID-holding ghost to move further right before I ate him!) after a while. Cleaned up some inputs. https://www.dropbox.com/s/zqc6busp60u5wlp/Pac-Man%202%20Stage%202%20WIP.bk2?dl=0
Joined: 4/24/2012
Posts: 129
Location: Atlanta, GA
For Stage 3, I found that all you need to get the ghosts with the guitar to appear is to go to the screen beforehand, rather than going up to the roof or through the city moving rightward. As short as it was, I ended up using all three Power Pellets to increase speed; the alleyway is so slow to move through normally because of the cat and the hotdog stand. https://www.dropbox.com/s/96x7jciosxiqxwe/Pac-Man%202%20Stage%203%20WIP.bk2?dl=0
Joined: 10/23/2009
Posts: 545
Location: Where?
At last, this game get some interest. :) Will definitively watch it. I guess also that there is a mood in which pacman walks faster than normally. You should try to figure out the algorithm used concerning the mood... What I think you should look into, RAM addresses wise, ->Pac-man speed ->Pac-Man mood algorith: Various addresses? ->Positions ->Cursor position ->Important sprite position(Example:the dog position)
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
niamek wrote:
What I think you should look into, RAM addresses wise, ->Pac-man speed ->Positions ->Cursor position ->Important sprite position(Example:the dog position)
All of these can be found easily with MHS.
->Pac-Man mood algorith: Various addresses?
This one will be hard though :o
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: 10/23/2009
Posts: 545
Location: Where?
What is MHS? Yeah they aren't hard addresses to find, but still importants in my opinion. Concerning mood algorithm: I think... ->there is a timer somwhere in the algorithm because Pacman doesn't keep his mood all the time. ->I think there is a counter because when you hit them repeatly, he change his mood. ->I think there is an address that simply state which mood he is. ->And finally, not an address, but some event change the mood of pac man to an particular one.(And no other)
Patashu
He/Him
Joined: 10/2/2005
Posts: 4043
Memory Hacking Software. http://memoryhacking.com/download.php You use it to find addresses in emulated games. (If you've ever seen skater82297, cosmowright or sockfolder stream with a bunch of memory adddresses up, they're using MHS)
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: 4/24/2012
Posts: 129
Location: Atlanta, GA
I'll admit that I didn't check any memory addresses, but I didn't notice any significant difference between the main moods that showed up, at least (happy, meh, somewhat angry). That said, there is very little flexibility given for that, considering how much of a commitment changing Pac-Man's mood tends to be. Shooting him costs about two full seconds of movement (and most mood-changing interactions cost even more), and his mood can heavily alter the way that he interacts with things. I can think of a couple of situations where shooting him would cost roughly as much time as it does when I do nothing (usually because of a scripted "I'm looking around" animation), but his mood is often manipulated for the best situation in terms of getting through the screen already. I've made notes of that in the couple of videos I put up.
gocha
Any
Emulator Coder, Former player
Joined: 6/21/2006
Posts: 401
Location: Japan, Nagoya
In most cases, you do not need an external tool like MHS to search memory addresses. Most TAS emulators such as BizHawk should have a built-in RAM tools. By the way, I've found a few of memory addresses from my old TAS repository. I'm not sure if they work well with the ROM version you use.
6
00000	7E1020	d	h	0	X Position
00001	7E1024	d	h	0	Y Position
00002	7E1028	w	s	0	X Velocity
00003	7E102A	w	s	0	Y Velocity
00004	7E1074	b	u	0	Shoot
00005	7E02C0	b	h	0	Mood
I am usually available on Discord server or Twitter.
Joined: 4/24/2012
Posts: 129
Location: Atlanta, GA
gocha wrote:
In most cases, you do not need an external tool like MHS to search memory addresses. Most TAS emulators such as BizHawk should have a built-in RAM tools. By the way, I've found a few of memory addresses from my old TAS repository. I'm not sure if they work well with the ROM version you use.
6
00000	7E1020	d	h	0	X Position
00001	7E1024	d	h	0	Y Position
00002	7E1028	w	s	0	X Velocity
00003	7E102A	w	s	0	Y Velocity
00004	7E1074	b	u	0	Shoot
00005	7E02C0	b	h	0	Mood
Thanks; I'll take a look and mention if anything cool comes of it.
Joined: 4/24/2012
Posts: 129
Location: Atlanta, GA
I tried them; not really sure what to make of them. The Velocity values change when I'd expect them to, but they spaz out more than anything else; for example, when I'm Super Pac-Man, flight speed seems constant but the numbers keep going something like 32 -> 64 -> 128 -> 256 -> 32 and looping extremely quickly. Mood works as intended; I suppose I should get those values and take a look at them individually. Accidentally put in 7E1012 for a value and seem to have gotten the Y position there. I actually spent some time cleaning up inputs this afternoon (smoother cursor movement, no extra frames of holding B before using the slingshot) and ended up getting at least one extra lag frame. This is irritating, as I tried to add empty frames to make up for it and it just doesn't seem to be holding up. I guess I'll clean it up after I'm otherwise done with the TAS instead of now and see what I can clean up without messing with the run. :/