When making the netcode for my web game, I highly valued TypeScript support so to get it by default, I defined the message types in TypeScript so they could be used directly[1]. I see that this framework defines its messages in .yml and converts it to types (stored in a folder kept out of source control).
I'm not sure which way is best, but it is very nice to have the feature support of `.d.ts` files when creating complex message types, as opposed to needing to learn a new thing. Clearly if this is going to be a cross-platform framework (not just web) then using TypeScript as the source-of-truth makes far less sense.
Anyway, very impressed with the binary format/delta encoding feature! That's been something that I know I _should_ do but am putting off until I see signs of sending raw JSON being problematic.
Yeah I'm curious to see where people bump up against the limits of the yml types DSL. I plan to make a UI on top of the yml to make it a bit easier to work with as well. I think the popularity of Protobuf as a format shows that people are willing to learn a new API format if it adds enough value.
Comments
When making the netcode for my web game, I highly valued TypeScript support so to get it by default, I defined the message types in TypeScript so they could be used directly[1]. I see that this framework defines its messages in .yml and converts it to types (stored in a folder kept out of source control).
I'm not sure which way is best, but it is very nice to have the feature support of `.d.ts` files when creating complex message types, as opposed to needing to learn a new thing. Clearly if this is going to be a cross-platform framework (not just web) then using TypeScript as the source-of-truth makes far less sense.
Anyway, very impressed with the binary format/delta encoding feature! That's been something that I know I _should_ do but am putting off until I see signs of sending raw JSON being problematic.
[1] https://github.com/connorjclark/gridia/blob/master/src/proto...
Yeah I'm curious to see where people bump up against the limits of the yml types DSL. I plan to make a UI on top of the yml to make it a bit easier to work with as well. I think the popularity of Protobuf as a format shows that people are willing to learn a new API format if it adds enough value.
Thank you for the feedback!