Results 1 to 31 of 31

Thread: 2 player online game

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    6

    2 player online game

    I have a vb game sth like tic tac toe. I have the client server codes too in vb6.but i dont know what to do to upload the game on
    server. What should i upload ? The exe file or the code? Or i must have a html code that contain my code?
    Please help me what to do? Any help would be appriciated.

  2. #2
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: 2 player online game

    To upload the game you simply upload it, using FTP or ....

    However it sounds like what you are really asking is how do you make it run on a web server which is a totally different ballgame.

    Your first step would be to create a web based application which most likely means starting over.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    6

    Re: 2 player online game

    Could you plz explain web based application a bit? Do i need html or php coding? Can a vb form be loaded in a web page or i should design my form using buttons and ... of the html programming?

  4. #4
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: 2 player online game

    VB programs are designed to show output on the computer where they are running.
    Most web servers would not allow you to run a VB6.Exe. Though there are some exceptions.

    Not sure what you have written or how you want it to work so I can't say, perhaps a VB6 app will do what you want and perhaps not. Without knowing what the server will allow and how the game would work is hard to say.

    As for doing web coding a VB programmer would be most comfortable using ASP which allows you to write server side VBScript and send HTML as output to run in a browser.

    Of course if your server can run unattended and your hosting server will allow it then you may be able to make what you have work.

  5. #5
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: 2 player online game

    Even if the Web Server allows exe, which is doubtful unless you have a private server, the server would have to support Windows based applications. I'm not sure ASP is supported by all web servers.

    How did you make your game? I mean what means did you incorporate into it to be able to play online. Did you use Winsock or what? Can your game be converted to HTML? When you speak of server do you mean your web hosting server; do you have a web site? You need to explain your game code better


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    6

    Re: 2 player online game

    My game includes a winsock and it is just written in vb6 and no more. I have a web hosting server. My game has some images in a form. Each time a
    player must click an image and then it checks whether someone wins the game.it has also a text that the players can chat through. I said it is something
    like tic tac toe. First i tested my game in a peer to peer conection. But there was problems with the firewalls.
    Anyway I think your helps about asp can be practical. But your further helps would help me more. Thank you all.

  7. #7
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: 2 player online game

    You still haven't answered how you want to run your game. Do you want your players to download the exe from your web site and play the game on their PC as a VB exe or do you want to play the game on your web site and again does your web host allow you to run exe on their server.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  8. #8
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: 2 player online game

    Quote Originally Posted by jmsrickland View Post
    I'm not sure ASP is supported by all web servers.
    No it is not supported by all web servers. It is a Windows based technology but has became pretty widespread over the last 10 years. Then again it is also outdated and if one wants to use basic code then the proper route would be ASP.Net

  9. #9
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: 2 player online game

    I have two web sites. One supports asp and the other doesn't. What does ASP.NET do that regular ASP doesn't do?


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  10. #10
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: 2 player online game

    Lots, way to much to go into.

  11. #11

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    6

    Re: 2 player online game

    Quote Originally Posted by jmsrickland View Post
    You still haven't answered how you want to run your game. Do you want your players to download the exe from your web site and play the game on their PC as a VB exe or do you want to play the game on your web site and again does your web host allow you to run exe on their server.
    The clients will download the exe file and connect to the server via the exe file. Then two players must connect and start the game. Help me how to do it.

  12. #12
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: 2 player online game

    OK, now that we know how you want to play the game now we need to find out how you are going to do this.

    When you say 'server' is the server on your PC or on the web site?

    If it is on your PC then do you have a static IP address or does it change each time you get on the Internet?

    Do you have FTP access to your web site. I'm assuming you have a web site.

    I need to know these thing so I can tell you what you may have to do with the server application


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  13. #13

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    6

    Re: 2 player online game

    The server is on the web. And i have ftp access to my site .

  14. #14
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: 2 player online game

    Are you running an executable on your web site or is it a script program. Explain the client program. Is it a VB program that uses Winsock or WebBrowser control?. I kind of need to know a few generals about what you are dealing with.

    If the server app runs on your web site then I'm assuming that you will always have a static IP address so it's a simple matter for the client app to connect to your server app on the IP address and Port number your server app is running under.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  15. #15
    PowerPoster
    Join Date
    May 2006
    Posts
    2,295

    Re: 2 player online game

    I have nothing to add to the OP's post, but do have a question. Say I have two computers, and students are both running a local copy on their machine. Would winsock allow them to communicate via IP to send info back and forth, but I suppose I would have to know each computers IP address for that work right?

  16. #16
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: 2 player online game

    Yes you can use winsock to communicate over a network and yes you need to know the computers IP or name. Also if the computers are going to be connecting over the internet where routers are in use port forwarding may need to be set up on the router(s)

  17. #17

    Thread Starter
    New Member
    Join Date
    Feb 2013
    Posts
    6

    Re: 2 player online game

    Quote Originally Posted by jmsrickland View Post
    Are you running an executable on your web site or is it a script program. Explain the client program. Is it a VB program that uses Winsock or WebBrowser control?. I kind of need to know a few generals about what you are dealing with.

    If the server app runs on your web site then I'm assuming that you will always have a static IP address so it's a simple matter for the client app to connect to your server app on the IP address and Port number your server app is running under.
    My vb program uses winsock control. But i dont know how to connect to the server. Do i need some asp code for the server. And then i dont know how two specific clients are connected after connecting to the server.

  18. #18
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: 2 player online game

    Why don't you just post what you have for the server and client then we can take it from there.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  19. #19
    Addicted Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    168

    Re: 2 player online game

    l have made a backgammon game with vb6 .
    Is there a way to play the game with a remote friend over the internet ?
    Thanks for reples

  20. #20
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: 2 player online game

    Only if you add a lot of code for the communication between the 2 running applications.

  21. #21
    Addicted Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    168

    Re: 2 player online game

    Thanks feedback..
    Are there any examples or tutorials how this can be done ?

  22. #22
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: 2 player online game

    There are some multiplayer games done in VB6 on PSC
    https://www.planet-source-code.com/v...62729&lngWId=1

  23. #23
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: 2 player online game

    Quote Originally Posted by vbgeobas View Post
    Thanks feedback..
    Are there any examples or tutorials how this can be done ?
    You need a "Public reachable point in the Internet" (ideally via http or https),
    to allow Data-Exchange without "fumbling around on your Router and Firewall".

    There's free Online-Services, which one can use without any costs -
    as e.g. the Vercel/Now-OnlineService (formerly known as Zeit/Now).
    https://vercel.com/

    Many Cloud-Vendors offer generous, free contingents for their Online-DBStorage or Online-Serverless-Functions,
    but most of them (Amazon, Google, Microsoft) all want your:
    - Name/Address and PhoneNumber
    - along with your CreditCard-data in case you go over the free-limit.

    Vercel is different with its "OnlineStore for serverless Functions" - in that it doesn't require you
    to enter any personal data, it only requires you, to enter your credentials for an existing
    - GitHub, GitLab, or BitBucket account (which most devs have already these days).

    I could post an example, how to use the Vercel-API with VB6 -
    but to make use of this, you would have to create:
    - a GitHub-account first
    - then proceed with the Vercel-Login (just by using your GitHub-credentials)
    - and create a Vercel-Token on your personalized Vercel-Pages (after login)

    Reads more complicated than it is in practice, the whole process will take only about 5-10 minutes or so
    (most time spent, on creating your GitHub-account, if you don't have one already).

    Olaf

  24. #24
    Addicted Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    168

    Re: 2 player online game

    Hi Olaf,

    Thank you very much for your feedback . For someone like me , trying for the first time to use online game play , sounds great .
    l created a GitHub account , but l dont see how to create a Vercel-Token and what next .

    One more question
    - What the other guy , with whom l want to play my game has to do ?

    Of course l will be obliged if you cold post me an example .

    Thanks again

    George

  25. #25
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: 2 player online game

    Quote Originally Posted by vbgeobas View Post
    For someone like me , trying for the first time to use online game play , sounds great .
    l created a GitHub account , but l dont see how to create a Vercel-Token and what next .
    First, you have to create a "Vercel-account" (using your GitHub-credentials).
    E.g. when your GitHub-Username is "vbgeobas" then you will have to re-enter
    "vbgeobas" - along with your GitHub-Password into the Sign-In-Fields on the Vercel-WebPages.

    Once you're successfully logged-in into Vercel, you can then click:
    - in the horizontal menubar on [Settings]
    - followed by clicking in the (left-bar)-submenu on [Tokens]

    This will give you the Tokens-Screen of your personal account.
    And at the bottom of that Screen is a "Test-Token" entry - with a red [ReGenerate]-button...
    Clicking that button, will generate something like:
    a9rcrb0dTlZsZGNjonD4SbjM
    ...in a little Popup-Window, from where you can copy it (and store it e.g. as a String-Const in your VB-Project).

    Quote Originally Posted by vbgeobas View Post
    One more question
    - What the other guy , with whom l want to play my game has to do ?
    In the simplest case nothing, when you embed (host) your "personal Vercel-Token" in a Variable of your executable.

    Let me know, when you have successfully retrieved (and stored) such a Test-Token in your VB-Project...

    Olaf
    Last edited by Schmidt; Apr 25th, 2020 at 07:31 AM.

  26. #26
    Addicted Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    168

    Re: 2 player online game

    l regenerated my Token and got the string as you said

    What exactly do you mean "and store it e.g. as a String-Const in your VB-Project)."

    Opening the settings now , l have seen that l have been give a URL address .

    Where do we go from here .

  27. #27
    Addicted Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    168

    Re: 2 player online game

    Well , Olaf left me for some reason or another , only hope he is well .

    How about my original question as per post #19.

    Anyone ?

  28. #28
    Addicted Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    168

    Re: 2 player online game

    Well , Olaf left me for some reason or another , only hope he is well .

    How about my original question as per post #19.

    Anone ?

  29. #29

  30. #30
    PowerPoster
    Join Date
    Jun 2013
    Posts
    7,219

    Re: 2 player online game

    Have now put an appropriate Demo for the Vercel-WebAPI into the Codebank.

    Besides showing how deployment of functions and static files can be done,
    it also contains a little Chat-App in a second Project, which demonstrates how to
    use the Vercel-API as a "PushService" for JSON-formatted messages.

    So, for your GamePlay you could study this Chat-Demo, since instead of
    short ChatMessages, you could of course simply push "NextMove-info" -
    using the JSON-object, to store information as e.g. "from/to coordinates" in the JSON-properties.

    The auto-generated, unique ChatUsernames should be used further,
    since with them you are able to decide "who is who" (when the shared Push-messages come in)

    Here is the Codebank-article:
    http://www.vbforums.com/showthread.p...-in-the-Cloud)

    HTH

    Olaf

  31. #31
    Addicted Member
    Join Date
    Oct 2018
    Location
    Athens
    Posts
    168

    Re: 2 player online game

    Thanks Olaf ,

    After a lot of trying and use of unproper words l gave up and deleted my account .

    l have found another easy way to play with my cousin backgammon or French billiards or whatever other interesting game l have made ,
    and not only just playing but talking and seeing each other .

    Thank you again

    George

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width