Automating Framedata: How they do it.

Sometimes I feel like the way framedata works is just as abstract and random as this video about plumbuses. Anyways, lets start from the beginning.

Note: This article was sponsored by my Patrons: To help support the creation of more content like this, please consider becoming a Patron here

What is Framedata Anyways?

When people talk about framedata, they are generally talking about a specific set of properties associated with a attack in a fighting game. Knowledge of these properties can be used to understand how fast a move is, what combos after said move, and how safe the attacker is when the move is blocked. This data is essentially what dictates the flow of the game.

Startup – How many frames does the attack take to become active
Active – How many frames does the attack remain active
Recovery – How many frames until the character can move or block after the move is over.
Hitstun – How many frames is the opponent stunned when the attack hits
Blockstun – How many frames is the opponent stunned when the attack is blocked.

To give an example of a situation where framedata is effective, lets say you are playing SF5, and its a mirror match; Ryu vs Ryu, the classic matchup. You opponent keeps doing st.MP followed by st.MP, hadouken on block. You keep feeling like you have to just sit back and watch it happen, as pushing any button just ends up with you being counterhit by the second st.MP.

Ryu’s st.MP is +1 on block. It has a 5 frame startup. This means that you have a 4 frame gap to do a move before the second st.MP hits. Using a list of framedata allows you to come to this conclusion, and then look for 4 frame or less moves to counter your opponents simple blockstring.

Where does Framedata Come from?

Framedata comes from the game. To be more specific, you can derive framedata from the game itself. There are multiple methods of doing this, and ill talk about each of them and the pros and cons below.

First, lets talk about the original method. Recording Video.  

Video Method: The Ancient Path

Originally, if you wanted to get framedata, the best method was to record footage of the game, then manually review it and count frames by hand. In most situations, this would involve doing the move in training mode 3 separate times: Once for whiff, once for hit, and once for block. After the move hits or is blocked, up is held on both controllers, and a note is made as to which character is able to jump first, and how many frames they jump before their opponent.

This method was the only method for a long time, but its clear to see why I call it “The Ancient Path”. This method is old. And slow. And it requires a lot of manual labor. This makes it prone to tons of errors. Human error, dropped frames from recording, dropped frames from the game itself, frameskip, etc, can cause data to be incorrect. After a game is patched, the entire process has to be repeated to look for changes if there aren’t good patch notes.

It also makes a lot of assumptions about how the game works. For example, what if a move has different framedata on crouching characters? What if it has non-standard framedata on counter-hit? What if the game features hitstun scaling depending on the length of the combo? What if theres a distance where the move hits later/earlier than normal?

This method is very straight forward, but it requires video recording equipment and tons of time, and is prone to error.

@toolassisted method: The Automated Input Path

So, one of the biggest issues with the above is that it requires you to do things by hand. But what if you could simply automate doing all the moves, and automate the counting of frames as well? Whats what @toolassisted does! Inputs are sent to the game, the result is recorded through hooks, and a database of framedata is created!

One of the nice things about this is that, implemented correctly, the data that is recorded is always correct. Since its being done automatically, theres no room for human error, and any mistakes in the code can be corrected and then have the entire database regenerated with little human interaction.

However, it still manages to bring over all of the other shortcomings of the previous method. You still have to test each move multiple times in realtime to get the data you need, and you still have to make assumptions about what the game engine allows in order to get the data players may want.

For 99% of situations, this method is fine. However, I aimed to do things a different way.

@dantarion method: Simulate the game offline based on the game’s data files

Ill admit, this wasn’t what I aimed to do, but this is what I ended up doing for SF5. I have basically written code that takes the actual files the game uses that contain the moveset information, and simulates what happens on a frame by frame basis. This allows me to process data as fast as my machine allows, much faster than the 16ms/frame speed that the above methods are generally restricted to (I think @toolassisted may use something to speed the game up for his method actually)

This means that I can process all moves for all characters in batch in under 30 minutes for SF5. It also means that I can do processing offline, without the game running, in a script, or even in the browser. This is how boxdox works. Its not using recorded data, its is actively simulating a dumbed down version of the game engine.

The big con of this is that the accuracy depends wildly on how correct my pseudo engine is when compared to the real thing. If I don’t implement physics and movement properly, then all the data becomes slightly off. The pseudo engine was developed by a mix of reverse engineering the data formats, the executable of the game itself, and recording the real engine results and comparing them to the pseudo engines results.

For most attacks, my pseudo engine is 100% accurate. However, projectiles, push-box simulation, hit/block pushback simulation, juggle points, etc, are all unimplemented, so situations that rely on those all fail miserably.

This article is all about SF! What about Blazblue!

Blazblue is pretty much impossible for my pseudo engine method.
Ill explain why and compare the engines of SF vs Blazblue/Xrd in my next blog post.

