Jump to content
  • Advertisement
Sign in to follow this  
cNoob

Is it easy to make an easy chat program

This topic is 4829 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i was woundering if it would be easy or hard to create a chat program like msn so who ever has the program(my friends and family) can chat without using msn.

Share this post


Link to post
Share on other sites
Advertisement
well, to create a program like msn is I think hard but just creating a chat
in console for your friends is easy, just make an server/client setup using
winsock that can handle the amount of friends you got.

look at this session http://www.gamedev.net/reference/list.asp?categoryid=30
you have what you need there.

Share this post


Link to post
Share on other sites
If you just want to chat on your LAN you can use pipes or mailslots, very very easy.

If you want to chat on the internet it is more work.


Share this post


Link to post
Share on other sites
"An easy chat program" is relatively easy to make. It is basically a requirement for any online game. If you want to give it all the features that MSN has, then it is no longer an easy chat program. Every feature you add takes more time.

The simplest I can think of would let you log in with a name (no password) and just broadcast messages to everyone else logged in.
Adding an account (with a password) and private messaging would probably be the next thing.
You could add chat rooms if you wanted to head that direction, but if it is for just friends and family, then private messaging would probably be sufficient.

I used Beej's Guide, it is targeted for unix, but Winsock has almost all the same names.

Share this post


Link to post
Share on other sites
The "big problem" is, do you have a server to run the program? You could run the server at your own PC, but when you disconnect from the internet, everybody will be disconnected from the server too obviously.

Another approach would be to create a chat client, in which you'd need to know the IPs of your family and they'd need yours, then connect "directly" to their PCs. Now, if the question is, how do I tell them my IP once Im online? (well msn... no Im joking), you could create a php script that gets called by your msn application, writing to a text file in the server (if you dont have a DB backend) the IPs of everyone, and then you could access another php script from your browser, that reads those IPs and the time they were logged...
Altough the server approach would seem simpler.

If you know Java, then doing a first version of such app, would take around 1 week if you're not profficient with the language, since Java offers lots of classes to deal with sockets and such in-house, and its really easy to come up with a good prototype in almost no time (with GUI and stuff)
In C/C++ you'd have to use socket functions, or an external networking library. And use something like Wxwidgets or Fox-Toolkit for the GUI (if you want one).

Anyway, the point is, if your expectations are not too high, Im sure you can come up with a good app in a short period of time, if you already have a basis in the programming language you choose.

Good luck

Share this post


Link to post
Share on other sites
It would be easy if you created a simple chat program. More complicated to do something "like MSN" if you intend to include inline winks, file transfers, webcam, microphone, games, whiteboard etc. etc.

Share this post


Link to post
Share on other sites
Quote:
Original post by darklordsatan
The "big problem" is, do you have a server to run the program? You could run the server at your own PC, but when you disconnect from the internet, everybody will be disconnected from the server too obviously.

Another approach would be to create a chat client, in which you'd need to know the IPs of your family and they'd need yours, then connect "directly" to their PCs. Now, if the question is, how do I tell them my IP once Im online? (well msn... no Im joking), you could create a php script that gets called by your msn application, writing to a text file in the server (if you dont have a DB backend) the IPs of everyone, and then you could access another php script from your browser, that reads those IPs and the time they were logged...
Altough the server approach would seem simpler.

If you know Java, then doing a first version of such app, would take around 1 week if you're not profficient with the language, since Java offers lots of classes to deal with sockets and such in-house, and its really easy to come up with a good prototype in almost no time (with GUI and stuff)
In C/C++ you'd have to use socket functions, or an external networking library. And use something like Wxwidgets or Fox-Toolkit for the GUI (if you want one).

Anyway, the point is, if your expectations are not too high, Im sure you can come up with a good app in a short period of time, if you already have a basis in the programming language you choose.

Good luck


With IP-related things, what I do is use something like dyndns. I run software like DirectUpdate (there are other free ones) and it updates my account when my IP address changes. This way the client software just connects to yourname.dyndns.org (at whatever port you choose) and if you computer (server) is online then it works, otherwise you return a "Server Offline" message.

Another method could be, when you turn the server on, you FTP your IP to some website. And when a client wants to connect, it goes to the website to get the IP address. When you shut down the server you can update the IP address to "Offline" or something, so the client knows before trying an outdated IP address.

There are probably plenty of other solutions for servers that are dynamic/temporary.

Share this post


Link to post
Share on other sites
Quote:
Original post by nprz
With IP-related things, what I do is use something like dyndns. I run software like DirectUpdate (there are other free ones) and it updates my account when my IP address changes. This way the client software just connects to yourname.dyndns.org (at whatever port you choose) and if you computer (server) is online then it works, otherwise you return a "Server Offline" message.

Thanks for the tip. I had forgotten about dyndns at all.

Share this post


Link to post
Share on other sites
My first ever online related program was a 2-way chat program (which I actually added a whiteboard to after getting the chat working). It was much simpler to first learn how to go about one server accepting only one connection from one client.

+--------+    +--------+
| server +----+ client |
+--------+ +--------+


as opposed to

+--------+    +--------+    +--------+
| client | | client | | client |
+--------+._ +----+---+ _.+--------+
\_ | _/
+--------+ +----+---+ +--------+
| client +----+ server +----+ client |
+--------+ _+----+---+_ +--------+
_/ | \_
+--------+' +----+---+ `+--------+
| client | | client | | client |
+--------+ +----+---+ +--------+


It's really up to you to decide what you want to try though :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by cNoob
i was woundering if it would be easy or hard to create a chat program like msn so who ever has the program(my friends and family) can chat without using msn.


I don't mean to be derogatory or anything but... why not just use MSN?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!