15 Feb 2024 |
dyerat | Hello :) is there a specification to how the ace of spades server protocol works, or is it all reverse engineered? (I'm thinking of messing around with a rust implementation) | 13:46:40 |
16 Feb 2024 |
utf-4096 | https://www.piqueserver.org/aosprotocol/protocol075.html | 16:30:51 |
utf-4096 | sorry late reply, only saw this now :pĀ | 16:31:12 |
17 Feb 2024 |
| @maurice:tomesh.net left the room. | 09:41:15 |
utf-4096 | i added the PlayerProperties extension to aloha-pk/piqueserver , is this the right way to do it? https://github.com/aloha-pk/piqueserver/commit/0752b6d1abfa1962973df936f33db966f7496c4a | 14:18:02 |
utf-4096 | thinking about merging it upstream so | 14:18:09 |
utf-4096 | i needed it for the infinite blocks script | 14:20:02 |
utf-4096 | only BS implements that packet as far as im aware | 14:20:07 |
utf-4096 | pique has on_secondary_fire_set but not on_primary_fire_set š¤ | 15:15:32 |
utf-4096 | there is on_shoot_set but that's only called when the current tool is either the spade or a weapon | 15:21:20 |
utf-4096 | might be better to deprecate that and add on_primary_fire_set which would fire regardless of tool instead, no? | 15:22:07 |
notafile | Don't think there's anything wrong with that, I think some clients are weird about when they send that too | 17:14:06 |
notafile | In reply to @utf-4096:matrix.org i added the PlayerProperties extension to aloha-pk/piqueserver , is this the right way to do it? https://github.com/aloha-pk/piqueserver/commit/0752b6d1abfa1962973df936f33db966f7496c4a I'd want a read implementation too but apart from that, looks fine to me. | 17:15:16 |
utf-4096 | client never sends that packet so i'm not sure what the use would be | 18:07:47 |
notafile | testing, mainly, that's why all of the packets have it even the ones that are s2c only, it's just nice to have | 18:31:10 |
utf-4096 | got it, I'll add that in then | 18:35:58 |
19 Feb 2024 |
dyerat | Hey again, I'm just trying to get a simple example to talk to the master server and I feel like I'm falling at the first hurdle ahah. Is there any reason this just disconnects with no data?
import enet
host = enet.Host(None, 1, 1)
peer = host.connect(enet.Address(b"master.buildandshoot.com", 32886), 1, 31)
while True:
event = host.service(1000)
if event.type == enet.EVENT_TYPE_CONNECT:
print("%s: CONNECT" % event.peer.address)
elif event.type == enet.EVENT_TYPE_DISCONNECT:
print("%s: DISCONNECT" % event.peer.address)
continue
elif event.type == enet.EVENT_TYPE_RECEIVE:
print("%s: IN: %r" % (event.peer.address, event.packet.data))
continue
tyvm :)
| 10:32:11 |
notafile | why are you trying to speak to the master server directly from pure python | 10:33:07 |
notafile | I know why, but you're on your own here unless you have a good reason | 10:34:16 |
dyerat | Well I want to set up my own rust server impl, but I figured I could get some more help if I ported my code over to Python. I thought it'd be easiest to get started with a simple script that used enet to talk to the master server and just return like a "test server" value or something | 10:36:13 |
dyerat | since I've also never used enet before | 10:36:24 |
notafile | I'd recommend you get the server itself running first, then you can worry about the listing it on the master server as a last step. No reason to list a server that doesn't work, it's just annoying for players. We're unfortunately kind of hesitant helping people connect to the master server because it's caused spam issues in the past. | 10:38:42 |
dyerat | Ahhh I see, fair enough v v good point. Ok I'll go that route and I'll definitely be back when I inevitably get stuck again š
| 10:42:31 |
dyerat | ty for the quick response | 10:42:34 |
| dyerat set a profile picture. | 10:43:12 |
dyerat | Is there any reason that a simple enet server like this isn't catching a single thing that OpenSpades is sending when I try to connect? (https://pastebin.com/raw/GUV4dHJe)
I can see that the packet is being sent in wireshark, piqueserver works, and a python enet client works to initate a connection | 13:44:01 |
notafile | yep, that's expected, there's a specific flag you need set on the host to make that work, check the sources
(I'm very familiar with rust btw, so no need to port stuff over for me at least) | 13:51:20 |
dyerat | Ahh, is it the compression? | 14:00:34 |
dyerat | the bindings I'm using don't support the compression yet rip | 14:38:19 |
dyerat | better get to work | 14:38:21 |