Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Share data between 2 PC with Visual Basic 6

  • 10-11-2005 12:41PM
    #1
    Registered Users, Registered Users 2 Posts: 36


    Hi there all,

    please please help me, i am making a little game and i want to be able to share information between 2 pcs.

    Here is exactly the situation, i am making a turn based game, much like sim city, the thing is that i want people to be able to attack each other, much like Risk, in a turn based manner, much like Risk.

    Now i have alot of the game done, but one thing i have not gone near yet is passing data between 2 different PCs so that players fight each other. I started looking into this and i now know that i can use the Winsock control to make a server and client and chat programs, but i do not know how to do those things yet. So at this point actually i will add that i am using Visual Basic 6 to make the game and would like the solution to the VB6 based if possible.

    So is Winsock the way to go? If someone actually had code to show me, i would love that... thanks for the help,

    Donal


Comments

  • Closed Accounts Posts: 19,777 ✭✭✭✭The Corinthian


    Depends on the architecture of your game, that is to say are the two PC’s talking directly to each other or going via a third party (a Web or IRC server), and are they on a local network (and thus you could in theory simply pass files between them).

    If you use Winsock or similar you have to remember that you’ll be doing two instantiations, both to send and receive, so you may find it easier to use something such as the XMLHTTP for the sending part and use Winsock simply to build a mini-server for receiving.

    As for example code, I suggest you Google, TBH. There’s plenty out there.


  • Registered Users, Registered Users 2 Posts: 36 utilitarian


    Sorry Corinthian, my fault for not being specific, it is not intended for internet use, just LAN, maybe through a router, but basically PC to PC...

    as for what you say about the two instances of both that is what i was wondering, do i have to do a client/server on one side and a client server on the other.... that is what i think i will have to do...

    thanks, Donal


Advertisement