Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. online tic tac toe

online tic tac toe

Scheduled Pinned Locked Moved Managed C++/CLI
comgame-devsysadminhostingarchitecture
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    staticv
    wrote on last edited by
    #1

    I'm developing a tic tac toe multiplayer game, the game is up and it is working on a single pc, I want it to be playable across two computers in LAN, I'll be using TCP/IP for this and I have already set up a chat server program. So I know how to do communication. The concern is that I have a GameBoard class which does everything, from making a move, to restarting the game and checking for winner etc. It is independent of the form except of the mouse clicks, the form just reads in the GameBoard's properties, attributes and updates itself. How may I expand it into a multiplayer game, I want to establish a client to client architecture, should I expand the GameBoard class, should I serialize the GameBoard class and deserialize it on the other side, or just send the specific move done? Whats good, please tell me and help me out how it will be done. I mean just the head up :)

    Top Web Hosting Providers[^] Do, or do not. There is no 'try'.

    _ 1 Reply Last reply
    0
    • S staticv

      I'm developing a tic tac toe multiplayer game, the game is up and it is working on a single pc, I want it to be playable across two computers in LAN, I'll be using TCP/IP for this and I have already set up a chat server program. So I know how to do communication. The concern is that I have a GameBoard class which does everything, from making a move, to restarting the game and checking for winner etc. It is independent of the form except of the mouse clicks, the form just reads in the GameBoard's properties, attributes and updates itself. How may I expand it into a multiplayer game, I want to establish a client to client architecture, should I expand the GameBoard class, should I serialize the GameBoard class and deserialize it on the other side, or just send the specific move done? Whats good, please tell me and help me out how it will be done. I mean just the head up :)

      Top Web Hosting Providers[^] Do, or do not. There is no 'try'.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      If you didn't think of multi-player when designing it in the first place, you may need to do some refactoring like splitting a class into multiple classes. It is always better performance to send across as little as possible. So you should probably send only the moves done rather than the entire class.

      «_Superman_»

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups