Sign in to follow this  
janevblagoj

Network componenets for my game!

Recommended Posts

janevblagoj    122
Hallo! I’m a author of the computer game “Poppy and Rose” which I programmed it in Delphi 6. I think that the game will attract more attention if it is played in a network between two players. But because I’m not professional programmer, and because of my age (I’m 51 year old) I just cannot make that. This is why I need help, and when I mean help I mean a source code of some kind (in Delphi 6) with these segments: - A segment in which a connection is made between two players that should be in a peer to peer base, but one of them would act like a server and the other will be a client that will connect to the server; - A segment that will initiate that the two players have the same time; - A segment in which the two players transfer data between them; - A segment where is formed a joined table of results. Can I find a source code with this attributes, maybe from some other simple video game? Thank you Blagoj My e-mail: jblagoj@yahoo.com

Share this post


Link to post
Share on other sites
Jack9    102
Disclaimer: I never learned Delphi

To answer your question directly, there is no Delphi Framework for converting an application to a client-server p2p model with a shared data structure. That's the bad news. Good news is that I could quickly bring up a number of Delphi networking tutorials using Google.

For example:
http://delphi.about.com/od/networking/l/aa112602a.htm

I would suggest looking at an IRC (chat) example. This will probably show you how to do basic networking and message passing.

You will need to have a mechanism to set an application to be able to host. This can be as simple as enabling "hosting" which sets up a listening socket on a port of your choosing on the player's machine.

Assume that another player knows the IP of the server and tries to connect. After you get that done, you can start work on how to share data. How client and server exchange data, is up to the programmer. Networking can be complicated, so be prepared for some more learning.

Share this post


Link to post
Share on other sites
wodinoneeye    1689

Maybe a DLL written in C/C++ to do the functionality ?????

Last I saw Delphi was using a modified Pascal (???) which should have the conventional DLL interfacing available.





Another component may be how to establish the Peer to Peer connection -- a Lobby system to get the IP info interchanged (possibly also User info/preferences/scores if needed)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this