473,513 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New programmer and network.

While teaching myself to program, I've undetaken a little game project akin to Battleship only it's not turn-based. The stand-alone version is working fine but I'd like to expand it to include a head-to-head feature.

With the program running on two computers, I wish to manually input the IP of the opponent into each. Then, I expect each event handled by one program to generate a network message received and interpeted by the opponent.

I was expecting (hoping) to find something like TCP.Send(target IP, target Port, string) but no such luck. Instead, I seem to be hung up on two issues I hadn't really anticipated: sockets and blocking/non-blocking.

Can someone advise me where to follow up on this? I could use some very basic pointers.
Nov 15 '05 #1
4 1183
n!
> I was expecting (hoping) to find something like TCP.Send(target IP, target
Port, string) but no such luck. Instead, I seem to be hung up on two issues
I hadn't really anticipated: sockets and blocking/non-blocking.

DirectPlay provides a complete framework to help implement a networked game,
I'd suggest you use that. There are many issues with networking and using
raw sockets makes a lot of work for yourself. The DirectX SDK can be
downloaded at http://msdn.microsoft.com/directx.

n!
Nov 15 '05 #2
Thanks, n!, that makes considerable sense. I guess it would be the way to go if the primary objective of this little game weren't to teach me how to program in general :) I really want to overcome this basic networking issue... just to send and receive packets. I don't even care about timing yet!
Nov 15 '05 #3
n!
> Thanks, n!, that makes considerable sense. I guess it would be the way to
go if the primary objective of this little game weren't to teach me how to
program in general :) I really want to overcome this basic networking
issue... just to send and receive packets. I don't even care about timing
yet!

Well it's not all about timing, there's management of dropped\lost packets
amongst other things :)
If you really want to look at sockets & raw communication I'd suggest
looking at the 'WinTalk' sample that is installed with the .NET framework
SDK (should be under \samples\Applications\Wintalk). Which implements a
simple 'chat' application using sockets. Should be enough there to get you
going!

n!
Nov 15 '05 #4
Excellent, n!! I didn't even know about the samples directory. Thanks a lot :)
Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2420
by: Angie | last post by:
Hello, My name is Angela Mastrodonato. I'm a web designer who would like the assistance of a php programmer. Some of my clients have requested more dynamic web sites, and I am in the beginning...
7
2054
by: stormslayer | last post by:
Folks: I've been considering a shift to python. I currently use c++builder (borland) or perl. I do computational models / statistics programming, and was interested in python b/c it a. has...
8
1681
by: Beatrice Rutger | last post by:
Hi, I am a previous Micro$oft desertee (moved from VB/VC++ to Java before this whole DOTNET thing) because I had several issues with Micro$oft. I am not completely in love with Windoze, but I...
0
1053
by: Wim Hoogenraad | last post by:
Dear developer, Do you often wonder who built a certain website and how it is done? And who manages that website right now? Strange, but developers usually stay anonymous while they should...
8
1975
by: markus | last post by:
Hi, As I been programming in C I have discovered more and more tools that really helps to speed up the development process when writing programs. Examples of such tools are cscope, cbrowser,...
2
1613
by: 1solomon | last post by:
Access/SQL Programmer/Developer required ongoing work with a client. - $55 per hour - Technical Requirements - or Equivalent in know how. 1. 5+ years or Windows Software Development. 2. 3+...
65
5161
by: Chris Carlen | last post by:
Hi: From what I've read of OOP, I don't get it. I have also found some articles profoundly critical of OOP. I tend to relate to these articles. However, those articles were no more objective...
0
3757
by: nancylife | last post by:
When developing web report, many developers use VMware to simulate different operating systems on a same server. Then, they can realize cross-platform deployment and debug of web report. According to...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.