User:Franklin

From Group 4
Revision as of 15:01, 9 April 2013 by Franklin (talk | contribs) (Week 2 Report)
Jump to: navigation, search

Week 1 Report

What I did

  • Worked on Project Spec/Schedule with the team
  • Discussed direction and design of project with the group.

What I'm doing this week

  • Working on networking between a client and server project.
  • Constructing Config File (Likely XML)
  • Creating logging construct to log all messages passed between client and server(w/timestamp).
  • Making setup executable to modify Config file

What I'm doing next week

  • Finishing whatever I didn't finish this week.
  • Working with the Engine/Logic team to serialize and deserialize objects

Week 2 Report

What I did

  • Created a basic network manager that can send messages from the server to the client
  • Server can communicate with clients via CIN and clients respond back with acks
  • Updated the Packet type to hold 100 bytes as data
    • Current assumption is that (de)serialization is going to copy and paste using memcpy and sizeof(class)
  • Tested communication between clients on different lab machines.

In Progress

  • Managing the closing of connections (and updating the client table)
    • Through explicit close client packets
    • Through implicit could not find client error

Questions/Thoughts

  • We're told to not use new if at all possible and the textbook tells us to not use class statics if at all possible. We don't use new because it allocates dynamic memory and we don't use statics because we can't control the order of initialization. Is there some other way to not use dynamic memory without using statics?
    • Current understanding: If it doesn't depend on anything else, it's better to use statics.
  • What's the method to do a non-blocking send/receive in Winsock 2 and is that even a thing?
  • How to multi-thread in VC++?
  • Network Communications and Packets
    • What size should a packet be? Should packets be of fixed size or of variable size?
      • Should (de)serialization of packets be a copy of the object with memcpy(buf, obj, sizeof(obj))? (at the beginning, at least)
    • Since every object needs to be mirrored on both the client and the server, I wonder if the server and client will preallocate the memory for each object. Then each packet can be large enough to hold the largest object and each send will send a bunch of packets with some header dictating which object (type) it is to be deserialized to.

Notes

  • These should find their way to other parts of the wiki.
  • If you get an error that says it can't find dxd9, go to Properties. Under Configuration Properties, there is a VC++ Directories. In Include and Library Directories, link to the Direct X installation "C:\Program Files\Microsoft DirectX SDK %28June 2010%29\Include" and "C:\Program Files\Microsoft DirectX SDK %28June 2010%29\Library" respectively.
  • Follow this guide to enable a custom shared library for both client and server: MSDN Shared Library Guide

What I'm doing this week

  • Working on networking between a client and server project.
  • Constructing Config File (Likely XML)
  • Creating logging construct to log all messages passed between client and server(w/timestamp).
  • Making setup executable to modify Config file

What I'm doing next week

  • Finishing whatever I didn't finish this week.
  • Working with the Engine/Logic team to serialize and deserialize objects