Help making an online chat box
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 49
- Joined: Tue Feb 10, 2009 6:07 pm
Help making an online chat box
hi and hello i'm fairly new to programming and i was trying to create something along the lines of an online chat box/forum where you could just open the program and whoever else had the program could open their and post a topic then you would be able to see it and connect to talk with that person. Is that possible with love? if so how would you go about scripting that out? thank you in advance!
Re: Help making an online chat box
Techically it's possible. I have for instance a chat thingy included in my LÖVE project (https://launchpad.net/poyta, feel free to study and copy the code).
Keep in mind that:
But possible
Keep in mind that:
- - Right now text input is very limited (no charset conversion or automatic capitals with shift) except if you code it yourself for each keyboard layout existing...
- To have a forum-like thing where text is memorised, you need a server that is always up, and possibly that reads and writes in files on the server's hard drive. That's more complex already, but you can also do it in LÖVE (although I'd recommand using pure Lua + LuaSocket for a server, since running a graphical app for a server is not always possible and not really CPU friendly. I did this in the aforementionned project (free advertising FTW) (nested parentheses too)).
But possible
"When in doubt, use brute force." Ken Thompson
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Help making an online chat box
Especially with this lua might be 'dangerous', because it accepts anything. This might sound weird, but what I mean is that your code is not as 'solid' as C, again vague. Let me say it good: you'll need a few checks, if you want to do it right, don't accept everything. (talking about data)
It is possible, but.. why? We have an active forum (oh.. so, that's where I keep spending my time..), we have IRC, it might not be an all-in-one program, but it works. And, as Tenoch said, LÖVE is made for games, not applications, this is the reason why creating such an application in LÖVE will not be CPU-friendly, not to mention: hard.
It is possible, but.. why? We have an active forum (oh.. so, that's where I keep spending my time..), we have IRC, it might not be an all-in-one program, but it works. And, as Tenoch said, LÖVE is made for games, not applications, this is the reason why creating such an application in LÖVE will not be CPU-friendly, not to mention: hard.
-
- Prole
- Posts: 49
- Joined: Tue Feb 10, 2009 6:07 pm
Re: Help making an online chat box
Ok i know i can use a server so i was wondering if you could somehow write a script where it would save the chats comments in a temporary file then when you log out it would delete it. Ok so a scenario here:
player 1 opens program
player 1 makes a nickname then hits "start chatting"
player 2 opens program makes a nickname and hits "start chatting"
player 1 makes a chat room and labels it "hi"
player 2 sees chat room and clicks on "hi"
player 1 sees him enter
player 1 starts chatting with player 2
the chat is displayed on the screen and saved in a file on each players computer. allowing them to scroll up and down the chat reviewing the history.
player 1 is done chatting and logs closes the program.
at this point the chat room is deleted and both player's chat history file is deleted.
player 2 logs closes the program.
in the chat box i would like certain functions like sign off, exit chat room, make a new chat room, join another chat room.
do you think that that way would be easier?
player 1 opens program
player 1 makes a nickname then hits "start chatting"
player 2 opens program makes a nickname and hits "start chatting"
player 1 makes a chat room and labels it "hi"
player 2 sees chat room and clicks on "hi"
player 1 sees him enter
player 1 starts chatting with player 2
the chat is displayed on the screen and saved in a file on each players computer. allowing them to scroll up and down the chat reviewing the history.
player 1 is done chatting and logs closes the program.
at this point the chat room is deleted and both player's chat history file is deleted.
player 2 logs closes the program.
in the chat box i would like certain functions like sign off, exit chat room, make a new chat room, join another chat room.
do you think that that way would be easier?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Help making an online chat box
Still a bit vague...bartbes wrote:Let me say it good: you'll need a few checks, if you want to do it right, don't accept everything. (talking about data)
I didn't get the impression hellfiresage wanted to replace the LÖVE CLUB with his app or anything. More likely just a project to learn from. To get experience in networking, general programming, etc. But, hellfiresage: it is not going to be easy. If it's too hard, you could try something less epic first.bartbes wrote:It is possible, but.. why?
Help us help you: attach a .love.
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot], Bing [Bot] and 17 guests