Player (195)
Joined: 8/10/2013
Posts: 161
I don't, and I'm not sure how I would find it. Kirkq helped me find the addresses I currently have. I don't have much knowledge about scripts and stuff. If I did find it I would probably restart to try to get a better colliwobble. I just know a lot about banjo, not much about programming :^)
Projects: Banjo-Kazooie Any% with FFM
ALAKTORN
He/Him
Player (99)
Joined: 10/19/2009
Posts: 2527
Location: Italy
RNGs behave one of two ways most of the time. Either update every frame, or only when something random needs to happen. If you can find some random event in the game then it should be pretty easy to find the RNG by playing around with it; for example for Brave Fencer Musashi there is a card game where a card number gets pulled out at random. I just made a savestate before pulling out the number, and checked that my frame timing didn’t make the number change. From that I understood it was an RNG that only updated when randomness was required, and planned my RAM Search around that. For example you could start with “number of changes = 0” and just spam it a bunch of times to weed out addresses that are changing (because I know the RNG isn’t). Then you make it pull out the card, and do something like “number of changes = 1”. Play around like that and you should find it. RNGs are almost always 4 bytes big so use that search size (have never found them to be smaller), but most of the time the value that’s truly used is only like the upper 2 bytes, but that’s not important for finding the RNG in RAM Search. Edit: Oh and to make sure you’ve found the right address, you can cheat it to freeze it on a particular value, and then check that randomness is always the same (for example in my Musashi example from earlier, the card number pulled out would always be the same).
Player (195)
Joined: 8/10/2013
Posts: 161
Okay thanks alaktorn, ill try look for it later tonight or tomorrow when I get time and post back here with results
Projects: Banjo-Kazooie Any% with FFM
Post subject: Joining the BK Science crew
Isotarge
He/Him
Experienced player (523)
Joined: 7/28/2015
Posts: 17
Location: Australia
Hello everyone, posting here firstly to introduce myself to the TASVideos community and secondly to inform you of some recent findings I have made regarding BK. My name is Isotarge, I work as a developer for a small game studio in South Australia. Recently I have been working on several projects to do with speedrunning and TASing N64 games, specifically Donkey Kong 64 and Banjo Kazooie. As a result Cronikeys, Exchord, Hyper and RingRush have been in touch with me regarding these games. I've been doing extensive research into several aspects of these games, posting my findings to a small project on GitHub, currently called ScriptHawk which includes Lua scripts and RAM watches for use with BizHawk and extensive documentation for several games. My biggest find in BK so far is explaining how the "random trajectory" value is interpreted by the game, originally documented by Kirkq in 2013. It's a float, not an unsigned long and gets set to whatever Banjo's current facing angle is (between 0 and 360 degrees) when you destroy something. There are at least 3 parameters which determine trajectory: Angle, Horizontal force and Vertical force. Horizontal force is located right after angle in memory, it is also a float and is always set to 1 when something is destroyed. You can set this value higher to perform interesting shots like shooting the Jiggy that the last hut in MM spawns straight into Ju-Ju's mouth, as shown here. I have not yet figured out where vertical force is derived from or even where it is in memory but it certainly does vary, possibly being set by the PRNG. I will be working closely with Hyper during the BK 100% TAS process and look forward to seeing our understanding of how this game works progress. If you would like to chat with me live, I regularly stream BK/DK64 research to my twitch page. Cheers, Isotarge.
Experienced player (703)
Joined: 2/5/2011
Posts: 1417
Location: France
http://pastebin.com/hNHzxyaH well, it happened. ;D (basically you can unlock all moves altho only on ng+ :( )
Current: Rayman 3 maybe? idk xD Paused: N64 Rayman 2 (with Funnyhair) GBA SMA 4 : E Reader (With TehSeven) TASVideos is like a quicksand, you get in, but you cannot quit the sand
Joined: 8/1/2006
Posts: 428
If you cause two random trajectories on the same frame, do they always have the same vertical speed?
Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host
Editor, Expert player (2001)
Joined: 8/25/2013
Posts: 1199
How's this been going so far?
effort on the first draft means less effort on any draft thereafter - some loser
Player (195)
Joined: 8/10/2013
Posts: 161
I haven't made any progress since my last WIP. I had a busy last month with work and moving, and with the discovery of furnace fun moves, I've been routing that for RTA runs. Isotarge is trying to work on a roll flutter script for me to try to optimize the movement in the first few minutes of the game. He also discovered a ton of really awesome memory addresses including the RNG addresses, but I had a hard time figuring out exactly how the RNG works just based on those values and for what little time I spent with them. Life has settled down now though so I can start messing around with this again. Here are the memory addresses https://github.com/Isotarge/ScriptHawk/blob/master/Watch/Banjo-Kazooie%20%28USA%29.wch
Projects: Banjo-Kazooie Any% with FFM
Player (195)
Joined: 8/10/2013
Posts: 161
I finally made some progress today after a couple of months. I decided to continue my run despite the known rng timelosses, which add up to around 1 second I could have saved over my current TAS (bad colliwobble placement - unknown amount of time, purple guy causing lag in MM ~ 10 frames, and termite getting in my way in the tower - 3 frames). After playing around with the termite when I was setting up the jiggy angle, even one or two degree angle changes in my movement while falling from the tower caused the termite to drastically change its movement sometimes. Most of the time it would completely stay still, and a few angles caused it to BOLT towards the huts area, completely the opposite of where I needed to go. Enemy movement seems to be largely dependent on subtle movement changes within the level. With this in mind, I really didn't feel like spending hours trying to get the colliwobble to be in the best place. It would be difficult to figure out exactly when I should alter my movement to manipulate it. This kind of optimization is more suited for a project with several authors. I also felt like restarting would destroy my motivation. Anyways, moving forward. I saved about a tenth of a second on the section from leaving ticker's to the jiggy over my last WIP with some interesting movement, and I finished the section up to the jiggy in the ruins area. Finally done using only roll flutter movement, so progress should start happening a lot quicker now. Kaptainkohl, another BK/BT runner, has been trying out TASing the last couple days, and he might help me out in the future. I just hope the Conga area doesn't halt my progress as there are 2 tricks in that section that I don't fully understand yet. Also JSmith: I have no idea. Not sure where it would apply.
Projects: Banjo-Kazooie Any% with FFM
Player (195)
Joined: 8/10/2013
Posts: 161
https://www.youtube.com/watch?v=YYK1jfvGB7g Here's a WIP of my run through the end of Mumbo's Mountain. I'm very disappointed that this didn't turn out how I wanted it to. I lost around 10 seconds to RNG in this level. The purple guy at the end just would not see me and still nobody has figured out how to change the way enemies act.
Projects: Banjo-Kazooie Any% with FFM
Former player
Joined: 6/30/2010
Posts: 1093
Location: Zurich, Switzerland
Looks great, despite the unfortunate timeloss with the RNG I'd suggest taking that for this run and just continue, so you can keep your motivation. Improving small stuff will be much easier once a TAS with this new route has been completed.
Current project: Gex 3 any% Paused: Gex 64 any% There are no N64 emulators. Just SM64 emulators with hacky support for all the other games.
Joined: 9/18/2012
Posts: 48
https://www.youtube.com/watch?v=OCnD0nRbmcI A possible (yet unlikely) alternative in ttc. If there was a way to actually get on the ledge to the treasure chest, I think it might be useful, but at the same time the requirement for jiggy dance also wastes time. I usually flap right when banjo starts to say jumbo (or whatever says). Hold r once you clip so camera doesn't get stuck. If anyone wants to test, feel free.
Joined: 8/1/2006
Posts: 428
Hyperresonance wrote:
I'm very disappointed that this didn't turn out how I wanted it to. I lost around 10 seconds to RNG in this level. The purple guy at the end just would not see me and still nobody has figured out how to change the way enemies act.
Break the beehive with an egg to manipulate the jiggy closer to the enemy?
Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host
Player (195)
Joined: 8/10/2013
Posts: 161
I had an idea to try and manipulate the purple guy a bit more, but it turned out to be slower. I really rushed the movement from the final jiggy to the end of the level, and I could make the guy at least move in a straighter line to the jiggy. So I will redo that section a bit and Mumbo's Mountain will be done for good. It's a shame, but can't really do much about it. EDIT: @jsmith The hut spawns are fixed actually (angle only, but not velocity) so I can't make the jiggy spawn in the direction of the purple guy, though I did make it spawn the least distance possible from the hut.
Projects: Banjo-Kazooie Any% with FFM
Former player
Joined: 4/18/2015
Posts: 168
Location: Canada
Hyperresonance wrote:
I had an idea to try and manipulate the purple guy a bit more, but it turned out to be slower. I really rushed the movement from the final jiggy to the end of the level, and I could make the guy at least move in a straighter line to the jiggy. So I will redo that section a bit and Mumbo's Mountain will be done for good. It's a shame, but can't really do much about it. EDIT: @jsmith The hut spawns are fixed actually (angle only, but not velocity) so I can't make the jiggy spawn in the direction of the purple guy, though I did make it spawn the least distance possible from the hut.
If you really didn't mind, you could always upload your wip file here and others can help try manipulating the Grublin. Personally, I would love to help you out to make this 100% the best it can be. Even the SM64 100% has 15 authors so clearly not everything can be done by one person on a project as big as this. But again, it's up to you if you'd like to do that or not! :)
Player (195)
Joined: 8/10/2013
Posts: 161
I have no qualms about others helping me at all! Nobody really expressed significant interest in helping me yet. I will upload it when I get home from work as well as some savestates for convenience.
Projects: Banjo-Kazooie Any% with FFM
Former player
Joined: 4/18/2015
Posts: 168
Location: Canada
Alright, sounds great! I look forward to testing this out.
Player (195)
Joined: 8/10/2013
Posts: 161
https://www.dropbox.com/sh/zh7kztmv5dpbxyv/AAAowNh1eSuZ2eV-59RMheYaa?dl=0 Here's my movie file with a savestate after the hill jiggy before juju, and a state after the juju jiggy. Good luck messing around with it.
Projects: Banjo-Kazooie Any% with FFM
Editor, Experienced player (730)
Joined: 6/13/2006
Posts: 3300
Location: Massachussetts, USA
I've watched it, good stuff so far! The very long delay to get the enemy to run over is way too long, longer than the normal jiggy animation. I'd continue to work on that, and if you cannot get it, I'd just get the jiggy normally. My one criticism is that I was under the impression that when you're running as Kazooie, when you jump you have a slight slide on the ground that brings up some dust that has a slight slowdown at the end, and this small slide is a bit higher than your normal running/jumping speed, so it's fastest to jump as Kazooie, do the slide, and jump again right before your speed slows down, yet you often jump as soon as you land, missing that slide. I know up hills you want to spam jump, but on long flat sections you spam jump as well, any reason for this?
Homepage ☣ Retired
Player (195)
Joined: 8/10/2013
Posts: 161
Though the delay to get the jiggy is quite long, its still about a second and a half faster than getting it normally. You're correct that the slide has a slowdown at the end, but there's no speed difference between sliding and jumping as far as I can tell. However, I have an explanation for why several people have thought that about sliding. During your slide, there is a certain point where kazooie's hitbox is extended slightly forwards, and sometimes this is enough to grab a note 1 frame earlier. Though this is only useful when you have to grab something and then jump in a different direction. So sliding everywhere is pointless. Sliding could make for less inputs, but might as well not take the risk of losing frames on tiny little slopes everywhere.
Projects: Banjo-Kazooie Any% with FFM
Former player
Joined: 4/18/2015
Posts: 168
Location: Canada
So after messing around with your savestate for a while I managed to figure out how the Grublin RNG works! I even figured out how to manipulate it. At first I thought it might be possible to manipulate depending on Banjo's position when he comes out of Mumbo's Hut but it turns out it all depends on when you enter. While on Mumbo's Mountain, it seems that some RNG counter is rolling and when you enter his hut on different frames it changes the Grublin's spawn points and how quickly they react to Banjo's presence. Then while in his hut, the RNG locks and no matter what you do or when you leave doesn't change it. This is probably a good thing since less manipulation is required :P I made a bunch of movies to showcase different outcomes after grabbing the Jiggy in the skulls eye. https://www.youtube.com/watch?v=kDIpMs4Du3s https://www.youtube.com/watch?v=yCfNNIwhjYA https://www.youtube.com/watch?v=pEby4U1dOtc https://www.youtube.com/watch?v=oDEnNjby6C4 https://www.youtube.com/watch?v=4PxyB4OdllU (Don't mind the note collecting in the hut. I did that before I knew the RNG was locked). I should mention that the RNG might also be effected by where Banjo lands when he jumps out of the eye. I can't really tell and I didn't test that out fully but it someone could find the RNG value this would be a whole lot easier to manipulate :P But I hope this all helps!
Player (195)
Joined: 8/10/2013
Posts: 161
Thanks for looking into it! After watching your videos, it looks like it will just come down to finding the best combination of entering on the earliest frame that gives the best result after leaving the hut. Something tells me that there might be some sort of internal aggro timer on the Grublin, and the fact that you spent more time around him before going in the hut reduced the amount of time needed to aggro after the hut. But your movement also changed his placement slightly too. Speculation at best I guess but I will mess around with it more tonight. EDIT: After some testing it looks like I can save maybe around 2 seconds with this manipulation technique. Any faster would have to come from manipulation earlier in the level.
Projects: Banjo-Kazooie Any% with FFM
Former player
Joined: 4/18/2015
Posts: 168
Location: Canada
I'm happy to hear this has saved some time! After reading your post, I realized something. You said, "my movement also changed his placement slightly." Then it hit me! It wasn't what frame I was entering Mumbo's Hut that was changing their placement, it was where they were left standing once I went inside! If you have a Grublin follow you to any point on the hill then go and enter the hut, it will stay in that same spot it was originally left at. Link to video So maybe before grabbing the skull Jiggy, you can manipulate the one Grublin so it's a little bit closer to the hut. It might save even more time, I'm not sure. I was also thinking, instead of breaking that hut last, would it be faster to break the one on the other side of Mumbo's? The Grublin there is already close to that hut. Or is it already confirmed slower?
Player (195)
Joined: 8/10/2013
Posts: 161
Me and Kaptainkohl already kind of realized that enemies will stay in the same vicinity after you enter a loading zone and then return to that area. So I knew it was something to do with that but I just didn't want to have to sacrifice extra movement in order to change his position. I didn't think it would be worth the extra movement though, so I'm thankful you looked into it! I also am pretty sure that enemies will stay in the same spot once you get far enough off screen. For example, if you shoot an egg at a crab in TTC, then run away so that you can't see it anymore, and return later, it will still be flipped over. Also with regards to draw distance and loading, I found out that juju spins constantly in the level. I wasn't sure if it was that, or if he had a set starting position as soon as he came on camera or something, but after timing his cycle, I figured that out. Theoretically the best route for the level breaks this hut last. I just got unlucky with where the Grublin ended up. EDIT: Ninja edit, I didn't want you to think I was crapping on your discovery. I just forgot to mention before that me and Kaptainkohl realized that about spawn points. But you basically confirmed it as a third party so that's great!
Projects: Banjo-Kazooie Any% with FFM
Former player
Joined: 4/18/2015
Posts: 168
Location: Canada
Oh, haha no worries! ;) I didn't realize you were getting help from other people too so that's good to hear. Well I'm glad I helped, even a little bit! I had fun figuring out the Grublin RNG and whatnot so if you ever need help again feel free to post a savestate or movie file.