Guild icon
Teeworlds
IRC / bridge
One-way IRC channel bridge. If you want to be able to send messages to IRC, contact @Dune or @heinrich5991. https://www.teeworlds.com/?page=docs&wiki=rules/irc_rules
Between 10/22/2023 12:00AM and 10/23/2023 12:00AM
Avatar
Can someone explain this to me? https://github.com/heinrich5991/libtw2/blob/master/doc/map.md#info Are the optional properties fixed size? How do I know which prop got included?
Avatar
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.
1:15PM
opt is the prefix for optional indices. They are either a normal index or -1, marking it as unused.
Avatar
In valid maps at least. Invalid maps could also contains invalid indices like -3 or too large data indices
Avatar
Interesting, would one want to parse those cases or just disregard the whole thing?
Avatar
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
Avatar
Makes sense, thank you!
1:22PM
Who thought it's a good idea to make sub types dependent on the parent's type property? ;;
Avatar
chillerdragon BOT 10/22/2023 1:23PM
Are you building a map parser?
1:23PM
Are you aware of patigas twmap library?
Avatar
I am, I'd just like a fully native typescript implementation of everything documented in libtw2
Avatar
chillerdragon BOT 10/22/2023 1:24PM
You can also ask patiga if he can get you ts bindings he did the same for python
1:24PM
His project his pretty dope and well matured
1:25PM
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
1:25PM
Oh you aim for native too
1:25PM
Ye then don’t mind my comment :D
Avatar
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
1:26PM
So I have to parse the map file at some point
Avatar
chillerdragon BOT 10/22/2023 1:26PM
Do you also know swarfeys work?
1:26PM
He did networking stuff in ts
Avatar
I don't think I do? Do you have a link?
Avatar
chillerdragon BOT 10/22/2023 1:27PM
GitLab swarfey
1:27PM
gitlab.com/swarfey
Avatar
Oh, yes, I've seen it before!
1:28PM
But its only the client
Avatar
Again, looking to implement the server. I believe it'll be much more useful than the client
Avatar
chillerdragon BOT 10/22/2023 1:28PM
Yes I think his server stuff never got finished or started
1:28PM
But net code is shared a lot
1:29PM
Well depends both are cool Server and client
1:29PM
But there for sure is a niche for server rewrites
Avatar
I don't disagree that both are cool, but the flexibility of servers would make more sense imo
Avatar
chillerdragon BOT 10/22/2023 1:29PM
The only actually useful one I know is the one in C#
1:29PM
This one?
Avatar
chillerdragon BOT 10/22/2023 1:29PM
Yes
1:30PM
It’s pretty epic
1:30PM
I saw it in game he did a full on city mod in it
Avatar
Yeah, it's a cool project. Unfortunately my C/++
1:30PM
# isn't great
1:30PM
I mean, city mods aren't really special imo
Avatar
chillerdragon BOT 10/22/2023 1:32PM
Are you planning to go open source?
1:32PM
Show me any other server rewrite that can even be actually played on mod or not
1:33PM
Also it’s a cool city mod. And it dependens on what you put in the city mod
Avatar
That's fair. I guess I've never been a big city player.
1:33PM
I do plan to go open source at some point, when it's functional
Avatar
chillerdragon BOT 10/22/2023 1:36PM
If your project has a public repo share it I’ll be your first fan and Follower
Avatar
Haha, thanks! I haven't made a repo yet tho. Like I said, I want to have something work first
1:43PM
Silly question tho. Are datafiles only used in maps? Kind of like a container?
1:44PM
I assume so, right?
Avatar
yeah, I assume it was made as a generic container format but in the end on maps use the datafile format
2:06PM
only*
Avatar
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
2:10PM
ie. ATAD instead of DATA
2:46PM
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.
Avatar
I get that, I just don't understand why they would just go with it instead of fixing it
Avatar
It's so existing maps that were written incorrect can still be read
Avatar
@Blade in heinrich5991's entire map collection I think there were less than 3 maps with that bug, maybe it was zero maps in total
Avatar
Yeaah, so I won't worry about it
Avatar
Silly question but can you even see map info? Like, is there a way to see it?
Avatar
And while I'm at it, does this look right to you guys? "type_id__id": { "type_id": 15, "id": 0 }, "size": 4194304,
Avatar
Avatar
Blade
Silly question but can you even see map info? Like, is there a way to see it?
You can only see the map info in the editor (file menu > map details)
Avatar
I must have missed that
4:19PM
Nope, it's not there for me
Avatar
ChillerDragon BOT 10/22/2023 4:23PM
try save as -> map details
Avatar
Ah, yes, it was moved in DDNet client
Avatar
ChillerDragon BOT 10/22/2023 4:24PM
brainased robsti
Avatar
In Teeworlds client it's in the save dialog
Avatar
ChillerDragon BOT 10/22/2023 4:24PM
ddnet maximalist
Avatar
Seems to always be empty for me, on all the maps I test. Which admittedly weren't many
Avatar
yeah, probably not used very much if it's not shown anywhere in the client
Avatar
Mhh, oh well
Exported 75 message(s)
Timezone: UTC+0