Post subject: Bonk's Adventure - PC Engine / TurboGrafx 16
Former player
Joined: 10/30/2008
Posts: 29
Greetings! In response to the recent request / plea for new TASers and TASes of new games, I've decided to come out of the woodwork with my "proof of concept" TAS for Bonk's Adventure using Mednafen 0.8.A. It's neither complete nor optimized, but it does demonstrate that it can be done. I've only done stages 1-1 through 2-2 so far. You can download the Mednafen movie file here. Save this to Mednafen's "mcm" directory. It'll be movie file number 6 (Shift-F6 in the emulator); to change this, just modify the file extension to be ".x.mcm" where x is the movie number that you want. You'll need the ROM "Bonk's_Adventure_(U).pce" in order to play the movie. I've tested the movie file on a Windows machine and on a Linux machine and it works great on both of them. Of course, if you can't be bothered with all that, you can watch it on YouTube . It's a low quality encode, but it's good enough for now. Mednafen does not currently support re-recording, but it does have 10 second rewind functionality. Rewinding can be done during the recording of a movie, and it can also be done in frame advance mode. So, it allows for frame perfection of specific segments of a movie...but it's impossible to backtrack past 10 seconds without starting over from scratch. This makes it a little challenging to test new routes and strategies while recording a run. More on this later... So, on to the game: Bonk is normally a pretty slow walker. I had to come up with a way to speed him up a little bit. If you headbutt a flower, you are (typically) repelled quickly in the opposite direction for a short period of time. It's difficult to control in real time, but in a TAS you can jump as you're being repelled and maintain the faster velocity. While you're floating in the air (at the cost of some very annoying sound...sorry), you can headbutt enemies to gain height while still maintaining your speed. It only takes a few frames to set up, so it's usually much faster than grabbing a meat power-up. (For those of you who aren't familiar with the game, the meat power-up has an unavoidable animation several seconds long each time you get it. You'll see it in area 1-2 of my video.) Collision detection in this game is poor. At times, Bonk can headbutt a flower a couple pixels over from him and not hit it. (VERY FRUSTRATING!) At other times, he can headbutt an object several pixels beyond his reach and somehow hit it. In addition, as you'll see from my video in the second half of area 1-3 and area 2-1 (see what happens at 3:46), Bonk can pass through objects unharmed and unhindered if approached at the right angles and velocities. Damage boosting is occasionally useful. I use it in this test run to gain height without losing speed. As I said before, the run isn't optimized right now. I know of some improvements already, but I'd like to get some feedback from you guys before proceeding too much further. Let me know if you think that it's worth continuing. Regarding the lack of re-recording support in Mednafen: I've tried running Mednafen in a virtual machine using VMWare Workstation and using a VMWare ESX server. This allows me to take snapshots, which can give me some makeshift re-recording capability. Unfortunately, even with VMWare tools installed in the VM, video frames get dropped. It's pretty much unusable. I'm going to try it on a Windows VM running under VMware Fusion on a new MacBook to see if that'll do the trick. OK, that's all for now. I hope that you like the "proof of concept." I'm a TAS newbie, so be gentle. :-) - Jerfo
Emulator Coder, Former player
Joined: 8/12/2007
Posts: 102
That was awesome. I'd like to see more. Mednafen was originally a fork of FCEU and contains a lot of similar code in the savestate and movie sections. I think a decent part of FCEUX's re-recording code could be reused. I've been working on it for the last several days without any success, but a few lines of code can make it record and play back from power-on without starting from a savestate.
Editor, Expert player (2480)
Joined: 4/8/2005
Posts: 1573
Location: Gone for a year, just for varietyyyyyyyyy!!
Looks funny. Welcome, jerfo!
Former player
Joined: 10/30/2008
Posts: 29
For those who are interested, I've posted my work in progress (up through Level 1) of an optimized TAS here. If you'd like the mcm file, just let me know. I was able to get the emulator working nicely on a Linux VM in VMWare Workstation (I just had to shrink the Mednafen Window scale), which means that I can use VMWare snapshots for my savestates. The only thing that I feel like I'm missing now is a frame counter. Here's a list of some of the improvements from the last video: - In the beginning of level 1-1, I regained control of Bonk several frames faster after he grabbed the bonus flower. - In the beginning of level 1-2, it's faster for Bonk to climb the wall rather than summersalt over it. I used a combination of jumping and summersalting to get him to grab the wall faster; if you just jump into the wall, Bonk will fall for several frames before finally grabbing it. - Thanks to a damage boost at the end of 1-2, Bonk can float all the way to the end of the level at full speed. - At the end of the swimming portion of 1-3, I do a single frame jump. Thanks to a programming bug in the game, Bonk automatically re-jumps as soon as he hits the surface of the water. It's imperceptible at full speed, but it looks very cool in frame advance mode. This allows Bonk to exit the water several frames faster than before. - At the end of the boss battle, Bonk and the defeated boss automatically move to a predetermined screen position. So, I manipulate the boss battle to put Bonk and the boss in (nearly) optimal positions at the end. I tried thousands of re-records, but wasn't able to avoid having Bonk and the boss move a single frame each. - I don't collect any bonus "smiley faces" throughout the level; this saves frames at the end of the level when they're tallied. Let me know if you see any potential improvements. Enjoy! - Jerfo
Joined: 2/23/2008
Posts: 21
So far I like it a lot. Something I was wondering about, I used to jump and spin my way through the game on full turbo also, and I think I remember (my memory is rusty)... is it maybe a hair faster to not use full turbo speed on spins, like maybe play with the timing between spins? Maybe that just increases the vertical drop rate but doesn't help the horizontal movement. BTW, it sounds like the emu is ok for TASing, but you might be interested to check this out: http://tasvideos.org/forum/viewtopic.php?p=190733#190733
Former player
Joined: 10/30/2008
Posts: 29
CreeDo wrote:
Maybe that just increases the vertical drop rate but doesn't help the horizontal movement.
Bingo! I do play with the rotation timing in order to better position landings, avoid enemies, or get damage boosts, but it doesn't ever change the horizontal speed. I'll keep my eyes on the Magic Engine emulator page for re-recording support. Using VMWare has been an adequate workaround, but it would be much quicker to deal with emulator save states rather than VMWare snapshots...which take about a minute to restore each time. I've finished several levels in "Round 2." I'll post another WIP when the entire round is complete. I'll try to make the video quality a little more appealing this time. - Jerfo
Joined: 2/23/2008
Posts: 21
Awesome, I will check back for those updates. I dunno exactly what you go through to make this possible but it sounds like some hassle. Your fans appreciate it :)
Former player
Joined: 10/30/2008
Posts: 29
CreeDo wrote:
Awesome, I will check back for those updates. I dunno exactly what you go through to make this possible but it sounds like some hassle. Your fans appreciate it :)
I've got good news and bad news. The good news is that I've nearly finished round 2. The bad news is that I need to re-do the entire run. At the end of each level, there's a sign with an arrow on it. As soon as Bonk touches some part of the ground after that sign, the "level end" music starts playing and Bonk slowly walks to the exit. I'd been having Bonk fly to the very edge of the screen while under a speed boost, thinking that it was faster. This was dumb, since the "level end" music and animation take the same amount of time regardless of where you enter the end of the level. So, it's actually faster to hit the ground by the exit as early as possible. This is going to save quite a bit of time over the course of the entire run, so it's worth starting over again. I'm also going to stop avoiding the smiley faces. The end of each round appears to take the same amount of time regardless of how many you've collected, so there's no time savings in avoiding them. I'll post a video of what I'd done in round 2 previously, but keep in mind that it's now destined for the scrap heap. [NOTE: the video is now up on glorious YouTube. Click here to see it.] - Jerfo
Player (121)
Joined: 2/11/2007
Posts: 1522
Very nice ... I am looking forward to the full run :D
I make a comic with no image files and you should read it. While there is a lower class, I am in it, and while there is a criminal element I am of it, and while there is a soul in prison, I am not free. -Eugene Debs
Joined: 2/23/2008
Posts: 21
haha ouch dude, it stings. I guess speedrunners are supposed to be happy when they find a big timesaving shortcut but this is one where I don't blame you for being like... "#$%@#$@#$"
Former player
Joined: 10/30/2008
Posts: 29
I'm just getting re-started on this now. Here's level 1-1 to tide you over for a bit: http://www.youtube.com/watch?v=SENABAEx-DM. By my rough count, it's about 1.5 - 2 seconds faster than my previous attempt, mostly due to some new damage boosting. The first damage boost may not look necessary, but it puts Bonk in a better position for the second damage boost, which is just barely enough to get him to summersault over the flower. I'm a little concerned about what this will do to level 1-3, since Bonk needs to take a lot of damage in that level. We shall see... Enjoy! - Jerfo
fruitbane
He/Him
Joined: 3/28/2005
Posts: 216
I'm enjoying it so far. Let's hope Mednafen's tools mature just a little more so you have an easier time with rerecords.
fruitbane
He/Him
Joined: 3/28/2005
Posts: 216
Any new progress to share with us?
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3576)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
Moved topic to the TG-16 forum! Mednafen is now approved for site submissions.
It's hard to look this good. My TAS projects
Skilled player (1327)
Joined: 9/7/2007
Posts: 1354
Location: U.S.
Sorry for the bump but I just want to know, Is falling with the head down faster than with the head up? Also, I found something random! It seems you can only hit the flowers on the side on odd-numbered frames & you will completely miss them on even numbered frames. EDIT: Okay, these are the times when you can hit those flowers: (Will improve in near future)
  • Red flower - Odd numbered frames
  • Yellow flower - Even numbered frames
  • Meat flower - Even numbered frames
  • Plant vases - Even numbered frames
