Linux client and Windows server...
I am making a MMORPG with SDL. I was drawn to SDL because I wanted my game to be cross-platform. However, my server will be running Windows 2003, so I just wanted to ask: can a Linux version of the client successfully connect to the Windows version of the server (I.E. the server software will be written with the Windows SDL).
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
Well, I guess multi-platforming is out...
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
Uhh... hopefully that guy was being sarcastic.
Of course you CAN get that to work if they communicate over a standard network protocol such as TCP/IP. Any platform can connect to any other in that way since it's platform independant.
Of course you CAN get that to work if they communicate over a standard network protocol such as TCP/IP. Any platform can connect to any other in that way since it's platform independant.
So it will work as long as they have the same protocol? Thanks.
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
Duh, of course it will work, most of the halflife/cs servers are running in Linux.
No reason to say "Duh", it was an honest question that people would be concerned about what starting to program online games.
But the answer is "of course it is possible", if they use the same protocol then they are speaking the same language in a way. If you are communicating to machines that use a different endian (big-endian, little-endian) then you will have to convert the data to make it understandable. Functions like htonl/ntohl (also short int version exists).
This is why SDL has SDL_net though, so that it is platform-independent for the internet as well.
Good luck with the MMORPG.
-edit- doh, endian...
[Edited by - nprz on November 26, 2005 12:34:53 AM]
But the answer is "of course it is possible", if they use the same protocol then they are speaking the same language in a way. If you are communicating to machines that use a different endian (big-endian, little-endian) then you will have to convert the data to make it understandable. Functions like htonl/ntohl (also short int version exists).
This is why SDL has SDL_net though, so that it is platform-independent for the internet as well.
Good luck with the MMORPG.
-edit- doh, endian...
[Edited by - nprz on November 26, 2005 12:34:53 AM]
Thanks, nprz, I'm almost done with the artwork and will be starting the coding soon.
P.S. what's big indian and little indian?
P.S. what's big indian and little indian?
------------------------------Support the Blue Skies in Games Campaign!A blog... of sorts.As a general rule, if you don't have a general rule in your signature, you aren't as awesome as someone who does. General rules roxor teh big one one ones.
Quote:
Original post by programwizard
Thanks, nprz, I'm almost done with the artwork and will be starting the coding soon.
P.S. what's big indian and little indian?
its endian... it tells you how the computer stores numbers
say you have an int 4 bytes long.
say it like this in binary ( bytes are seperated like so ':' )
0000 1111 : 0000 0111 : 0000 0011 : 0000 0001
every time the int is written to memory, on a "little endian" processor, the lower parts are written to memory. it will apear like above.
on big endian, the same number will be written to ram as
0000 0001 : 0000 0011 : 0000 0111 : 0000 1111
on a network they are written the same as if they were in ram. however, if one
machine is writing them one way and the other machine is reading them the opposite way, it misinterprets all the numbers. so the solution decided was to write all numbers the same on a netwrok( big endian i think )...
when you are reading up on network code there is a function usually to do this for you.
good luck!
(BTW, i always get them mixed up, i always need to read up on them before i do endian dependant stuff, it may be the other way around )
[Edited by - rip-off on November 22, 2005 2:19:07 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement