Mail Archives: djgpp/1998/03/31/10:17:39
In <m0yK1i6-000S2qC AT inti DOT gov DOT ar> "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar> writes:
>jaster32 AT hotmail DOT com (Jaster) wrote:
>> On Sat, 28 Mar 1998 04:39:13 -0600, Roscoe Rush
>> <chesterrr AT worldnet DOT att DOT net> wrote:
>>
>>
>> >blakesteel AT hotmail DOT com
>>
>> Thanks so much.. I was having problem with the strings overlapping
>> when I used the Pop_Packet(); ..
>>
>> for instance the first time I popped it it would be "Hello how are
>> you?" and if the next message I popped was "Fine" it would turn into
>> "Fineo how are you?" So you can see the problem I'm having. The only
>> other problem I have now is sending ints. Like the postion of the
>> player. I can see a way to do it if the ints are less than 255, but
>> if the players position is like (356,300) it would be a little
>> difficult. Have you found a way to do that? I'm sure DOOM must have to
>> send player position updates perodically. Sending them as strings
>> doesn't make much sense to me. But I have got the chat section
>> working so far.. Thank you =)
>Perhaps strings doesn't look good to you, but all the message system in Quake
>is based on strings. Quake doesn't use a code to say "here is a coordinate" but
>an string, it looks slow? yes, but doesn't affect the general performance.
I seems that you do not clear your buffer or use an end of message
code which you can convert into a string end character.
Strings work fine for all types of data, you just have to
encode/decode your stuff. You can simply use sprintf with fixed length
parameters.
It works well in our game, Titans of Steel, which uses jonipx as basic
network functions. ( http://www.informatik.uni-kiel.de/~hbs/tos.html )
Henrik
Vicious Byte
--
Henrik Schmidt Christian-Albrechts-Universitaet zu Kiel
Institut fuer Informatik +49 (431) 5604 - 81 Fax or 75 Phone
Preusserstr. 1-9 http://www.informatik.uni-kiel.de/~hbs/
24105 Kiel, Germany email: hbs AT informatik DOT uni-kiel DOT de
- Raw text -