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. ...

  1. #1
    git
    git is offline
    Registered User
    Join Date
    Sep 2004
    Posts
    2

    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


    I only need to build the client so any help would be appriciated.


    --git

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    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.
    My best code is written with the delete key.

  3. #3
    git
    git is offline
    Registered User
    Join Date
    Sep 2004
    Posts
    2
    The game is a Mud (text Based) with a gui. It has an exisiting gui downloadable a www.veraxin.net/revelation/ . Thanks for your help.....if anyone can find anything else please add to the thread

  4. #4
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    The easiest way to do with would be to use Java. A cross platform library like SDL would work well too though.

  5. #5
    Registered User Micko's Avatar
    Join Date
    Nov 2003
    Posts
    712
    Quote Originally Posted by bithub
    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?

    Thanks

  6. #6
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    I dont think there is any utility that will translate C++ (especially MFC) code into Java. You would have to rewrite the program.

    The good news is that Java and C++ are very similar in syntax and style. If you know C++, then you could learn java in less than a week.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. IPv6 multicast client fails to receive server response
    By perfect in forum Networking/Device Communication
    Replies: 10
    Last Post: 06-21-2009, 11:30 PM
  2. Programming chat client, need some help (sockets & threads)
    By lalilulelo17 in forum Linux Programming
    Replies: 1
    Last Post: 04-19-2008, 04:01 AM
  3. c program client server
    By steve1_rm in forum Networking/Device Communication
    Replies: 3
    Last Post: 01-24-2008, 09:33 AM
  4. Replies: 40
    Last Post: 09-01-2006, 12:09 AM
  5. Server Client on UNIX
    By Wisefool in forum C Programming
    Replies: 5
    Last Post: 10-23-2003, 04:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21