Getting specific metrics from StarCraft 2 Replays [closed] - parsing

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm looking for a way to pull some metrics from a replay, but after doing some research I think this might be more difficult than I originally thought. From what I've found, the SC2 Replay is mostly events (and some info about the replay and players), those events by themselves don't provide the information I was hoping to pull, because the replay and the game engine are highly tied together (of course).
So, I'm wondering if anyone has a solution on how to pull metrics from a replay? I was looking for these kinds of things:
Current Army Value
Current Floating Resources
Current Building Production
...
Basically every 30seconds or something.
Any ideas?

ggtracker uses sc2reader to get something close to the current army value -- it computes the "active army" size. active army is based on player selection actions. a unit joins the "active army" the first time it is selected, and leaves the "active army" after the last time it is selected.
you may also be interested in the stats contained within the s2gs file, which are displayed in the post-game stats display. for example it contains the army size graph and income graph data. s2gs files can be parsed by sc2reader. this teamliquid thread has more details about how you can obtain s2gs files: http://www.teamliquid.net/forum/viewmessage.php?topic_id=330926. basically, you can manually cause the s2gs files to appear on your computer by clicking in the SC2 client.

Related

How to model common information for Rails application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm a bit new in rails development I'm modeling a website with few resources and so far so good. But here is my question:
I would like to allow the admin users to manage information show in most of the pages: Application name, telephone number, address, default email and this kind of things.
My current idea is make a model Property with name and value, but somehow I'm not convinced about this approach because I'll need to access the database to get this values for every request.
Thanks everyone for your time! :D
This seems like an OK approach. If you implement caching, it no longer will hit the db with every request, and honestly it probably isn't really that big of a deal even without the caching. Build it the way you need, and optimize afterward, if necessary.
With all this being said, it may be worth considering how much things like the phone number are going to change, and balance the cost of developing a dynamic solution against the time it would take to change once, 3 years from now (if the number ever does change), in a partial.

In Firebase, How do I prevent memory-modification cheats (iOS) [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have Users table in Firebase. However, users can change our scores, etc. How can i handle this situation ?
Thanks
In general I recommend storing the actual moves that a user has made in the game, in addition to the score they achieved. At the very least you can then replay those moves to see if the score is correct or manipulated. But you can also further analyze the moves to see if they were made by the player or seem synthesized.
You can use Firebase's security rules to validate the moves of certain games. But depending on the game this may be beyond what you're willing to write security rules for. In that case, you should write the (move and score) validation into a back-end process that runs in a trusted environment. This may be a an app server you control, but it also be as simple as a process you periodically run on your own machine.
Some links that cover the same/a similar topic:
Firebase complex validation
Firesafe: Add Complex Security Logic to Your Firebase App
can Firebase be used to backend Unity MMOs?

How to make one page real-time in Rails app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have an app that is already fully built, the only thing I'd like to add is real-time rendering of one of my pages.
Suppose it is a page with all the pizzas. When pizza is added to the database, I'd like page to show it without refreshing.
I know you can do it with websockets, but is there any easier way? Could, eg, AngularJS help here (as I understand it refreshes the page contents as soon as model is changed)?
Well you could make a small service in Angular that asks the server like every 15 secons or so, to see if there are new pizzas added to the database. (Say the last time you took the pizzas from the server you had 15 of them returned. Now you send that number 15 back with the check request and compare it with the database)
If so, it will call the query method in the pizza Angular service to fetch the new pizzas.
If this is a small table with often changing info then I would also suggest to migrate this model into Redis instead. Asking info repeteadly from Redis is a lot cheaper than it is to ask like this from a database.

How can I get retrospective info on how often each of my outputcache fires? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'd like the ability to find out how often each output attribute/filter is being applied, so I need per action granularity and I would like my solution to be as efficient/scalable as possible. The perfmon counters (application-wide) (as answered below) are very handy, but I'd like the per action granularity.
I'd be open for a database solution, but it's not preferred, if I went down this route, how would I insert into the database (for when a response is cached), would I have to subclass Outputcache, and write some code in the constructor?
I'd also be open for logging something out to a file? But again it looks like I'd need to subclass.
I'd also be open to Google analytics type approaches, whereby the user response get's it back.
Is there a way to put a 'cached' marker in my http header? This could be used as an identifier as well.
You can use the ASP.Net Applications perf counters. The ones relevant to your question are:
Output Cache Entries
Output Cache Hit Ratio
Output Cache Hits
Output Cache Misses
You can use perfmon's data collector feature to collect these perf counters for you as your application runs.
These are per-app, so you won't get the per-action granularity you ask for.

In solr how do you maximize variability within a page of a result set? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
This is for a product search where we want to show a variety of brands in the search results (24 per page). Ideally we would limit it to each item on the page must have a unique brand id, unless given the page in the result set, that is impossible.
Any ideas on how to accomplish this?
what a great question! There's no simple answer, but you might want to try using the grouping functionality that Solr provides. This would you give you one result per brand id that has matching results. If you don't get enough results from that, you could fall back to the "regular" search results. But I don't know of any way to distribute results evenly throughout your brands, because Solr results are ordered using a scoring mechanism where each result is scored independently. Perhaps you could write a Scorer with some memory that would down-weight subsequent matches from previously-seen brands?

Resources