Topic: brick wall

Hello all,
So I'm trying to create a server in which people connect to  it with a client, and then the server handles passing messages around.
Sort of like p2p but with a server acting as middle man.
In BGT, you obviously have the server as part of the network object, using UDP.
The only problem is, BGT does *not* run on linux.
So I thought, no worries, I'll just write the server in c.
But noooo! BGT has some odd network thing going on where it seems to send data to the server, which the BGT server responds too, but c won't because, obviously, it has no idea what the script is chatting about.

My question therefore is:
*is there a way to run bgt in linux
*if not, what exactly does BGT want from the c script to recognise that yes, it has connected?
*can a c server and bgt script even be done/

Thanks a lot.

Re: brick wall

I don't know the Enet library but that's what BGT uses internally to implement the network object. It must be using a pretty outdated version by now, though, as the engine has not been updated in years. If you really want to try it that way, you could try to learn and implement the Enet library in C yourself, but you would probably have to figure out the exact configuration and conditions that BGT uses to implement that library.

But why should it not be possible to write even the server in BGT? Yes, the communication would probably be slow and inefficient and whatnot, given the outdated state of the library and the limitations of the language, but it should be able to work. You can program the server to just dumbly relay all received chat messages to all connected peers but the one who it actually came from, and only handle connections and stuff individually.

Lukas

Re: brick wall

Hey Lucas
I experimented with enet a bit, but couldn't get it to work no matter what version I used.
In terms of using a BGT server, I'd love to, but it's just not practical. I mean you'd have to host it on a windows server.
I've no idea where to get one, let alone how to configure it, and I'm already paying for a linux server as it is.
I'm no cheapscate, but... know what I mean?
I've also been trying to puzzle out wx and python together, but as window.show() is blocking, and a while is blocking, I can't see how a bgt game could be ported over to python either.
Any help would be appreciated.

Re: brick wall

Yeah, the server computer would have to be running all the time, but theoretically you shouldn't even need a hosting or VPS for that. If you want the server to be available all the time, you would just need even a slow outdated machine with a good connection that would be running non-stop with the BGT server program active. That should suffice for the bare minimum. Depends on what exactly you need and how demanding or undemanding you are.

Unfortunately, I have no personal experience with Python or either variant of C yet, so I can't help you there. But what about interfacing with a PHP script on a regular web server somehow? That might also be an option. The server would have to produce HTML or plain text output that the BGT client would then parse using the HTTP functions or object respectively. Might be slow but it's just another alternative perhaps worht considering that just occurred to me.

Lukas

Re: brick wall

Hi Lucas
I had considered that actually.
It would be very very slow I reccon.
Recently, I actually started looking into the usage of dll's and whether a dll library could be used in conjunction with bgt for a better effect?
I've had some some success, using winsock.dll.
I'm having trouble with sockaddr() currently, so have set it aside for a breather, as it were.
I'd like to actually write my own dll, and have done so, I just need to get it to compile for windows, not linux, heh.
Any tips?
Thanks!

Re: brick wall

Unfortunately, not on this front from me either. Sorry. As it stands, you're probably a more experienced programmer than me by now.
Lukas