Thread: Chat

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    132

    Chat

    Is there anyway to include a Chatroom into a program?

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    hmm well since there are programs that allow you to access chat rooms then I would have to say yes there is a way to include chat room functionality into your program.

    The IRC protocol was the first network protocol I studied and implimented. It's very simple really. If you want to add IRC functionality to your program search google for "IRC rfc" which will explain the protocol to you.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    oh yeh i forgot about mIRC. very easy to code in mIRC.

    do u just host using ircX program or something, then code it to ure C++ code and u can edit users accounts thru the ircx program, and stuff?

    oh, and also. if i made a fighting game, and say a punch had a small glitch, and people had already got the exe, instead of releasing a new version fixing 1 bug, is there a way for my side of the program to UPDATE and other people with it got theres updated to the fixed version? and to ADD brand new fighters \ moves when i want without having them download it all again?

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    903
    You would have to code this part of the program into a DLL, that way you would only need to provide them with a new DLL. That's the only solution I see, which is not really a solution in this case.

  5. #5
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    Hmmm, well i use to play a fighting game which is now dead.

    and when u open the .exe a loading screen comes up and when theres updates, it downloads the updates stright into your program without actualy having to download DLL and other files.
    anyone got any idea?

  6. #6
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Not sure on this one because I don't know of the program you're talking about, BUT I believe when it says it's updating it IS downloading new files and replacing old ones, just without the user having to manually place the files. That wouldn't be too hard to have the client program download new files from the server and place them correctly, and THEN load the DLL.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  7. #7
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    Ahh i see. i think i have read about that.

    Well it was a wrestling online card game. and when they released new wrestlers and their decks of cards + new cards it updates. into a DATA folder which are a filetype i have never encountered before and i dont think many people have. and it must of replaced them like you said.

    in the DATA folder, everysingle card was in it. like 1000's of them. what would they be called? like functions or what?

  8. #8
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Yes, I have encountered .dat files before. The cards stored in it are probably read from the .dat file into an array or struct and then used when needed.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  9. #9
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    Oh no they wasnt DATA files.
    they were in a folder called Data but the file extension was summin like .gam or .gim i have never heard of it.

  10. #10
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Ok...... Well yeah, the file type is irrelevant, you just need to get the data from them and into a usable type. I could have a game and store my game data in a file called data.abc it doesn't matter a whole lot as long as you retrieve the data and convert it into usable data.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  11. #11
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    oh ok cheers. if there is a .gam file, is there anyway to open and view the code? without the actual source?

  12. #12
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    You can open virtually any file in Notepad, it may look like garbage though so you need to figure out how it's encoded.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  13. #13
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by Hugo716
    do u just host using ircX program or something, then code it to ure C++ code and u can edit users accounts thru the ircx program, and stuff?
    Yes you would need to install an IRC server on your server and have the clients connect to it. Another way is to have your game clients send messages as part of the game protocol, so your chat system is built directly into the game system.

    oh, and also. if i made a fighting game, and say a punch had a small glitch, and people had already got the exe, instead of releasing a new version fixing 1 bug, is there a way for my side of the program to UPDATE and other people with it got theres updated to the fixed version?
    Updates should all come from a central server. When the user opens the program have it connect to the server and check for updates. Your updates should be in the form of a patch wich modifies the executable and data files that have changed.

  14. #14
    Registered User
    Join Date
    Apr 2006
    Posts
    132
    ok cool. u got ne sites to tell me how to put a chat room straight into the program.

    and the updater.

    btw does a server cost money?

    and is there anyway to DECODE a file to find the source?

  15. #15
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by Hugo716
    ok cool. u got ne sites to tell me how to put a chat room straight into the program.
    I don't know of any step by step tutorials. If you've figured out how to send information to different players then it's the same just chat messages. For example you could have something like this.
    Code:
    struct MSG
    {
       unsigned int Type;
       unsigned int DataLength;
       char *Data;
    };
    When the message type is set to a chat message type then handle it as that or it could be game data or some other type of message.
    btw does a server cost money?
    If it's just a small community game then you can run it from home on a spare computer. For a larger game you'd need profesional hosting.

    and is there anyway to DECODE a file to find the source?
    Not easily no. There are dissasemblers like IDA Prothat will produce assembly language code but these won't produce the origional source code.
    Last edited by Quantum1024; 05-18-2006 at 04:01 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Requesting Java Chat Client Maintenence
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 04-02-2003, 01:57 PM
  2. You like Classic AGI/SCI Games??, Try the Chat!!
    By Perica in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 02-05-2003, 11:05 PM
  3. Chat server/client trial -- anyone interested?
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-23-2003, 10:47 PM
  4. SO close to finishing chat program...!
    By Nakeerb in forum C++ Programming
    Replies: 13
    Last Post: 10-26-2002, 12:24 PM
  5. Rough Portable Chat Design Sketch
    By ggs in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-27-2001, 07:44 AM