15:08 < bridge> Can someone explain this to me? 15:08 < bridge> https://github.com/heinrich5991/libtw2/blob/master/doc/map.md#info 15:08 < bridge> Are the optional properties fixed size? How do I know which prop got included? 15:15 < bridge> The author, version etc. properties are each an `int` that is the index of the data item containing the string, or `-1` if the value is unset. The length of these strings is only really limited in the editor to the lengths defined in the linked doc. 15:15 < bridge> > `opt` is the prefix for optional indices. They are either a normal index or `-1`, marking it as unused. 15:15 < bridge> Oh! 15:16 < bridge> In valid maps at least. Invalid maps could also contains invalid indices like -3 or too large data indices 15:17 < bridge> Interesting, would one want to parse those cases or just disregard the whole thing? 15:18 < bridge> It's much easier to discard the entire map when you find an error instead of trying to continue in your tool with whatever broken state the map is in 15:19 < bridge> Makes sense, thank you! 15:22 < bridge> Who thought it's a good idea to make sub types dependent on the parent's type property? ;; 15:23 < bridge> Are you building a map parser? 15:23 < bridge> Are you aware of patigas twmap library? 15:23 < bridge> I am, I'd just like a fully native typescript implementation of everything documented in libtw2 15:24 < bridge> You can also ask patiga if he can get you ts bindings he did the same for python 15:24 < bridge> His project his pretty dope and well matured 15:25 < bridge> But not sure if he will do it or how much pain it is. If he won’t do it I guess it’s nice that you cover ts land 15:25 < bridge> Oh you aim for native too 15:25 < bridge> Ye then don’t mind my comment \:D 15:26 < bridge> Oh, I saw his work. He helped me a lot in the past with similar stuff already. I'm just not sure what I want to do with this in the future. All I know for now is that I want to make a minimal server implementation 15:26 < bridge> So I have to parse the map file at some point 15:26 < bridge> Do you also know swarfeys work? 15:26 < bridge> He did networking stuff in ts 15:27 < bridge> I don't think I do? Do you have a link? 15:27 < bridge> GitLab swarfey 15:27 < bridge> gitlab.com/swarfey 15:28 < bridge> Oh, yes, I've seen it before! 15:28 < bridge> But its only the client 15:28 < bridge> https://gitlab.com/swarfey/teeworlds-client 15:28 < bridge> Again, looking to implement the server. I believe it'll be much more useful than the client 15:28 < bridge> Yes I think his server stuff never got finished or started 15:28 < bridge> But net code is shared a lot 15:29 < bridge> Well depends both are cool Server and client 15:29 < bridge> But there for sure is a niche for server rewrites 15:29 < bridge> I don't disagree that both are cool, but the flexibility of servers would make more sense imo 15:29 < bridge> The only actually useful one I know is the one in C# 15:29 < bridge> https://github.com/Matodor/TeeSharp 15:29 < bridge> This one? 15:29 < bridge> Yes 15:30 < bridge> It’s pretty epic 15:30 < bridge> I saw it in game he did a full on city mod in it 15:30 < bridge> Yeah, it's a cool project. Unfortunately my C/++ 15:30 < bridge> # isn't great 15:30 < bridge> I mean, city mods aren't really special imo 15:32 < bridge> Are you planning to go open source? 15:32 < bridge> Show me any other server rewrite that can even be actually played on mod or not 15:33 < bridge> Also it’s a cool city mod. And it dependens on what you put in the city mod 15:33 < bridge> That's fair. I guess I've never been a big city player. 15:33 < bridge> I do plan to go open source at some point, when it's functional 15:36 < bridge> If your project has a public repo share it I’ll be your first fan and Follower 15:37 < bridge> Haha, thanks! I haven't made a repo yet tho. Like I said, I want to have *something* work first 15:43 < bridge> Silly question tho. Are datafiles only used in maps? Kind of like a container? 15:44 < bridge> I assume so, right? 16:03 < bridge> yeah, I assume it was made as a generic container format but in the end on maps use the datafile format 16:06 < bridge> only* 16:08 < bridge> One thing I also don't quite understand is why in the version header, the magic key can be inverse of what it should be 16:10 < bridge> ie. ATAD instead of DATA 16:46 < bridge> https://github.com/heinrich5991/libtw2/blob/master/doc/datafile.md 16:46 < bridge> > NOTE: Readers of Teeworlds datafiles should be able to read datafiles which start with a reversed magic too, that is 'A', 'T', 'A', 'D'. A bug in the reference implementation caused big-endian machines to save the reversed magic bytes. 16:48 < bridge> I get that, I just don't understand why they would just go with it instead of fixing it 16:49 < bridge> It's so existing maps that were written incorrect can still be read 16:51 < bridge> oof 17:20 < bridge> @blade67 in heinrich5991's entire map collection I think there were less than 3 maps with that bug, maybe it was zero maps in total 17:21 < bridge> Yeaah, so I won't worry about it 17:50 < bridge> Silly question but can you even see map info? Like, is there a way to see it? 18:00 < bridge> And while I'm at it, does this look right to you guys? 18:00 < bridge> ``` 18:00 < bridge> "type_id__id": { 18:00 < bridge> "type_id": 15, 18:00 < bridge> "id": 0 18:00 < bridge> }, 18:00 < bridge> "size": 4194304, 18:00 < bridge> ``` 18:09 < bridge> You can only see the map info in the editor (file menu > map details) 18:18 < bridge> I must have missed that 18:19 < bridge> Nope, it's not there for me 18:23 < ChillerDragon> try save as -> map details 18:24 < bridge> Ah, yes, it was moved in DDNet client 18:24 < ChillerDragon> brainased robsti 18:24 < bridge> In Teeworlds client it's in the save dialog 18:24 < ChillerDragon> ddnet maximalist 18:30 < bridge> Seems to always be empty for me, on all the maps I test. Which admittedly weren't many 18:30 < bridge> yeah, probably not used very much if it's not shown anywhere in the client 18:32 < bridge> Mhh, oh well