idea for multiplayer game

This is a discussion on idea for multiplayer game within the Networking/Device Communication forums, part of the General Programming Boards category; Not a game idea but a way to host and join games the host sends his ip to an online ...

  1. #1
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267

    idea for multiplayer game

    Not a game idea but a way to host and join games

    the host sends his ip to an online database
    the client can look through the database for games to join
    user takes the ip address and types it in the client
    client and server connect to each other

    I tried the typing the IP address in thing with a friend and it works properly
    The problem is, i dont know how to manipulate databases with scripting languages
    can someone link me or explain how this would be done?

    [edit]
    come to think of it, do all multiplayer games work more or less the same way?

    [edit2] i just realized that i don't know how to get the ip address without manually going to whatismyip.com
    Last edited by h_howee; 08-26-2007 at 09:19 AM.

    OS: Windows 7, XUbuntu 11.10, Arch Linux
    IDE: CodeBlocks
    Compiler: GCC

  2. #2
    Registered User
    Join Date
    Aug 2007
    Location
    Barbados
    Posts
    31
    It seems cool, but I don't think it is very secure, I know virtualy nothing about network type programming, but I do know that showing your IP to any and everyone who is interested is a definite way to get attacked by some cyber gang.

    But, since I have no skill in network programming... Nice idea.
    I will try to learn it soon, I don't trust messenger, something about a Instant messenger made by me seems enticing...

    Later.

  3. #3
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    yeah, I've thought of that too
    i could encrypt the ip address and display it under "Game ID"

    OS: Windows 7, XUbuntu 11.10, Arch Linux
    IDE: CodeBlocks
    Compiler: GCC

  4. #4
    For Narnia! Sentral's Avatar
    Join Date
    May 2005
    Location
    Narnia
    Posts
    719
    This is nothing new. Mostly all multiplayer games have some sort of server browser. When a server is created is talks to the master server (database holding lists of servers). The server browser connects to the master server listing all available servers to join. Then instead of typing in a IP address you simply click the server name and join.
    Videogame Memories!
    A site dedicated to keeping videogame memories alive!

    http://www.videogamememories.com/
    Share your experiences with us now!

    "We will game forever!"

  5. #5
    Registered User
    Join Date
    Aug 2007
    Location
    Barbados
    Posts
    31
    regarding finding your ip address.
    Type in command prompt :
    ipconfig

    apparently computers have more than one ip. hmm.

  6. #6
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Quote Originally Posted by sea_4_ever View Post
    regarding finding your ip address.
    Type in command prompt :
    ipconfig

    apparently computers have more than one ip. hmm.
    Yes (LAN/WAN/Subnet/etc), and especially if you have more than one network card... Such as a redundant one - or extra cards to make you sound cool.

    To get the IP, When you connect to the masterserver (the one with the DB on it), have it get your IP when it accept()s you - it's in the extra info, whatever.
    Last edited by zacs7; 08-27-2007 at 12:40 AM.

  7. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    Quote Originally Posted by sea_4_ever View Post
    It seems cool, but I don't think it is very secure, I know virtualy nothing about network type programming, but I do know that showing your IP to any and everyone who is interested is a definite way to get attacked by some cyber gang.
    If you don't want your IP address visible, then you can't run a host. Either you're a server or you aren't. Keeping your IP address secret is not "security," it's obscurity. If your security depends on your IP being secret, you're not secure at all.

  8. #8
    Registered User
    Join Date
    Nov 2005
    Posts
    11
    you could just use php on your web site. ie. to check for multiplayer games the client would look on a certain page. if you hosted it would send your ip to that page with some details about your game.
    for an example, go to this page:
    http://diogames.com/list.php?version=1.13.5

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    The best way is to use port forwarding. Hide your server behind a router with a 192.168.*.* address and have the router port forward the game port to that address. Then 'cyber gangs' can only attack that port. Attacking a port is useless unless it has specifica security flaws in the application that processes the data from that port. Port 80 is a common port to atack becuase Windows has huge security problems that are alwasy availabel on that port. While a third party program such as your game can just avoid addign in any functionality that woudl allow hackers to access your system in ways you didnt want them to.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  10. #10
    Registered User
    Join Date
    Dec 2005
    Location
    Canada
    Posts
    267
    thanks for the help but I don't understand most of the explanations... I'm still quite new to network programming

    I'm looking for something like the link in jothesmo's post
    any idea how that would be done?

    OS: Windows 7, XUbuntu 11.10, Arch Linux
    IDE: CodeBlocks
    Compiler: GCC

  11. #11
    Registered User
    Join Date
    Nov 2005
    Posts
    11
    you'd have a list.php, host.php, host_remove.php, myip.php, and a verify.php

    list.php > client contacts this to get a list of servers available with names and ips, other details
    host.php > server sends its name and details to this
    myip.php > after server sends details this script gets the servers ip, then puts it on the list.php
    verify.php > every 10-20 seconds, server sends a small notice to this to verify that its still active
    host_remove.php > server contacts this when the host has left, or if the verify script hasn't received a notice within 20 seconds, so its removed from the list.php

    i dont know how exactly the code for these scripts would go, but you might find it on google.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Game Idea (Tetris Maze)
    By SlyMaelstrom in forum Game Programming
    Replies: 13
    Last Post: 06-07-2006, 05:48 PM
  2. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 03:18 PM
  3. Someone help me with this game??
    By stehigs321 in forum Game Programming
    Replies: 15
    Last Post: 10-30-2003, 08:42 PM
  4. u got me wrong fellas
    By clover in forum Game Programming
    Replies: 4
    Last Post: 10-18-2003, 04:23 PM
  5. IDEA: chess game
    By master5001 in forum Contests Board
    Replies: 30
    Last Post: 07-05-2003, 05:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21