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. 4 1189
> 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!
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!
> 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\Applic ations\Wintalk) . Which implements a
simple 'chat' application using sockets. Should be enough there to get you
going!
n!
Excellent, n!! I didn't even know about the samples directory. Thanks a lot :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 phases of learning php.
When it comes to common services, such as shopping carts, I have found
ways to modify existing scripts.
However, I have...
|
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 a library that connects to the R stats package
b. has code that seems way more readable than anything else
There is, however, at least for my...
|
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 have to say that Java
SWING sucks BIG TIME for developing and deploying desktop applications
(especially on Windoze).
Unfortunately, I have been...
|
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 present
themselfs to get more orders.
We have been working on a website to change this situation:
WebmastersLookup.com. It's a special Searchengine...
|
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, tags, etc.
There are ofcourse many different levels of programmers, and the
beginners might only use emacs or vi to write their code. However,
since...
| |
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+ years MS SQL development experience.
3. Experience using Access as a front end development tool.
4. Able to takeover existing design
5. Able to...
|
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 than the descriptions of
OOP I've read in making a case. Ie., what objective
data/studies/research indicates that a particular problem can be...
|
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 real application of web report, I will discuss three network setting ways of VMware with all of you.
Bridge way
This is the simplest way as it...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |