Results 1 to 8 of 8

Thread: Online Game ?

  1. #1

    Online Game ?

    Hi ...

    I wanna make an online game , but the main problem is how to make connection between the players like if I moved player1 the other computer has to see this movement ,I tried to make it as the network game(LAN) but the computers can't connect with each other by internet sepically if the internet access by router , so I found another idea like to make all players send there information movements to the website and then every player will bring all the information from the same website in that case all players will know if there any changes in movement
    I don't know if my idea is good or not, please tell me if it's wrong what the best way.

    - is there any example about that ?
    - is there any example about send and bring information from website?

    Thanks

  2. #2

    Re: Online Game ?

    A bunch of articles on multiplayer gamedev:

    http://www.gamedev.net/reference/list.asp?categoryid=30

    You should take a look at the Indy components. There are also other networking libraries like Raknet etc...
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Re: Online Game ?

    What I would do:
    Create a server-client environment.
    - Server -> Start server
    - Client -> Start client
    - Client -> Join server
    - Server -> Jibber jabber game state/level
    - Server -> Send send message CreatePlayer(ID)
    - Server -> (optinally) Sends all other player ID's
    - Client -> Creates player with ID
    - Client -> Send player update info to server
    - Server -> Send client player update to the other clients

    This way both server and client know the status and ID of the player. And as you can see the server is the master that know everything. He knows when a player connects or disconnects, so he can also notify the other clients.
    NecroSOFT - End of line -

  4. #4

    Re: Online Game ?

    Quote Originally Posted by programmer
    Hi ...

    I wanna make an online game , but the main problem is how to make connection between the players like if I moved player1 the other computer has to see this movement ,I tried to make it as the network game(LAN) but the computers can't connect with each other by internet sepically if the internet access by router , so I found another idea like to make all players send there information movements to the website and then every player will bring all the information from the same website in that case all players will know if there any changes in movement
    I don't know if my idea is good or not, please tell me if it's wrong what the best way.

    - is there any example about that ?
    - is there any example about send and bring information from website?

    Thanks
    Perhaps this site will help:

    http://indie-resource.com/forums/viewforum.php?f=27

    It has videos on how to create a complete browser-based (Firefox or IE) MMO using PHP, MySQL, and Apache!

    I am trying it out right now so I can learn some PHP, etc.

    In just the first 4 videos, you learn where to get the software you need (WAMP), and how to write your first PHP programs...a hello world, and then a database accessing simple registration page for creating a character in a database

    cheers,
    Paul
    Games:
    Seafox


    Pages:
    Syntax Error Software itch.io page

    Online Chess
    http://gameknot.com/#paul_nicholls

  5. #5

    Re: Online Game ?

    If you already have game working on LAN, the TCP/IP version of it is no different at all. There may be some issues that need to be taken care of for packetloss, latency and disconnections but the network components and usage are the same.

    In regard to routers, that is something you can't do much about. Loads of people posess internet connections that are not capable of acting as server, therefore you can either put up a real game server that all games send packets through (as any mmorpg does), or be happy that some people can create server to host games to their friends

  6. #6

    Re: Online Game ?

    Thank you so much

    The next question
    - is there any example about send and bring information from website? by delphi

    or some codes for doing that



  7. #7

    Re: Online Game ?

    Question ?
    Just about the server , what is it , I mean is it a program put on the website and all the clients connect with it or I can make it like for example a MYSQL Database in that way all clients can send and save there positions to the Database and the other take that positions from the same Database and update the players positions

  8. #8
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,246
    Blog Entries
    2

    Re: Online Game ?

    Quote Originally Posted by programmer
    Question ?
    Just about the server , what is it , I mean is it a program put on the website and all the clients connect with it or I can make it like for example a MYSQL Database in that way all clients can send and save there positions to the Database and the other take that positions from the same Database and update the players positions
    If you want to host the server properly, then in most cases it will be either a service application (for Windows) or a daemon (for Linux). It will run on a server and your clients would connect to it using a specific TCP/IP port. It would be good to wrap the entire server in a self contained class, so during development, you can run it in a normal application (debugging services isn't nice) and then when it's ready for use, wrap it in a service.

    Depending on your game and the volatility of the game universe (ie. the frequency with which things change during normal game play), you'll probably find that using anything other than a dedicated server application isn't fast enough. My on-line game uses MySQL as it's storage medium, but it is entirely web based with updates only occuring when players change things via the web interface and the hourly updates which make time pass in the game.
    :: AthenaOfDelphi :: My Blog :: My Software ::

Bookmarks

Posting Permissions

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