Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Tempest - A peer-to-peer UDP multiplayer plugin - Free release

Author
Message
Sven B
17
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 7th Apr 2007 09:54 Edited at: 7th Apr 2007 09:56
Mhm, that can't be it...

Each message contains 2 bytes:
1st is the type
1, 2, 3, 4
2nd the rest of the information. Which doesn't need more than a byte...
So, there aren't any other types used than bytes.

I don't really understand the message system actually.
If you put a byte and again a byte, and the opponent or the other player reads only 1 byte.
What happens to the other byte? Does it get "lost" when you try receiving new data using TGetMessage()? Or is it like a queue and is the second byte next time the first byte in row?

Thx for trying to help!

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 7th Apr 2007 10:18
Quote: "Does it get "lost" when you try receiving new data using TGetMessage()"

Yes.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Sven B
17
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 7th Apr 2007 15:13 Edited at: 7th Apr 2007 16:33
Ok thx!!!

The unknown errors seem to have disappeared with the new testers, so I guess I solved it whithout knowing, or it's a windows related matter.

Great stuff man!
Thx again...

[edit] Is there any chance you can expand this plugin to more than 64 players maximum?

[edit2] Nevermind. My game doesn't need fast connection speed, since it's only a puzzle game.
I just started converting to multisync. Too bad I have to completely rewrite the whole code...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 7th Apr 2007 18:10
You want more than 64 players in a puzzle game? Just what kind of a puzzle game is this?

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Zerk
16
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 9th Apr 2007 00:08
Feature Request:

TPutDWord
TGetDWord()

WORD Range : 0 to 65535
DWORD Range : 0 to 4,294,967,295


Thanks and keep up the good work!

I am putting myself to the fullest possible use, which is all I think that any conscious entity can ever hope to do. ~Hal-9000
SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 9th Apr 2007 00:58
Hi Ben,

I did a test with a few people a while ago, and unfortunatly my program crashed with an error report. Strangly, whenever I try to replicate the problem with loopback, it never seems to happen. Is it possible that the game could crash with an error becuase of routers or firewalls?


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!
Zerk
16
Years of Service
User Offline
Joined: 13th May 2006
Location: Orbiting Jupiter
Posted: 9th Apr 2007 01:18
SageTech,

Don't know if this is the case, but the majority of my crashes come from empty strings such as no game name, no map name or no player name. Also seems to happen on a TGetString() if its empty.

I am putting myself to the fullest possible use, which is all I think that any conscious entity can ever hope to do. ~Hal-9000
SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 9th Apr 2007 02:30
Zerk, that couldnt be the case, I check the length of a string and make sure its not empty before sending.


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!
Xenocythe
17
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 9th Apr 2007 02:46
SagaTech,
The game crashed when I clicked the mousebutton to shoot. It might have been a coincidence, it might have not. Maybe you should look into that

SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 9th Apr 2007 07:42
@Xenocythe Thanks, think I got it mate

@Benjamin

I was woundering, if the host of a game happend to leave, would the game be terminated for everyone else, or would it go on with a new host?


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!
Sven B
17
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 9th Apr 2007 11:02
Quote: "You want more than 64 players in a puzzle game? Just what kind of a puzzle game is this?"


Hehe, no, but the lobby should be able to contain more than 64 players...

But honestly, the idea of a puzzlegame with more than 64 people interests me

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Apr 2007 11:10 Edited at: 9th Apr 2007 11:10
Quote: "Zerk, that couldnt be the case, I check the length of a string and make sure its not empty before sending."

So what do you do if it's empty?

Quote: "I was woundering, if the host of a game happend to leave, would the game be terminated for everyone else, or would it go on with a new host?"

It would be terminated for everyone else.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 9th Apr 2007 14:27
Quote: "So what do you do if it's empty?"


I dont send it

Quote: "It would be terminated for everyone else."


Is it at all possible that would be changed in a future release?


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Apr 2007 15:00
Quote: "I dont send it"

I assume you have a mechanism to not try to read the string from the other end then? Otherwise it'll try reading a string and end up reading the next piece of data because it doesn't exist. This is enough to cause a crash.

Quote: "Is it at all possible that would be changed in a future release?"

Possibly.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 9th Apr 2007 22:53
Quote: "I assume you have a mechanism to not try to read the string from the other end then? Otherwise it'll try reading a string and end up reading the next piece of data because it doesn't exist. This is enough to cause a crash."


Not sure what your saying there, care to clear it up a bit?

