Results 1 to 1 of 1
  1. #1

    Creating tool that requests info from a BFBC2 server

    Hello everyone,

    I'm trying to create a tool for BFBC2 that downloads modpacks for modded servers.
    My plan is to create a server browser for modded servers where the user can choose a server and the tool will download and install the required modpack then.
    I have created a prototype already that works very well except for the communication with the game server.
    I'm just a BFBC2 fan with limited C# knowledge and not a professional programmer. I have not programmed anything server related yet.
    So my question is: Can someone help me here or at least give me a hint in the right direction? That could help me a lot!
    All I need to do is to send the request "serverInfo" to the server and then receive a response of the server with the information about the specific server.
    I succeeded with pinging a server programmatically and getting a response like how long the pinging needed in ms etc., but sending a specific request seems quite difficult.
    I tried to do this with the tcpclient and udpclient class, per HTTP webrequest and by studying the code of Procon, but sadly I'm not any smarter. I also tried to just copy & paste existing codes from the web ofc.

    Long story short: I'm trying to get information from a BFBC2 game server like server name, player count etc. programmatically with C# like Procon and Gametracker does it for example.

    I would really appreciate every help, especially because the documentation about BFBC2 server is quite rare. As I said, at least a hint in the right direction could help me a lot! So thanks in advance!

    Greetings,
    Heico

    PS.: Here is a link to the server protocol of BFBC2 if required: http://sneakymonkeys.com/BFBC2R8.pdf

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •