C - Client Server game programming

This is a discussion on C - Client Server game programming within the C Programming forums, part of the General Programming Boards category; Hi, Im not new to programming and am coming to grips with c, I am developing a client server game. ...

C - Client Server game programming

Hi, Im not new to programming and am coming to grips with c, I am developing a client server game. i want to be able to run it on windows and linux but only have a windows machine. Could someone please help me out in what tools ect for cross-platform programming

If this is a graphical game then your best bet is to use a platform independent library such as SDL. The sockets part is also a problem because Windows sockets and Linux sockets are slightly different. I would suggest getting documentation on both and then writing wrapper functions that can be conditionally compiled. If you program as portably as possible and isolate the non-portable parts so that they can be easily modified, you'll make your life much easier. Of course, when writing programs for Linux, it's always a good idea to have a Linux box for building and testing.

The easiest way to do with would be to use Java. A cross platform library like SDL would work well too though.

I was wondering is there any tool to translate c/c++ code into java?
I have finished recently one project as part of my exam. Program first calculates some points and then draw it on screen. I used MFC and made application. Now I would like to translate it as a Java applet. Do I have to write a complete new code, or maybe there is some utility that can help?