Sounds good. A simple tech demo of networked interactions is something that is pretty simple and good to start with. However, you need to make a chat program first as that is more suitable for your initial task. Writing a non network game can be challenging enough if you are not a game programmer and have a lot of experience. Trying to write a networked game when you don't have network experience either is all the more harder!
I am not sure writing a chat program is a suitable place for me to start. I did not to long ago create a client and server for sharing libraries. The server would allow multiple clients to connect and download files off the server. I am very familiar as well with networking. Last year I passed my CCNA course. I therefore know a great deal of how network protocol works as well as there structure.
Personally what I am building I would hardly count as a game. The graphics and mechanics for this "game" is the least thing I am concerned about. Its almost unimportant to an extent. Being able to build my own protocol and with flow control and etc is what's more important. My university course is called Computer systems and Networks. The only thing I am required to demonstrate for my final year project is some form of distributed system. So a chat program would do the trick, however I have just spent the last 7/8 months building the framework for a game engine. I don't really want to stop doing that just to take on another project. I still am open to that sugestion though.
I completely understand how the serialization works now after playing around quite a bit with hplus code (I could not get your posted code to work, I am sure I am missing something there).
Implement your own network protocol (assuming you already have a network library/framework to use). This will allow you to take the payload of your messages (what the visit pattern gives you as output) and attach what type of data it is (usually designated by an 'opcode') as well as the size. Remember TCP is a stream, so you must send the size of the data that is following. Once you have your own protocol, you can now just communicate between endpoints and worry about the actual network logic. If you are using UDP, then everything stays the same, except your protocol is slightly different. However, that is a different topic, so in context of this thread, everything is the same in regards to the visit pattern.
For the game I plan on using UDP, however if I was to go down the path of a chat program I would of course use TCP for the reliability sake. I am a bit unclear by what you mean when you say "opcode"? I have used hplus code to serialize all my data but can't figure out how to send it across a local network. I can send the data but it shows up on the other end as being the same size/capacity, it just do not get the data.
I understand how the serialization works but after using hplus code it seems to have all the bytes in a buffer as a char. When I go to deserialize this code how can you determine what the code was in its original state? eg an integer, char, string and etc....
I feel like this serialization stuff is a just a bit of a roadblock right now and that if I can get around it I would be set. I know thats not how these things always work. I thought about maybe using the boost library for this but heard it has a lot of overhead. What do you guys think about the boost library?
I know you probably have explained this all to me several times and i thank you for your patience. I am doing my best to achieve this myself.
p.s - I am using visual studio 2010 for my IDE.