Giter VIP home page Giter VIP logo

Comments (7)

GraylinKim avatar GraylinKim commented on July 29, 2024

Hey g4borg, good catch!

I develop about half and half in Windows and GNU/Linux but I guess I've never run sc2printer on linux to catch the error.

I notice you've made a fork, are you looking to contribute? There's always work to be done and we'd love to have you on board!

If so I'll gladly handle your pull request, otherwise I'll fix it myself.

from sc2reader.

g4borg avatar g4borg commented on July 29, 2024

yeah wrote you a message about the fork, so you can close this bug later with the cool closes #bug stanza !! :D
i would not touch your main code, I want to branch it to test out some other replays. see message.

you fix it :) i am still a github noob.

from sc2reader.

g4borg avatar g4borg commented on July 29, 2024

ah i closed that, omg.

from sc2reader.

GraylinKim avatar GraylinKim commented on July 29, 2024

Opened it again. You can (I think github gives you permissions) change the status of the issues with the actions pull down at the top of the issue thread.

from sc2reader.

GraylinKim avatar GraylinKim commented on July 29, 2024

I fixed the magic in commit: 29828cd

from sc2reader.

g4borg avatar g4borg commented on July 29, 2024

since i am now at writing my first network engine, i still study sc2 mechanics and mainly look at how your reader is going on (i dont know if you remember, but we talked about the magic once, and i forked sc2reader since i wanted to implement sc2 reading for starbattle maps back then)

what i noticed about learning how to write an engine is, that sc2 works as a predetermined state machine and sends only inputs, which in fact is how the replays might be saved, so basicly, your reader gives me a lot of clue now, how the sc2 engine seems to work

you would help me a lot if you would clarify me following questions:

  • you learn the second of any game event as a combination of frame >> 4, which leads me to believe, that there are 16 frames per second in the engine. am i right? that means, the sc2 integrator steps forward 16 times per second, and interpolates all movement inbetween mostly linearly to fit the fps i guess.
  • do you also track movement with your reader? (I guess no, since i didnt find any code which leads me to any sort of state integration, therefore i guess, you only scan for game events and recalculate the game by your own ruleset?)
  • maybe if my engine works flawlessly, i will try to play around wrapping some classes and moving some dots around with the replays, but i am not sure, if your reader already exposes that kind of data. is it in the stream? well if not, i am not disappointed, mostly, i study the state machine of sc2 mainly, because it helps me to see if i do my own engine right, but mostly my engine is way simpler and also not predetermination safe and works with 0.2 integration instead of 1/16th.

you can email me also directly to [email protected]

i hope the questions are understandable, i would be very happy if you take your time to give an answer them, even if just short "I assume yes" :)

anything i can help, i will

c ya

Gabor Guzmics
<>< http://www.g4b.org

from sc2reader.

GraylinKim avatar GraylinKim commented on July 29, 2024

since i am now at writing my first network engine, i still study sc2
mechanics and mainly look at how your reader is going on (i dont know if
you remember, but we talked about the magic once, and i forked sc2reader
since i wanted to implement sc2 reading for starbattle maps back then)

Ah, okay. You should definitely make sure to keep your fork up to date!

Also, keep in mind that there are no guarantees that event parsing for
custom games like Star Battle works. Custom maps are not currently
supported and if they work then it is sheer coincidence. If you are able to
make changes to improve custom map support I'll gladly accept them though.

what i noticed about learning how to write an engine is, that sc2 works as

a predetermined state machine and sends only inputs, which in fact is how
the replays might be saved, so basicly, your reader gives me a lot of clue
now, how the sc2 engine seems to work

Yes, the Starcraft II client is a deterministic state machine with the two
primary inputs:

  • The s2ma file - contains all the pathing info, initial unit info,
    trigger info, custom data, etc.
  • The sc2replay file - contains all the lobby parameters and
    non-derivable game events to drive the engine. Non-derivable basically
    means player initiated events, events generated by the game engine are
    generally not recorded (some exceptions).

Starcraft just loads up the initial game state and replays the events in
order.

  • you learn the second of any game event as a combination of frame >> 4,
    which leads me to believe, that there are 16 frames per second in the
    engine. am i right? that means, the sc2 integrator steps forward 16 times
    per second, and interpolates all movement inbetween mostly linearly to fit
    the fps i guess.

There are 16 frames per game second in SC2. Events come in on a frame
granularity though, so when replaying the events through an engine you'll
want to stay on the frame level. Seconds are only pulled to be more
meaningful to a human reader.

  • do you also track movement with your reader? (I guess no, since i didnt
    find any code which leads me to any sort of state integration, therefore i
    guess, you only scan for game events and recalculate the game by your own
    ruleset?)

Movement tracking would be a monumental effort. You'd need to create a very
accurate reproduction of their game engine as well as improve upon efforts
to read information out of map files. I did run into one pretty advanced
map reading tool the other day that you can check out: TL
Threadhttp://www.teamliquid.net/forum/viewmessage.php?topic_id=132627,
Unofficial Source https://github.com/RFDaemoniac/sc2-map-analyzer,
Documentationhttp://www.sc2mapster.com/assets/sc2-map-analyzer/pages/analysis-details/
.

  • maybe if my engine works flawlessly, i will try to play around wrapping
    some classes and moving some dots around with the replays, but i am not
    sure, if your reader already exposes that kind of data. is it in the
    stream? well if not, i am not disappointed, mostly, i study the state
    machine of sc2 mainly, because it helps me to see if i do my own engine
    right, but mostly my engine is way simpler and also not predetermination
    safe and works with 0.2 integration instead of 1/16th.

sc2reader exposes raw event information as best as it possibly can. Past
that it currently has two primary services for replay files:

  • Datapacks for standard games that map raw unit/ability type ids to the
    actual abilities they represent. These datapacks are now also starting to
    support additional meta data like costs and build times.
  • Active selection and hotkey buffer tracking for every frame of the
    game.

You might want to look into creating a special datapack for your custom
games if you intend to use sc2reader for this. That way the custom units
and abilities with what ever meta data you want to give them can be
accessible via the replay just like the current standard data is.

you can email me also directly to [email protected]

i hope the questions are understandable, i would be very happy if you take
your time to give an answer them, even if just short "I assume yes" :)

anything i can help, i will

c ya

Gabor Guzmics
<>< http://www.g4b.org


Reply to this email directly or view it on GitHubhttps://github.com//issues/7#issuecomment-10335483.

from sc2reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.