Closed Patiga closed 10 months ago
I think the snapshot would be easier to work with, if it wasn't exposed as an Iterator
or single HashMap
, but instead as a struct with a HashMap
for each snap object type.
struct Snapshot {
player_input: HashMap<u16, PlayerInput>,
projectile: HashMap<u16, Projectile>,
laser: HashMap<u16, Laser>,
...
}
Each field would map each id to the object.
That struct could be generated using the gamenet
python scripts, which I'm not familiar enough with.
(The fields could be suffixed with an s
for a more intuitive plural form, but that wouldn't work all that well with all names)
Rebased and with a tool to resave demos, in order to detect differences in parsing/saving. Currently, it doesn't produce the same file, but visually the demo seemed correct. It would require further investigation, maybe Kaitai could help.
I think it is ready to merge for now. The gamenet
and demo
crate will be more actively used by me now, so maybe I'll need to develop this further soon.
Fixed failed build
I'm not sure what to do about the 2 failing checks. They appear to be about the Rust edition 2021(?). Should I try to lower the Rust version @heinrich5991?
Why does it fail with nightly? 🤔
You can ignore the failure with old Rust for ow.
A simple cargo update
fixed the failed build. If preferred, I could probably also only run the command for proc_macro
.
After the latest change, which has nothing to do with any dependencies, rustc-serialize
fails to build on ubuntu-latest, nightly
???
I'll try another cargo update -p rustc-serialize
, but I feel like I'm fixing symptoms of something I have no control over.
Welp, that fixed it again
I didn't know about the binrw
crate. It looks pretty nice: https://docs.rs/binrw/0.13.3/binrw/.
Some relatively minor things like naming might still need to be changed I haven't tested the demo writing yet, would be appreciated if someone else could do that. I'm ofc open to changes :)