DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • December 13, 2017, 12:56:51 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3 ... 11   Go Down
  Print  
Author Topic: AJAX based chat  (Read 49023 times)
0 Members and 1 Guest are viewing this topic.
Catscradler
Guest
« on: February 22, 2006, 05:24:18 PM »

Okay all you hotshot DP coders, wanna make something REALLY good?  What's the most requested feature in the game?

1.  Decent marriage system - we have that)
2.  A PvP system that's fair - some good options but nothing great quite yet.
3.  A chat system where you don't have to click Refresh all the time - we can do that.

Wait, what?  Yes.  Yes we can.

As many of you know, AJAX is a combination of existing web technologies that (among other things) allow the user to reload parts of the page without freezing the rest of their browser while waiting for the request to go through.  The process is usually pretty speedy as well.  I've thought for a while that such a system would make the in-game chat system work better, but didn't want to propose it without any backup or suggestions as to how to go about it.

Luckily I just ran across a link to the Most Simple Ajax Chat Ever, which runs in about 20 lines of Javascript and about 40 lines of PHP.  A system like this should be, well, not easy, but not on the level of recreating the game, to integrate into the existing commentary code, with the old system to fall back on for browsers that don't support Javascript.

I'm merely proposing it because, well, I don't have the time to do it myself, but I figured some of you folks would probably like to give this a try for future code releases.
Logged
orochi
Guest
« Reply #1 on: April 14, 2006, 05:57:17 PM »

im sure its not too much of a problem Roll Eyes isent the installation file using ajax?
Logged
Torne
SVN Users
Codemeister
*
Offline Offline

Posts: 259


Code ninja


View Profile
« Reply #2 on: April 14, 2006, 05:58:06 PM »

No, the installer is a plain old html page with forms.
Logged
CortalUX
Dwellings Project
Mod God
*****
Offline Offline

Posts: 796


Wogga! Meep!


View Profile WWW
« Reply #3 on: April 15, 2006, 03:21:30 PM »

The magicmirror module I released does this; dunno where it is though. I'm sure that wouldn't be too hard to get working as it's already working in an LotGD popup.
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5477



View Profile WWW
« Reply #4 on: April 15, 2006, 05:09:16 PM »

http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=360
Logged

Play the latest beta version here on DragonPrime
orochi
Guest
« Reply #5 on: April 16, 2006, 09:47:17 AM »

i use the magic mirror system, and really like it ^_^ it would be cool if the main chat wasa similar
Logged
CortalUX
Dwellings Project
Mod God
*****
Offline Offline

Posts: 796


Wogga! Meep!


View Profile WWW
« Reply #6 on: April 16, 2006, 03:16:31 PM »

depends how big your userbase was; unless old ajax chat messages weren't deleted
Logged
Oberon-FI-
Guest
« Reply #7 on: April 21, 2006, 12:03:33 PM »

sorry if I resume this old post.
I have developed a chat system for village and all area with AJAX so to replace the commentary with a live chat.
I have tried magicmirror system too, but i have always the same following bug:

when i send a message, the "div" (where the message is attached) doesnt refresh correctly.
I cannot see the message: to see it, i have to reorganize or move the browser window O_o.

Am i only with this problem?  Sad

~Oberon~
http://www.fantasyitalia.it/LotGD/
Logged
edmund
Member
Militia
**
Offline Offline

Posts: 23



View Profile
« Reply #8 on: September 13, 2006, 02:33:40 AM »

I have developed a fully AJAX version of the commentary system that works like a charm, I'm in final testing with my users on HL and will release it as a module in a week or two, it does require a slight change to the commentary lib in that I had to add 2 modulehooks to make it work right, but the AJAX chat works perfectly, and it degrades well for people who have javascript problems and can be turned on and off at will by users if they prefer to use the old way.
Logged
Nightborn
Guest
« Reply #9 on: September 13, 2006, 02:40:59 AM »

great! =)


what about the timeout? how did you do that?
Logged
edmund
Member
Militia
**
Offline Offline

Posts: 23



View Profile
« Reply #10 on: September 19, 2006, 02:35:27 PM »

the ajax request itself does not update the person's login timer, so if they just sit on the chat area, they will time out as normal, one of the bugs I am working on is to make it so that the posting of a comment will update the person's login timer while displaying will not, this way posting a comment will keep you loggedin, but just watching the chat scroll by will not,

Also I have a javascript timer as well, after a few minutes of inactivity, if the person does not post a comment or browse to another page the live updating will stop and give people a link to turn it back on.

Another thing I'm working on is for moderators, wherre they can delete comments live from within the chat area.

If you would like to see for yourself how the live chat system works, I have it installed in it's alpha glory on HogwartsLive.com

Also, I have sent my alpha version to the owner of a couple other sites.
« Last Edit: September 19, 2006, 02:37:04 PM by edmund » Logged
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #11 on: September 20, 2006, 01:49:14 AM »

the ajax request itself does not update the person's login timer, so if they just sit on the chat area, they will time out as normal.

this way posting a comment will keep you loggedin, but just watching the chat scroll by will not,

This is very dissatisfying. The AJAX version should have no difference to the normal standard chat as it is now. It should only be faster...
Logged

Running for more than three years now:
Torne
SVN Users
Codemeister
*
Offline Offline

Posts: 259


Code ninja


View Profile
« Reply #12 on: September 20, 2006, 04:15:28 AM »

Does the client poll for new text from the server, or is it real server-push?
Logged
Maeher
Codemeister
****
Offline Offline

Posts: 362


There's nothing to see here...


View Profile
« Reply #13 on: September 20, 2006, 05:34:13 AM »

the ajax request itself does not update the person's login timer, so if they just sit on the chat area, they will time out as normal.

this way posting a comment will keep you loggedin, but just watching the chat scroll by will not,

This is very dissatisfying. The AJAX version should have no difference to the normal standard chat as it is now. It should only be faster...

Where exactly do you see the difference?
Logged

There is no signature...
XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #14 on: September 20, 2006, 05:44:48 AM »

If you click on "Refresh" now, you will not time-out.

According to his description I would time-out after some minutes.
Logged

Running for more than three years now:
Pages: [1] 2 3 ... 11   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
20 Guests, 2 Users
Wolfsbanewillow, Stephen.Kise
Home Forums News Downloads Login Register Advanced Search