Also, can problems arise when I send two messages or more before tsync is called?


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Apr 2007 22:59
Quote: "Not sure what your saying there, care to clear it up a bit?"


Imagine person A sends a message to person B containing a name, and age, using this code:



Person B then reads the data like this:



If name$ was blank when person A sent the message, the message will only contain a byte (age). Person B will try to read a string but it'll think that age is part of the string and try reading a string from that point.

Quote: "Also, can problems arise when I send two messages or more before tsync is called?"

I don't think so.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 10th Apr 2007 00:15
Ah, I don't think thats the problem though, because the chat packet is a completely separate one from everything else, and I make sure its not blank before sending it. Also, the only thing in it is a string.


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 10th Apr 2007 11:23
Quote: "and I make sure its not blank before sending it."

I assume you mean you don't send the packet at all if the string is blank?

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Super Nova
17
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Earth
Posted: 10th Apr 2007 16:39 Edited at: 10th Apr 2007 17:00
Ben, I love your work, but I have a question. While working with this plugin quite extensively since its release I have come to realize that when I put a reliability flag of 1 on SendAll it still doesn't always arrive at other players. Now I have no clue how your plugin works, so explaining how the command works would do me little, but I just wanted to hear from you possible causes as to why this might occur. I have already made a work around to my specific issue but would just like to know. Thx for your great contribution to this community.

Edit: I haven't done alot of testing over the internet so this may only be an issue over loop-back address 127.0.0.1 while running multiple instances of the game on one computer.

Justin Cannizzaro
SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 10th Apr 2007 22:49
Quote: "I assume you mean you don't send the packet at all if the string is blank?"


Yup, only time its sent is when it is not empty and its been submitted by the player.


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 11th Apr 2007 13:54 Edited at: 11th Apr 2007 13:55
Quote: "Now I have no clue how your plugin works, so explaining how the command works would do me little, but I just wanted to hear from you possible causes as to why this might occur."

I'm am not sure why that might occur. When a reliable data packet is sent out, it expects a receipt from the receiver. If no receipt is received in a set time the data is retransmitted. What's your workaround anyway?

Quote: "Yup, only time its sent is when it is not empty and its been submitted by the player."

Oh ok. I can't really guess what would be causing any crashes then.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Super Nova
17
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Earth
Posted: 11th Apr 2007 15:32 Edited at: 11th Apr 2007 15:36
Quote: "What's your workaround anyway?"


Well while making a system to handle weapons in my game, I made the system put a reliability flag of 1 when ever you picked up a weapon to ensure that everyone else knew what weapon you had just picked up, then "glue" the appropriate weapon to your character. Now if a character missed that packet of what weapon you picked up theres no error initially, but when you drop that weapon, the others would error out because they thought you had no weapon in the first place. So a simple fix was to just put an if object exist(weapon) in the code when other players drop or pick up a weapon. Simple fix, and it can cause glitches, but I'll deal with that later, im more concerned with actual errors.

Edit: already addressed

Justin Cannizzaro
Smilodon
15
Years of Service
User Offline
Joined: 25th Nov 2006
Location: Germany
Posted: 14th Apr 2007 02:37
Hi Benjamin, I finally read all nine pages but one question isn't answered.

Will i get problems if my UDP packets get fragmented?
I have read some dokuments an found these limits for datapackets. I calculated, that I can have round 1750 Bytes of data to send per packet.
Quote: " 1500 Bytes im Ethernet
- 28 Bytes UDP + IP header
- 8 Bytes PPP Header
-------
1464 Bytes Userdata"
SageTech
17
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 15th Apr 2007 03:59
Hi Ben, Ive run into a bit of a problem, it seems that I can host a game just fine the first time around, but when I terminate the first session using tdisconnect and try to host again, its unsuccessful. Attached is the host log for the second time around. If you can help, It would be much apreiciated as this is a HUGE show stopper.


Battle Legacy: Online Third Person Shooter
Look for it on the WIP Board!

Attachments

Login to view attachments
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 15th Apr 2007 14:00
Quote: "Will i get problems if my UDP packets get fragmented?"

Possibly. Tempest doesn't handle that automatically, the network does, and due to the nature of UDP it's not exactly reliable.

Quote: "Hi Ben, Ive run into a bit of a problem, it seems that I can host a game just fine the first time around, but when I terminate the first session using tdisconnect and try to host again, its unsuccessful."

I'll look into it.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
DL187
17
Years of Service
User Offline
Joined: 14th Nov 2004
Location:
Posted: 8th Jun 2007 17:34
Hey Benjamin,

Sorry to be a pest, Im not sure how often you check your email so im going to post it here.

As you may or may not have known Im building a first person shooter using your plugin Tempest. Im pretty much done code wise using tempest but as I have pointed out before there is that problem with routers having to forward their ports. I was wondering if there was any option(s) you could add to the plugin that would fix that problem. Since this is really important to me I am willing to pay for these fixes. I love the plugin, I just hope there are some options that you could add in to help make my life easier.

Thanks
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Jun 2007 02:04
There is a technique that can set up connections between two peers using a third party server, and I may add it to Tempest some time in the future. I can't do so at this point in time due to being extremely busy with other things.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
The admiral
19
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 28th Jul 2007 03:10
Hey is there any chance you could add the ability to send and recieve memblocks??

The admiral
Mr Bigger
17
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 2nd Oct 2007 05:48
I`ve been working on a not quite ready for primetime melee game using the Tempest plug-in and i have a few questions.

How do you clear the message buffer from the TGetMessage command without TGet`ing all the values one at a time until empty?

I want to be able to update new clients with gamestate data when they join a game already in progress.The normal packets would not contain this data so a different packet type would need to go out
to the newcomer.The question is, would a header value at the beginning of every packet be the only solution to distinguish between the two packet types?

This leeds to the last question of how would i ignore the normal game packet traffic that are sent with TSendall and just get the gamestate packet meant for the newcomer.

I would appreciate any suggestions you can offer.


AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Oct 2007 10:06
Quote: "How do you clear the message buffer from the TGetMessage command without TGet`ing all the values one at a time until empty?"

You can't, nor should it be necessary to. When you use TGetMessage the contents of the message is automatically cleared before you read the new one.

Quote: "The question is, would a header value at the beginning of every packet be the only solution to distinguish between the two packet types?"

Use message IDs (TSetMessageID / TGetMessageID).

Quote: "This leeds to the last question of how would i ignore the normal game packet traffic that are sent with TSendall and just get the gamestate packet meant for the newcomer"

The only thing I can think of here is to either use message IDs or put a flag at the start of each message.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)
Mr Bigger
17
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 2nd Oct 2007 19:35
I got it working properly using message IDs.
The automatic clearing with the TGetmessage is good news.

Thank you Benjamin.


AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
Mr Bigger
17
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 4th Oct 2007 05:56 Edited at: 5th Oct 2007 01:33
I run into a new problem.If i try to join a game and fail,I can`t then go back and host.Host log says port already in use yet i use different ports for each.

[Edit]
Ok i'm willing to conceed defeat on this.I've tried everything i could think of.I think it is something internal with Tempest that is stopping the reuse of TJoin as mentioned by others.

Nevertherless Tempest is excellent and my compliments to Benjamin on an outstanding plugin.I am going to continue to work with it as i don't consider this problem a show stopper.I just restart the application after a failed join and all is well.


AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b
Benjamin
19
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th Nov 2007 04:55 Edited at: 5th Nov 2007 06:53
Sorry about the late response, somehow I managed to miss your post. I haven't worked on Tempest in ages so I'm not sure if the source I have differs from the latest build, but I've tried coding a fix for the problem you mention. See the attached file.

Thank you for your kind comments.

Quote: "Hey is there any chance you could add the ability to send and recieve memblocks??"

I could do, but I probably won't as it can be done manually anyway.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)

Attachments

Login to view attachments
Mr Bigger
17
Years of Service
User Offline
Joined: 31st Jan 2005
Location: was here!
Posted: 6th Nov 2007 01:01 Edited at: 24th Nov 2007 18:01
I should have stated earlier that i was using version 1.1.2 from 5.8.2006.
I tried the fixed dll but it causes windows 2KP to close the application with a non-descript error after 1 minute.

I`ve attached logs below.

Thank you for having spent the time to look into this,it is much appreciated.

[Edit]I recently discovered that the inabilility to join after the first failure to join only happens when hosting a loopback on 0.0.0.0.

This is no big deal as its only used for development testing and can be circumvented by hosting on the actual lan ip.

No real need for a fix.


AMD 2600+/1GB ram/GeForce 6600oc 256MB/W2KPro/DBPro 6.6.b

Attachments

Login to view attachments

Login to post a reply

Server time is: 2022-06-30 20:06:53
Your offset time is: 2022-06-30 20:06:53