networking code

Everything related to the code /
Tout ce qui touche au code
Post Reply
User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

networking code

Post by zuzuf » Mon Mar 24, 2008 12:40 am

I am happy to announce I've rewritten the "battle room" code. In fact I renamed the battle_room to network_room which is more appropriate and I merged the real battle room with the actual game setup screen. So the battle room already has its interface but has no networking capabilities for now.

The networking code isn't finished but I had a look at it and I think we can start a few things, mainly I want to have a working networking room and a working chat in battle room. This will be the internal Lobby, and will help finishing networking code (at least basic functions) on all platforms. Currently I am not sure the chat layer is working ... I've seen an unfinished function related to chat in networking modules (but it seems there is only one like this as far as chat is concerned).

So now, we should focus on networking code and shouldn't add functionalities but with one thing in mind : debugging is a priority ... the code is huge, the engine is getting complex we cannot let bugs remain in the code (at least critical bugs, compatibility bugs may not be a priority). I hope it'll bring more developers.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Mon Mar 24, 2008 6:19 am

Nice news :) We are digging into network part. :D
Well, additional developers would be very usefull :P

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sat Mar 29, 2008 8:30 pm

LAN server discovery is working :D !!

It's done in real time so when you get on the network room it doesn't display any server until it detects them and it keeps refreshing ... so you know which server is available with a timeout of 30 sec. (because multicasting doesn't seem to be very reliable)
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Mar 30, 2008 6:08 am

Beware, Zuzuf, soon we`ll be able to play against each other :) :twisted:

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Mar 30, 2008 11:40 am

yes :D ... currently I am creating and fixing some generic classes but win32 code needs to be finished and tested. And for the moment we have no Internet server discovery :( (I'll work on this once I'll get chat working in battle room)

Also western is willing to help, so it should go faster :wink:
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Sun Mar 30, 2008 12:39 pm

Yeah :) Western - go go go !!

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Mon Mar 31, 2008 4:17 pm

some progress done yesterday :
LAN server discovery is much more efficient now (and reliable), joining a game works (but no information syncing is done, I am only talking about the connection mechanism), chat system works ... from client to server only, from server to client it just locks the server trying to send data without succeeding :( don't know why :cry:

I'll improve these things until we get a full featured battle room (we'll also have to test this code and/or port it to win32), then we should have a good networking base (which still lacks a efficient compression algorithm ...).

Then I suggest we implement in game chat (shouldn't be difficult) because it'll greatly help debugging while testing.
=>;-D Penguin Powered

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

Post by Balthazar » Tue Apr 01, 2008 5:09 am

Well, some network-coders would be greatly appretiated :D

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Post by zuzuf » Sun Apr 06, 2008 5:10 pm

I've almost finished the battle room. It allows players to join a server, it responds multicast requests for server list (LAN server discovery), it synchronizes all the game settings (colors, names, AIs, metal, energy, side, network_ids - used to identify players and computers ).

And file transfer works !!!! When you join a game and you don't have the map you'll download it automatically until you get it or the server changes map. It behaves exactly the same way with game scripts.

Normally the code should be able to handle connections from the Internet but I haven't tested since we don't have Internet server discovery for now ... but soon I'll add the possibility to connect a server with only its IP address (which is all you need to connect a computer).
=>;-D Penguin Powered

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests