Client/server shared code

This is a discussion on Client/server shared code within the C++ Programming forums, part of the General Programming Boards category; I'm programming a multiplayer game, and I'm now at the point where I want to store data about player characters. ...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    69

    Client/server shared code

    I'm programming a multiplayer game, and I'm now at the point where I want to store data about player characters. I'm thinking about creating a class for this. I think it would be a good idea to use the exact same class on both client and server. What's the best way to organize this?

    Should I include the same source file in both projects?
    Should I create a static library containing the class and link to it in both client and server?
    Should I use one single library for all shared code?

  2. #2
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    I'd do 1 library for all shared code
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Explain this C code in english
    By soadlink in forum C Programming
    Replies: 16
    Last Post: 08-31-2006, 12:48 AM
  2. Replies: 1
    Last Post: 03-21-2006, 06:52 AM
  3. Number of Shared Memory Segments
    By dbt3481 in forum Linux Programming
    Replies: 1
    Last Post: 10-14-2004, 02:43 PM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

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