28 thoughts on “Automating Framedata: How they do it.”

  1. An interesting dialogue is price comment. I think that it is best to write extra on this topic, it won’t be a taboo topic but usually people are not enough to talk on such topics. To the next. Cheers

  2. I precisely wished to appreciate you once again. I’m not certain the things that I would have done without the actual opinions revealed by you concerning this concern. It was actually a frustrating crisis in my position, but understanding your specialized fashion you handled that took me to weep with contentment. Now i’m grateful for the service and thus hope that you recognize what an amazing job you’re accomplishing instructing other individuals using your web blog. I know that you’ve never got to know any of us.

  3. There are some fascinating deadlines in this article however I don抰 know if I see all of them heart to heart. There is some validity however I’ll take hold opinion until I look into it further. Good article , thanks and we want more! Added to FeedBurner as effectively

  4. Good post. I study one thing more challenging on completely different blogs everyday. It can always be stimulating to learn content material from other writers and follow slightly something from their store. I抎 choose to make use of some with the content material on my weblog whether you don抰 mind. Natually I抣l offer you a link on your internet blog. Thanks for sharing.

  5. Once I originally commented I clicked the -Notify me when new feedback are added- checkbox and now each time a comment is added I get 4 emails with the identical comment. Is there any means you can remove me from that service? Thanks!

  6. A formidable share, I just given this onto a colleague who was doing a little bit evaluation on this. And he in truth purchased me breakfast as a result of I discovered it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to discuss this, I feel strongly about it and love reading more on this topic. If potential, as you grow to be experience, would you mind updating your blog with extra details? It’s highly useful for me. Large thumb up for this blog publish!

  7. An impressive share, I just given this onto a colleague who was doing just a little analysis on this. And he in actual fact purchased me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the treat! However yeah Thnkx for spending the time to debate this, I really feel strongly about it and love studying extra on this topic. If possible, as you change into experience, would you mind updating your weblog with extra details? It is extremely useful for me. Huge thumb up for this weblog submit!

  8. Good post. I be taught something tougher on different blogs everyday. It can always be stimulating to read content material from other writers and practice a little something from their store. I抎 desire to use some with the content on my weblog whether you don抰 mind. Natually I抣l give you a hyperlink in your web blog. Thanks for sharing.

  9. Thank you a lot for providing individuals with remarkably terrific possiblity to read from this blog. It is always very lovely and also full of a good time for me and my office co-workers to search your site at least three times a week to read through the fresh items you have got. Not to mention, I’m so usually motivated with your terrific solutions you give. Certain 3 facts in this posting are in reality the simplest we’ve ever had.

  10. I not to mention my buddies appeared to be looking at the excellent strategies on your website and then all of a sudden I got a horrible feeling I had not expressed respect to the website owner for those techniques. Most of the boys had been totally joyful to study them and have in effect simply been having fun with them. We appreciate you really being so thoughtful as well as for having varieties of terrific useful guides most people are really desperate to be informed on. Our own sincere regret for not expressing appreciation to you sooner.

  11. I抦 impressed, I must say. Actually rarely do I encounter a weblog that抯 both educative and entertaining, and let me let you know, you may have hit the nail on the head. Your idea is outstanding; the issue is something that not enough individuals are speaking intelligently about. I am very happy that I stumbled across this in my seek for one thing referring to this.

  12. Good post. I be taught one thing more challenging on different blogs everyday. It will all the time be stimulating to learn content from different writers and apply a bit something from their store. I抎 favor to make use of some with the content material on my weblog whether or not you don抰 mind. Natually I抣l provide you with a hyperlink on your net blog. Thanks for sharing.

  13. Oh my goodness! an incredible article dude. Thanks However I’m experiencing challenge with ur rss . Don抰 know why Unable to subscribe to it. Is there anybody getting similar rss drawback? Anybody who is aware of kindly respond. Thnkx

  14. I and also my guys were actually digesting the good things located on your web site and so all of the sudden I had an awful suspicion I never expressed respect to the blog owner for those secrets. Most of the women happened to be consequently stimulated to read through all of them and have in effect definitely been using these things. Appreciate your really being very kind and also for deciding on this sort of superb guides most people are really desirous to learn about. Our sincere regret for not expressing appreciation to you sooner.

  15. After research a number of of the weblog posts on your website now, and I truly like your means of blogging. I bookmarked it to my bookmark web site list and will likely be checking again soon. Pls take a look at my website as effectively and let me know what you think.

  16. There are definitely a whole lot of details like that to take into consideration. That could be a nice level to carry up. I supply the ideas above as normal inspiration however clearly there are questions like the one you carry up where an important factor can be working in sincere good faith. I don?t know if finest practices have emerged round issues like that, however I am sure that your job is clearly identified as a good game. Both boys and girls really feel the impact of only a moment抯 pleasure, for the rest of their lives.

  17. I want to show my love for your kindness giving support to persons that should have help on this content. Your very own dedication to passing the solution all-around had been exceedingly informative and have consistently encouraged those much like me to realize their dreams. Your amazing informative guide indicates a lot a person like me and far more to my peers. Thanks a ton; from everyone of us.

  18. I抎 have to examine with you here. Which is not one thing I usually do! I enjoy reading a post that may make individuals think. Additionally, thanks for allowing me to comment!

  19. After I originally commented I clicked the -Notify me when new comments are added- checkbox and now every time a comment is added I get four emails with the same comment. Is there any manner you’ll be able to take away me from that service? Thanks!

  20. I would like to show thanks to the writer just for rescuing me from this type of scenario. Because of researching through the world wide web and getting thoughts which are not powerful, I assumed my entire life was done. Living without the presence of solutions to the issues you’ve fixed as a result of your entire guideline is a serious case, as well as the kind that could have negatively damaged my entire career if I had not encountered your web site. Your good skills and kindness in dealing with the whole lot was tremendous. I am not sure what I would have done if I had not come upon such a point like this. It’s possible to at this moment look forward to my future. Thank you very much for this specialized and result oriented help. I will not be reluctant to propose your web blog to any individual who needs and wants recommendations about this topic.

  21. I was more than happy to find this web-site.I wished to thanks on your time for this excellent learn!! I positively having fun with every little bit of it and I have you bookmarked to take a look at new stuff you blog post.

Comments are closed.