Page 1 of 1

Posted: Tue Oct 08, 2002 3:05 pm
by BackupUser
Restored from previous forum. Originally posted by waffle.

a bit more than 2 cents worth here :)

i'm trying to code a chat loby simular to mirc but with special options....

the problems i'm having can be solved with API or other work arounds and are not important to discuss here. But i would like to export code to other OS so, some things here are best if left to the compiler. These things are :

feature request...
a function "getusername(UID)"
that returns the user name that was used to join a networked game. UID being the value used to refrence a user, could be obtained by UID=ServerEventID() i think thats the one. But all users must be able to call this function, so that if a private chat message is sent from UID1 to UID2 the receiver computer can refrence this UID number to a user name to display in the message from display.

a function "gettime()"
returns multiple types....
string as system clock text HH:MM:SS:AM/PM
long as actual milisecs from system clock

function "SetCurrentTime(HH,MM,SS,AM/PM)"
to set the system clock to current time option

function "GetDate()"
returns multiple types
returns curent date string
returns long julian date (example 2002158) (158 days into year 2002)

i like to use the system timer to time stamp data that is sent on the network. this helps in data recontructions and measuring system performance. Also, if in a game, if the data is old it can be discarded without being used.

also, i liked your examples, but what would look better i think is a chat room demonstration that includes private messages and so on. Your atomic web server shows only one server with one client and if multiple clients should exist, does not show how the clients can chat.
I know its just a simple SendNetworkString(ToUID,"Chat") as a private message and SendNetworkString(0,"Chat") to send to all users. But it would help out new users to understand whats happening.

just my $1.25 :)

Posted: Tue Oct 08, 2002 3:40 pm
by BackupUser
Restored from previous forum. Originally posted by Pupil.

Paul has made a small chat program, you might want to take a look at it. Download it from the PureBasic resource site @ http://www.reelmediaproductions.com/pb/

the program in question is named PBChat and you'll find it under Apps on the site..

Posted: Tue Oct 08, 2002 4:47 pm
by BackupUser
Restored from previous forum. Originally posted by waffle.

wow, cool site, thanks.

wow again!!
that was exactly what i was looking for.
i like how PB code is straight forward like that.
Also, for compatability, we should try to get fred
to include those API calls natively tho :)
nice work.

i was disapointed that PB does not support peer-peer,
but that's not a big issue for my current project as it is
client-server dedicated. So private messages must be routed
through the server, this does create more work on the server,
but if i keep data small (<100 bytes) this should be fine.
also, the server does not require graphics while the client side
will support 3D effects using MD2 models. I'm using PB as a launcher app, ie players meet on my server and set up a game,
then PB launches the game. Thats why obtaining an ISP# is important.
thats also done with an API call. This is then passed as a
commandline to the game application and there you go....

thanks again.

Posted: Mon Oct 14, 2002 5:18 am
by BackupUser
Restored from previous forum. Originally posted by waffle.

wow, fred added all that into 3.4 already
thanks fred coooool