Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Searching for opponents, what do I need?

Searching for opponents, what do I need?

Scheduled Pinned Locked Moved C#
csharpgame-devsysadminalgorithmsquestion
10 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Link2600
    wrote on last edited by
    #1

    I'm thinking of writing a game in C# that have a "searching for opponents" feature, like the internet checker included in Windows XP. What do I need to do that? Since I'm directing searching for an opponent on the internet, so I don't think I need to have a server, do I? Okay, but how?

    T D 2 Replies Last reply
    0
    • L Link2600

      I'm thinking of writing a game in C# that have a "searching for opponents" feature, like the internet checker included in Windows XP. What do I need to do that? Since I'm directing searching for an opponent on the internet, so I don't think I need to have a server, do I? Okay, but how?

      T Offline
      T Offline
      TalkingBabb0t
      wrote on last edited by
      #2

      you *could* be cheap and use the IRC protocol to make the clients go to a secluded room on a popular server, and from that point inside the room, communicate using a proprietary protocol. However, I don't think the admins of that server would smile down too kindly on you.

      1 Reply Last reply
      0
      • L Link2600

        I'm thinking of writing a game in C# that have a "searching for opponents" feature, like the internet checker included in Windows XP. What do I need to do that? Since I'm directing searching for an opponent on the internet, so I don't think I need to have a server, do I? Okay, but how?

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        In other words, yes, you need your own server to do this. How can you search the Internet for opponenets when there are some 4 BILLION addresses to look at? You need to have some central place that each game can register itself at so you can easily contact other players. That's how all the off-the-shelf games do it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        L 1 Reply Last reply
        0
        • D Dave Kreskowiak

          In other words, yes, you need your own server to do this. How can you search the Internet for opponenets when there are some 4 BILLION addresses to look at? You need to have some central place that each game can register itself at so you can easily contact other players. That's how all the off-the-shelf games do it. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

          L Offline
          L Offline
          Link2600
          wrote on last edited by
          #4

          Okay, my idea is very similar to an instant messenger -- Do I need a server for the instant messenger to work? So, if I do need it, how do I do that? What technology should I use? SQL server? or IRC protocol? but how to enable it? Sorry for my stupid question........ Thanks

          D 1 Reply Last reply
          0
          • L Link2600

            Okay, my idea is very similar to an instant messenger -- Do I need a server for the instant messenger to work? So, if I do need it, how do I do that? What technology should I use? SQL server? or IRC protocol? but how to enable it? Sorry for my stupid question........ Thanks

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            I would HIGHLY suggest picking up a book on remoting before you even attempt this. Otherwise your just wasting your time. For a game project like this, on a smaller scale, you don't have to use SQL server for anything. The server app can store all the session data it needs in memory. The protocol is something you define. What does an IRC protocol know about your game? Nothing! So you have to write the rules of communication and what you want to communicate. That's the definition of a protocol... You could use TCP/IP Sockets, .NET Remoting, WebServices, ... Like I said, pick up a book on these thing first. The best book is one YOU can understand, not the next guy on the board who's got 20 years of programming experience can could flip through the same book and in 20 minutes and call it "read". RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

            L 1 Reply Last reply
            0
            • D Dave Kreskowiak

              I would HIGHLY suggest picking up a book on remoting before you even attempt this. Otherwise your just wasting your time. For a game project like this, on a smaller scale, you don't have to use SQL server for anything. The server app can store all the session data it needs in memory. The protocol is something you define. What does an IRC protocol know about your game? Nothing! So you have to write the rules of communication and what you want to communicate. That's the definition of a protocol... You could use TCP/IP Sockets, .NET Remoting, WebServices, ... Like I said, pick up a book on these thing first. The best book is one YOU can understand, not the next guy on the board who's got 20 years of programming experience can could flip through the same book and in 20 minutes and call it "read". RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              L Offline
              L Offline
              Link2600
              wrote on last edited by
              #6

              I'm feeling so sad....... but thank you for your reply.

              C 1 Reply Last reply
              0
              • L Link2600

                I'm feeling so sad....... but thank you for your reply.

                C Offline
                C Offline
                Colin Angus Mackay
                wrote on last edited by
                #7

                Alex Ngai wrote: I'm feeling so sad Why? Because you have to read a book on the subject? Because it is more challenging than you imagined? Your bio says your a computer science major (excuse my lack of understanding on the US education system here) but doesn't that mean you are still at university? Surely you should be used to reading books. If I've misinterpreted and it means you've recently graduated then you have to realise that learning and educating yourself will not stop... EVER! On the area of it being more challenging that you imagined then just think about what leanring the area will make of you. Imagine how much your overall understanding will improve. Think of all the extra employment opportunities that open to you when you can demonstrate knowledge in this area. I hope this encourages you to continue with your project because I think once you understand how these technologies work you will probably find it isn't so hard.


                "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!

                L 1 Reply Last reply
                0
                • C Colin Angus Mackay

                  Alex Ngai wrote: I'm feeling so sad Why? Because you have to read a book on the subject? Because it is more challenging than you imagined? Your bio says your a computer science major (excuse my lack of understanding on the US education system here) but doesn't that mean you are still at university? Surely you should be used to reading books. If I've misinterpreted and it means you've recently graduated then you have to realise that learning and educating yourself will not stop... EVER! On the area of it being more challenging that you imagined then just think about what leanring the area will make of you. Imagine how much your overall understanding will improve. Think of all the extra employment opportunities that open to you when you can demonstrate knowledge in this area. I hope this encourages you to continue with your project because I think once you understand how these technologies work you will probably find it isn't so hard.


                  "If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!

                  L Offline
                  L Offline
                  Link2600
                  wrote on last edited by
                  #8

                  I'm feeling sad is because I need another computer in order to do a multi-player feature in my game. Since I don't have the money to buy another computer for the server, that means I won't be able to do what I wanted to do. Yes, I'm still in University, and reading books is part of my daily life. And because I'm still in University, that means I'm poor.....err, yea!! But thanks anyway, I think I will focus on other aspect, and I'm going to cancel the multi-player feature. By the way, if you know a way to avoid the use of server, let me know. Thanks

                  B D 2 Replies Last reply
                  0
                  • L Link2600

                    I'm feeling sad is because I need another computer in order to do a multi-player feature in my game. Since I don't have the money to buy another computer for the server, that means I won't be able to do what I wanted to do. Yes, I'm still in University, and reading books is part of my daily life. And because I'm still in University, that means I'm poor.....err, yea!! But thanks anyway, I think I will focus on other aspect, and I'm going to cancel the multi-player feature. By the way, if you know a way to avoid the use of server, let me know. Thanks

                    B Offline
                    B Offline
                    Bill Dean
                    wrote on last edited by
                    #9

                    Don't be sad...read the remoteing and/or web services book(s). In general, there's no reason why the "server" portion of the game has to reside on a physically seperate machine from your "client". Bill "it's all ball-bearings these days"

                    1 Reply Last reply
                    0
                    • L Link2600

                      I'm feeling sad is because I need another computer in order to do a multi-player feature in my game. Since I don't have the money to buy another computer for the server, that means I won't be able to do what I wanted to do. Yes, I'm still in University, and reading books is part of my daily life. And because I'm still in University, that means I'm poor.....err, yea!! But thanks anyway, I think I will focus on other aspect, and I'm going to cancel the multi-player feature. By the way, if you know a way to avoid the use of server, let me know. Thanks

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #10

                      Like Bill Dean said, the server can run on the same machine as the client. "Server" means more than just the hardware of a computer. The term more refers to the software that shares out its resources, or the resources of the machine on which it runs. But, being a Computer Science major, you already knew that, didn't you? RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups