Twilight Forums

Idle chat for wannabe heroes
It is currently Fri May 24, 2013 7:26 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Chat discussion
PostPosted: Wed Jul 18, 2007 5:36 am 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
Ok, we all know that chat is a secondary function, not worth much attention for the moment, but I thought some (i think) easy features, to improve its usability:

-To have an account option that would enable it to open as soon as we log in the game.
-To add at least a /who function so as to easily know is anyone else is in.
-And most importantly, add a feature that notifies all chat users that someone has entered logged in. Later, such a feature can be easily adjusted for the 'friends' list or the 'clan' members. (If I am not wrong, the only change will be the MySQL querry, having added an 'AND' clause...)

(I made a separate topic for this, since it is not an in-game issue. Feel free to set it up. And of course, it can be used for other chat related discussions :))

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 10:42 am 
Offline
Site Admin
User avatar

Joined: Thu Apr 05, 2007 2:04 pm
Posts: 4192
I do consider having a healthy chat important to the game, and I really would like to have it working better -- most especially the /who command. The main reasons I haven't done it yet is:

1) I haven't figured out how to tell if someone is logged in.
2) I also haven't figured out how to feed in and interpret commands in chat, something else that's critical before any of those functions work.

I've got a JavaScript/Ajax book sitting on my desk that I've been meaning to spend some time with, but haven't been able to yet.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 1:36 pm 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
Quote:
1) I haven't figured out how to tell if someone is logged in.


Hmm... ok, there are two steps: first, the moment someone enters, it is anounced in chat. (that's easy, you simply make a MySQL querry that adds him to the table of "logged members" and then call a function to refresh the chat.)

Then, the second step is a bit trickier, for a single reason: it is easy to tell that someone is logged in, but hard to tell when he logs out, asumming that almost nobody logs out via the link.

First of all, due to the previous "anouncement", we have a table that contains all the logged members. the /who command, corresponds to a querry, that returns and lists the members in this table.

The hard step, is how to remove members from that table: the first obivous method, is to do so when they use the logout link. But what about those that simply close the window? There are a few solutions:

-Expiration: track down the last time a character acted, and automaticaly log him out if this becomes 'old'. (this is the standard router table method)

-Make a java applet acting in the 'end of applet' and marking that character as logged out. The problem here is that a player with advanced java knowledge can easily make it appear as if he is always logged into. But I suppose this is not a big deal. Also, a secondary problem, is that there will be a very small delay for the user when the page closes, and also it will require script activation for uses with relative protection.

-Make it impossible for a user to close the window. Ok, sincerely, I have only seen this on those advertising pop-ups of old, that you couldnt close with anything but ctrl+alt+del (and then they spawned again). I do not know how it is done, but it will ensure that all players will log out via the proper link.

EDIT: about the seperate table: you can instead add a field to the table of characters, like "LOGGEDIN", boolean type, and simply querry that table for all the characters that have "true" in this field.

Quote:
2) I also haven't figured out how to feed in and interpret commands in chat, something else that's critical before any of those functions work.


Ok, this is piece of cake: I do not know which method you use for the chat, but the solution is so typical, that works for anything unless you have a slave sitting behind your computer and refreshing the chat manually..:P

If I remember well, you use a chat borrowed as-is. Whatever method it uses, either using MySQL or a text file, ASP, PHP or java, there is one thing that is sure: the submit button, results in the text filed being parsed in a string, and then added to a record. So, it is something like this:

-The user writes something in the text field and presses submit.
-The submited text gets into a string and posted in a PHP/ASP page
-The PHP/ASP page send the string to a record and forces the chat to refresh.
-The refresh (and every refresh) results in the PHP/ASP page fetching all the chat lines from the record.

Your interference goes to the PHP/ASP page:

After the string has the value of the text in the text field (for a PHP example: $chat with the value "Hello there!")

AND

before the data is submited into the record,

you must put an IF statement, that checks wether all or part of the string (with substr in PHP if I remember well) is equal to "/who". In that case, instead of submiting it to the record, it creates and submits a MySQL query containing the names of the users that are logged in (with the methodology proposed in the above part of the post).

I hope that any of these helped :D.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 18, 2007 3:33 pm 
Offline

Joined: Tue Apr 10, 2007 11:59 am
Posts: 21
The way I do it is pretty straightforward.

There's a table called "online" with 2 fields -- a playerid and a timestamp.

Every script in the game (including the "is there new chat?" script,) when called, checks to see if the player has been marked online recently -- it stores the timestamp of the last update in the session to allow it to skip needless updates if they're too close to the last one. If not, it tries to update their row with the current timestamp. If that query says it didn't update any rows (because they're not in the table yet) it inserts a row.

A daemon runs on the server that purges entries in the online table older than 30 seconds ago.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 24, 2007 5:27 am 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
Quote:
A daemon runs on the server that purges entries in the online table older than 30 seconds ago


I wander what time interval that daemon uses.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 2:55 am 
Offline
User avatar

Joined: Sat Apr 07, 2007 6:48 pm
Posts: 168
Devant wrote:
I wonder what time interval that daemon uses.


Fix'd. =p

_________________
Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 3:19 pm 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
Quote:
Fix'd. =p


With this, you reminded me one of my biggest mistakes spelling-wise:

I was in Italy for a year, doing studies, and I had problems with pronouncation. Practicaly, I couldn't pronounce the double letters correctly. The result?

Quanti anni hai? (How many years do you have? {the italian expression for "How old are you?"}) being pronounced as...

Quanti ani (How many assholes do you have?)

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 26, 2007 3:52 am 
Offline
User avatar

Joined: Sat Apr 07, 2007 6:48 pm
Posts: 168
Heh, that must have earned you a lot of odd looks.

Oh, and it's spelt "pronunciation".

_________________
Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 26, 2007 9:21 am 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
IcyFreak wrote:
Heh, that must have earned you a lot of odd looks.


Believe me, it was more than that, considering my greek habit of asking anyone I meet his/her age...

IcyFreak wrote:
Oh, and it's spelt "pronunciation".


I managed to pack threee spelling errors in a single word. Quite a feat :P.

Anyway, we went off topic as much as it could be possible..>.> Back to it.

Like... what about making a seperate panel in the gaming tracking who is logged in, irrelevant from the chat's status (open or closed)?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2007 4:16 am 
Offline
User avatar

Joined: Sat Apr 07, 2007 6:48 pm
Posts: 168
What would be the point of such a panel? It'd be way more relevant if buffs were working... :wink:

Anyway. I really do think the /msg feature is important. The last conversation I had which I wanted to be private, we used the messages. The other person in chat was not especially amused (half the lines in chat were "check your messages").

Yeah.

_________________
Have a nice day.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 28, 2007 2:54 am 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
Quote:
What would be the point of such a panel? It'd be way more relevant if buffs were working...


Hey, nice idea there! I give it a postive vote for buffing people via such a panel once buffs are implemented. Relative to what use it might have before buff implementation, it would be very nice to have a list of people logged in for chat purposes.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 28, 2007 1:45 pm 
Offline
Site Admin
User avatar

Joined: Thu Apr 05, 2007 2:04 pm
Posts: 4192
Devant wrote:
Quanti anni hai? (How many years do you have? {the italian expression for "How old are you?"}) being pronounced as...

Quanti ani (How many assholes do you have?)


Spanish has a similarly dangerous concordance between ano and what's pronounced "anyo" but is spelled nearly identically except there's a tilde (~) over the n. (Can't figure out how to type it here.)

In fact, I believe it's this ancient and embarassing mix-up which caused the English to change the word to "year" instead.

In spanish there's another funny mix-up. The phrase "tengo miedo" means I'm afraid (literally I have fear). However, stick an "r" in there and you get "tengo mierdo" which tends to translate as "I have diarreah". Not a mistake you want to make in public.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 29, 2007 6:11 am 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
Quote:
(Can't figure out how to type it here.)


If you install spanish from the control panel, using the winXP, you can type in spanish..:P Κατάλαβες μωρό μου;

Quote:
In fact, I believe it's this ancient and embarassing mix-up which caused the English to change the word to "year" instead.


Around 3500BC, Hellenics (Five thousand years later to be known as Greeks) receive from the Phoinics the frist European alphabet, based on extremely simple words. One of them was "Ρός" (That's how Ross is pronounced in Greek :P) that meant "period". In the begining, it was used to describe a lunar period, and later to describe a solar period. Around 2000BC, a major cultural "update" swept Hellas, resulting in a renovation of the alphabet.

Around that time, the term "period" was divided in the following: Ώρος (hour), Χρόνος (year), Μήνος (month). About that time, the first German tribes thrived and started raiding agricultural nations, like the Hellenic (It must be noted that a this time, there was no sense of Nation, but that of City State. it will be during the Persian wars that the Hellenics will unite) At that time, Germans used the runic alphabet, but not in liaison with speach: their language was farily rich especialy in terms describing weather conditions, wood types and battle orders, but the runic aphabet was focused on describing complex terms with a single character. Terms, that were known only to the sages of the people, most notably, druids and bards (that's the first indication of those words in a culture). One of the runes, described the phrase "From one point of time to another" in short, "period".

Typicaly, hostages were not held from german tribes, but when labor hands were needed, they took slaves. Since druids managed the society, they had direct comunication with them. Some druids took interest in other languages, and how those described different the world (I remember one documentary that displayed one "menir" having a inscription rougly translated as "Children of different gods see different worlds") The hellenic language (and some of the Rus, later to be known as Russia) became part of a druid's knowledge, and fidning the nexus betrween the rune "period" and the word "Ρός" was only natural. The hellenic word's sound, was transalted as "Jeros", and later "Jeran". Many years later, the romans started their culture to Rome, bringing their own language, but lacking an alphabet. The first comunication betwen Romans and otehr cultures, started roughly with both germanic and hellenic people at the same time. Mostly, they either went to war with both of them, or traded, a status changing with each generation of leaders.

Generaly, both Romans, Germans and Helenics, prefered to fight each other than the surounding barbarians (most notably other Balcan people, Turks, and the then native Hispanic people and Gaelics) since they had wisemen among them that could understad the language of the others, and often settle peace agreements, hostage excanges (the first time a term similar to PoW {Prisoner of War} was derived) and eventualy, even temporary peace agreements for both trade and entertainment (common ahtletic events). Critical to this time, is the fact that Romans, adjusted their old Gods to the Hellenic pantheon, while the Germans advanced their mythology a lot, practicaly creating two distinct european religous cutlrues, althought it must be said that each "religion" had influences from the other.

At 700BC, the Roman Empire had under its command all of today's Italy, except Sicily (Belonging to hellenics) and msot of Austria, with the northern Austria being neutral teritory betrween romans and germans (It was mostly dominated by swamps, so nobody wanted to have to do with it. Also, more than thousand years later, when Julius Cesar dominated most of Europe, said the famous phrase "Veni, Vidi, Vinci" {Came, Seen, Conquered} meaning that there was no resistance to defeat, and no value to this land) Sicily, at that time known as "Great Hellas" since it had evolved in an advanced cultural centre, away from the realtively conservative Athenian influence, managed to come to terms with the Roman Empire, stop war, and define true political activity for the better of the two.

The roman empire, based on the greek alhpabet, created the Latin one, based on the prospective of adjusting it to the needs of their language. Their word for "year", was "annus". The initial roman language had the habit of describing most words with double letters inside, while depriving one of the two letters, meant a lesser version or the contrary of the initial word. "Annus", meant year, and "Anus" was the year that the seasonal expectances came eariler, like having heavy rains during spring. "Annus", appart from year, also meant "Clean"...(I hope that this makes sense...;)). Lets jump a thousand years later (the mid time has so much to offer culture-wise, that would make no sense to try to describe even a fragment of it here)... The helelnics are now united under the name Hellas, the first true nation, while the Romans have pushed the Germans, conquering them, and pushing them north, and then west. The Roman Empire now consists of the Majority of Europe, with Latin being the common language, and Hellenic being the language of the "cultured".

Trade and excange of ideas is the norm between Hellenics and Romans, and the last war between them has already lapsed. The germans, now suffering great defeats and those remaining in central europe being forced to adapt to the roman culture, move to the Normandic lands, and together with them, to the then known Albion (the british isles). They easily conquer the primitives there and establish the predeccesors of today's english people.

Since Normands were mostly warriors, but Germans had a mostly complete culture, with a well formed language, and an alhpabet (The runic was already put aside, since the romans forced them to use the Latin) , their society ideals were established to the new land. the german culture with the normandic influence, created in a few years what is known as the "Anglosaxonic". in that mix of cultures, there were many terms from both. Generally, as Anglosaxonic evolved, the Normandic influences were romoved.

As we saw about twenty lines above and about three thousand years ago, the word "period" in german, was "Jeran" and was pronnounced "Yearn". Many words were softened as the language evolved, and the word yearn became Year... It is noteworthy that the first Bible transaltion in English (I do not remember the writer) uses the term "Yearn" in the "Exodus" and the word "Year" in the "Epistolatus" while the King James translation uses in both occasions the term "Year". That's the story of how the word "Year" came to be...

Yes I really enjoyed writing this, and congratulations for those that read it all. And yes, it was not all that necessary to describe the roots of the term "Year"... But heck, as I said, I enjoyed it..u.u

Ross, maybe it would be more apropriate to move the last few posts to the off the wall forum? I think the degeneration to the realm of "off topic" is now complete..:P

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 29, 2007 12:19 pm 
Offline
User avatar

Joined: Sat Apr 28, 2007 4:07 am
Posts: 118
Location: Google's Volcano Fortress
And how do you write such long posts?

OR DID YOU PLAGIARISE?

Dun. Dun. DUHHHHHH!!!!

*Ahem*


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 29, 2007 7:06 pm 
Offline
User avatar

Joined: Sun Apr 08, 2007 5:00 pm
Posts: 265
Location: Thessaloniki - Greece
frost_maze wrote:
And how do you write such long posts?


Believe me, typing and writing are the two ocupations that dominate nine tenths of my life..:P

Quote:
OR DID YOU PLAGIARISE?


I would consider this a severe offense if I was not totaly sure that you are kidding...>.>

Sincerely, I hate plagiarizing so much, that I even device my own forms of saluting people... (I have unnerved more than one of my gf's friends by offering a deep bow instead of a typical shake of hands :lol:)

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 11, 2007 5:01 am 
Offline

Joined: Tue Oct 02, 2007 1:27 am
Posts: 74
Back on the topic of chat, I think it wouldn't need many features to start with. Just a /who check to see who's online, a way of ignoring people, and by the time beta rolls around a way of preventing people from speaking for a specified period of time - might I suggest rather than banning, or perhaps in addition, a muting function: effectively the victim's messages are invisible to everyone but himself.

Of course, I don't expect to see chat improvements until around the night of the 30th, so this may be a little premature.

_________________
out-out the lights-out all! and over each quivering form
the curtain, a funeral pall, comes down with the rush of a storm
and the angels all pallid and wan, uprising unveiling affirm
that the play is the tragedy man, and its hero the Conqueror Worm.


Top
 Profile  
 
 Post subject: :D
PostPosted: Tue Dec 04, 2007 11:09 pm 
Offline

Joined: Sun Dec 02, 2007 1:05 am
Posts: 1
Location: aucland new zealand
hellow!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 04, 2007 11:26 pm 
Offline

Joined: Thu Nov 15, 2007 9:44 pm
Posts: 28
Location: Boston, MA
Garuga, I think you may have been mislead by this thread's title. It's a discussion about the in-game chatroom.

But while I'm here....

Ryme wrote:
Spanish has a similarly dangerous concordance between ano and what's pronounced "anyo" but is spelled nearly identically except there's a tilde (~) over the n. (Can't figure out how to type it here.)


ALT+164

My last name has an ñ in it, so I had to learn that in windows back in 3rd grade.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group