Former player
Joined: 10/30/2008
Posts: 29
I'm still alive! I had to drop this TAS for several months, but I'm slowly making my way back into it. Unfortunately, I've been unable to replicate my Level 1-1 from the old (non-RR) version of Mednafen in any of the new tools. It's been quite frustrating. There's a flower that I just can't clear any more, even with a damage boost. I've also been unable to convert the old movie from the non-RR mcm format into one of the newer formats. Even if I can eventually get it converted, I'll need to revise it to take slightly less damage, as all the damage led to an unwanted item drop in the next stage (a heart instead of meat). RE: Flower Bonking Yep, I've noticed that as well, although I didn't notice the distinction between different colored flowers. Nice find! I've been taking a little time to see if I can find the memory locations for Bonk's speed, along with his vertical and horizontal positions. Until I find them, I can only say with 99% assurance that Bonk will fall at the same rate regardless of whether he's upside down or downside up. Are you working on a run as well? I wouldn't mind collaborating on it. - Jerfo
Skilled player (1327)
Joined: 9/7/2007
Posts: 1354
Location: U.S.
I am working on a run, but I wouldn't want to steal your thunder. I would show you what I had but this this format makes it very hard to do so! Plus im a Windows user meaning I am using that pcejin thing that paul_t is using. Err... MAKING..making, I totally said that! I think collaborating would be great! Anyone object?
Skilled player (1327)
Joined: 9/7/2007
Posts: 1354
Location: U.S.
I just finished Level 1-1. I am slower and a bit faster than your run Jerfo.
Former player
Joined: 10/30/2008
Posts: 29
Sonikkustar wrote:
I just finished Level 1-1. I am slower and a bit faster than your run Jerfo.
Can you post your mc2 file somewhere and/or do a quick and dirty AVI encode? I'm curious to see where you're faster and where you're slower.
Skilled player (1327)
Joined: 9/7/2007
Posts: 1354
Location: U.S.
I cant really do it with this emulator so I might as well tell you this. It is slower because it only flies over one flower so that I get enough health for 1-3, I am also faster due to some optimizations at the beginning. The problem is that if I convert the "file" to an mc2., then the file becomes corrupted. I'll try and recreate it as much as possible. Good Night everybody! EDIT:Done, now how do I exactly... send this...?
Player (52)
Joined: 4/10/2009
Posts: 226
I'm really looking forward to seeing this run, maybe even helping out at times. the main reason why I decided to do bonk's revenge instead of this game is because I thought you might still be working on this, and I didn't think I could match your round 1 time anyway.
Skilled player (1327)
Joined: 9/7/2007
Posts: 1354
Location: U.S.
Yeah Jerfo! We believe in you! Oh, one more thing. Be careful landing from a drop. It can sometimes stop ALL forward momentum.
Former player
Joined: 10/30/2008
Posts: 29
Sonikkustar wrote:
Yeah Jerfo! We believe in you! Oh, one more thing. Be careful landing from a drop. It can sometimes stop ALL forward momentum.
Actually, if you can help me figure out when and why that happens, I could use it to my advantage when setting up flower bonks. FYI, I'm still stuck on the same spot about a third of the way through Level 1-1. I can't quite get the height I did in my old movie, and that throws everything off. If only the old version of Mednafen could display movie input on-screen, I could replicate it trivially in PCEjin. Argh. Anyway, once I finally do get past that, I still need to figure out how to save a little energy to manipulate a meat drop in level 1-2. Is it me, or did the phrase "meat drop" just sound wrong? :-)
Skilled player (1327)
Joined: 9/7/2007
Posts: 1354
Location: U.S.
To save health, you'll have to jump over one flower and fly over another instead of flying over both of them. I suggest jumping over the first flower because that is where you accumulate most of the damage.
Former player
Joined: 10/30/2008
Posts: 29
I just had a thought. It might not be necessary to conserve energy for 1-3 after all. It might be quicker for Bonk to die (and therefore rapidly sink in the water) than to swim all the way down. I'll test it out shortly.