cs-demo-manager icon indicating copy to clipboard operation
cs-demo-manager copied to clipboard

Decoupling demo analyzer from GUI dependency

Open dangmai opened this issue 7 years ago • 6 comments

Hi,

First of all let me say Thank you for creating the application, it is a wonderful tool that does a lot of things right and clearly has a lot of thoughts put into it.

I'm wondering if you think it would be beneficial if we decouple the Demo Analyzer part (basically the Core project) from the GUI dependency, maybe make it a .Net Standard library instead of .Net framework program, so that it can be used by other programs on different operating systems. Possible use cases may include: Command Line Interface to the program (maybe to print out JSON data for a demo file); cross platform access to the library so that other cross platform GUIs can be developed against the library.

I'm not quite sure how feasible it is to do it yet, but won't mind jumping in the code base to find out. But if you think it's not a good addition to the program I'll understand too 🥂

dangmai avatar Jul 31 '17 20:07 dangmai

Just jumping in to say this is a great idea. I started a project to do exactly what you used as an example (command line tool to convert dem -> json but don't really have the .NET experience to make it happen myself.

n1c avatar Aug 01 '17 06:08 n1c

I've recently started doing this and it isn't particularly hard. The analyzer is isolated within Services/Concrete/Analyzer. The only dependencies being Core and Demoinfo. The AnalyzeDemosAsync method is pretty much all you need to run the analyzer and using the parsed Demo obj to write to file. More sophisticated recordkeeping can be done by overriding the hooks for each analyzer but I haven't gotten around to it yet.

kpei avatar Sep 13 '17 14:09 kpei

@kpei can you share what you have so far?

xpekt avatar Jun 28 '18 18:06 xpekt

Why don't you just write your own analyzer using demoinfogo?

There is a 100% chances that you don't want exactly the same data from the demo as this program. So you would sacrifice speed and maintainability.

You would also have to write something to convert the data in your own format.

Writing your own customized analyser sounds a lot easier.

master117 avatar Jun 28 '18 19:06 master117

@xpekt sure. I used it for a very specific purpose so I'm only extracting parts of the data I'm interested in. The main idea is still there but like @master117 said, the analyzer is outdated, slow and you won't be able to get everything that you want. However, it is still much easier than having to rewrite the parser.

kpei avatar Jun 29 '18 13:06 kpei

i ended up doing it myself, but thank you @kpei

xpekt avatar Jun 30 '18 19:06 xpekt

A new major version has been released, closing the issue 🧹

akiver avatar Dec 02 '23 15:12 akiver