7 Replies - 6324 Views - Last Post: 18 February 2010 - 03:02 AM Rate Topic: -----

#1 ZOMBIE!!!  Icon User is offline

  • D.I.C Head

Reputation: 27
  • View blog
  • Posts: 206
  • Joined: 28-October 09

Simple 1v1 Online?

Posted 17 February 2010 - 12:38 AM

Hey DIC,

My friend and I have just about finished a simple FPS using Dark GDK. We were just wondering if there is a relatively simple way to play 1 vs 1 online. Nothing fancy, just connect and play. Is there a way to do this for beginners, like a program or something?

Thanks in advance,

ZOMBIE!!!
Is This A Good Question/Topic? 0
  • +

Replies To: Simple 1v1 Online?

#2 SixOfEleven  Icon User is offline

  • Planeswalker
  • member icon

Reputation: 1055
  • View blog
  • Posts: 6,643
  • Joined: 18-October 08

Re: Simple 1v1 Online?

Posted 17 February 2010 - 01:09 AM

Multiplayer games, even simple 1v1 games, have a fair bit of complexity to them. In this sort of setting, you would want a peer-to-peer type architecture probably. One person would have to act as the host and the other would connect to the host and the host would be responsible for managing the game. You would have to pass information on the game state back and forth between the two computers. You will have to do a bit of work on the "packets" being sent back and forth. You will want to keep them small because of the possiblity of network lag. (Network lag happens because there will be a time delay between the packets being sent, received, and processed.) Because you are doing a FPS in real time, this will become a bigger issue.

That said, the easiest way to send data back and forth between games, with C++ and Windows, would probably be done using WinSock. WinSock is an API for dealing with network connections. You can do a search for client-server applications, peer-to-peer (P2P) applications, and there are probably other models for networking.
Was This Post Helpful? 0
  • +
  • -

#3 stayscrisp  Icon User is offline

  • フカユ
  • member icon

Reputation: 1040
  • View blog
  • Posts: 4,325
  • Joined: 14-February 08

Re: Simple 1v1 Online?

Posted 17 February 2010 - 04:40 AM

Wouldn't you be able to use Direct Play using the Dark GDK? Don't think its very good though.
Was This Post Helpful? 0
  • +
  • -

#4 lesPaul456  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 174
  • View blog
  • Posts: 729
  • Joined: 16-April 09

Re: Simple 1v1 Online?

Posted 17 February 2010 - 06:56 AM

DirectGDK has networking support. I haven't messed with it much, but I know that it simplifies the process quite a bit.

I can't remember the commands, and I'm not at my computer right now, but if you look in the DarkGDK documentation, there should be a networking section.

*EDIT*
I just checked, and in the documentation there's a whole section devoted to multiplayer networking.

DarkGDK has several commands that let you very easily host or join a game, and then send the "packets" of information that SixOfEleven mentioned.

This post has been edited by lesPaul456: 17 February 2010 - 12:54 PM

Was This Post Helpful? 0
  • +
  • -

#5 ZOMBIE!!!  Icon User is offline

  • D.I.C Head

Reputation: 27
  • View blog
  • Posts: 206
  • Joined: 28-October 09

Re: Simple 1v1 Online?

Posted 17 February 2010 - 02:59 PM

Could you point me to where the documentation is? I couldn't find it on their website, or anywhere else for that matter.

Thanks,
ZOMBIE!!!
Was This Post Helpful? 0
  • +
  • -

#6 SixOfEleven  Icon User is offline

  • Planeswalker
  • member icon

Reputation: 1055
  • View blog
  • Posts: 6,643
  • Joined: 18-October 08

Re: Simple 1v1 Online?

Posted 17 February 2010 - 04:46 PM

View Poststayscrisp, on 17 February 2010 - 06:40 AM, said:

Wouldn't you be able to use Direct Play using the Dark GDK? Don't think its very good though.


Direct Play was deprecated at some point. They suggest that you use WinSock for networking now.
Was This Post Helpful? 0
  • +
  • -

#7 lesPaul456  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 174
  • View blog
  • Posts: 729
  • Joined: 16-April 09

Re: Simple 1v1 Online?

Posted 17 February 2010 - 09:35 PM

Quote

Could you point me to where the documentation is? I couldn't find it on their website, or anywhere else for that matter.

Thanks,
ZOMBIE!!!


The documentation comes with the installation. You can find it at "C:\Program Files\The Game Creators\Dark GDK\Documentation\Dark GDK.chm", if you installed DarkGDK in the default location. You can also access it from the start menu: All Programs > The Game Creators > Dark GDK > Documentation > Information.

Dark GDK has networking support built in. No third-party libraries are needed.
Was This Post Helpful? 0
  • +
  • -

#8 dsherohman  Icon User is offline

  • Perl Parson
  • member icon

Reputation: 227
  • View blog
  • Posts: 654
  • Joined: 29-March 09

Re: Simple 1v1 Online?

Posted 18 February 2010 - 03:02 AM

View PostSixOfEleven, on 17 February 2010 - 11:46 PM, said:

Direct Play was deprecated at some point. They suggest that you use WinSock for networking now.


Heh. Everything old is new again...

Just out of curiosity, do you happen to know whether today's WinSock and the WinSock of the late 90s (when I was last doing Windows programming) have anything in common other than the name?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1