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
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 14th Sep 2006 05:58
I keep getting an Connection with player 1 lost(Timed out) error anyone know why??

The admiral
Uncle Sam
18
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 14th Sep 2006 06:56
Not sure, but I'm guessing maybe the firewall? That was my problem for that error.

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 14th Sep 2006 10:34
But I completly shut down my firewall and it stil does it.

The admiral
Uncle Sam
18
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 14th Sep 2006 23:34
That's odd.

Maybe wrong IP? It changes you know.

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 15th Sep 2006 02:43
Im using the lan though on the same computer so it shouldnt be a problem?? This code worked before now its gone haywire lol.

The admiral
Uncle Sam
18
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 15th Sep 2006 05:02
Lol, can I see?

Uncle Sam
Nvidia Geforce 7600 GS 256MB PCIEx, 2.66 GHZ Pentium 4 proccessor, 768MB RAM
Need particles? Click here!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 15th Sep 2006 12:08
Are there actually any problems apart from that error in the log? If so, show me the logs.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 16th Sep 2006 04:26
I attached the logs see what you can find.

The admiral

Attachments

Login to view attachments
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 16th Sep 2006 16:18
If for some reason you stop calling TSync for about 10 seconds, it can cause the connection to time out. This most commonly happens when people have long loading sequences in their games. Do you think that could be what's happening? Either way, put TSetDebugMode 255 before THost/TJoin and run the host and client again, and show me the resulting logs.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 17th Sep 2006 04:54
Ah the tsync thing seemed to be the problem thanks for that.

The admiral
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 1st Oct 2006 14:03
Hmm.. i have question is the TGETGAMELIST, TGetGameAmount(), TREGISTERGAME only for lan? or can they used in network? Because i dont have compututer what use an server so..

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 1st Oct 2006 16:08
So far they only work on a LAN, however I will soon add internet functionality, probably with the next release.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
TobiasWK
18
Years of Service
User Offline
Joined: 4th Sep 2005
Location: Denmark
Posted: 1st Oct 2006 19:04
I am having the same problem with timeouts... how can this problem be solved?


Need a place for your images? Try uploadimago.net
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 1st Oct 2006 20:44
Well it depends what's causing it. Are you calling TSync every frame? If not, that's what's causing it.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
TobiasWK
18
Years of Service
User Offline
Joined: 4th Sep 2005
Location: Denmark
Posted: 1st Oct 2006 21:11
I should be calling TSync every frame... but the problem is that I load some heavy stuff at the start.


Need a place for your images? Try uploadimago.net
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 1st Oct 2006 21:27
Then initiate the connection after loading, if possible.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 2nd Oct 2006 17:32
OK thanks benjaming im waiting for that then.. Then i can finally release Open SOurce FPS engine beta.. Lot of cool things in that .. I see you know lot of network.. Well anyways thank you!

Jay Bee
17
Years of Service
User Offline
Joined: 15th Jul 2006
Location: Ashford, Kent, England
Posted: 2nd Oct 2006 23:04
I'm making a multiplayer game at the moment, which is better at coping with firewalls/routers: Tempest, or the built in multiplayer stuff in the DBP language?

cheers
-J

Your signature has been erased by a mod - 404kb is a little large, don't you think? Nope not really, but heh, ur the boss
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 3rd Oct 2006 02:31
Quote: "I'm making a multiplayer game at the moment, which is better at coping with firewalls/routers: Tempest, or the built in multiplayer stuff in the DBP language?"

Well the built in commands are harder to set up routers for, due to having to find the list of used ports in the currently used version of DirectPlay. Tempest's only advantage over DirectPlay in this respect is that it only uses a single port, and you can choose the port(or a range of ports). However, the next release should be capable of working over most NAT routers without the need to configure anything.

Quote: "I see you know lot of network.."

Well, a bit.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Jay Bee
17
Years of Service
User Offline
Joined: 15th Jul 2006
Location: Ashford, Kent, England
Posted: 3rd Oct 2006 04:05
Ok thanks muchly, I'll stay tuned

Your signature has been erased by a mod - 404kb is a little large, don't you think? Nope not really, but heh, ur the boss
TobiasWK
18
Years of Service
User Offline
Joined: 4th Sep 2005
Location: Denmark
Posted: 3rd Oct 2006 10:29
I am waiting for the next release with excitement! your doing a wonderfull job.


Any possible way you could give an example of how to make a simple chat function? because I cant figure out how do it.
Im using barnskis winsock dll for chat at the moment, but the dll is not working right now, it would be nice to handle everything through Tempest.


Need a place for your images? Try uploadimago.net
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 3rd Oct 2006 10:50
youll need to send a string and recive the string with tempest..
so you can get each player messages then just print/text them in screen..

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 3rd Oct 2006 10:55
Quote: "Any possible way you could give an example of how to make a simple chat function?"

I've already explained this previously for you on this thread (for me it's page 4, but I have slightly different page settings), so go back and find it. Here's a summary of what you have to do anyway:

1. Create a global variable to hold the text currently being entered, and create one for setting when the return key is pressed(so that you can detect when it's been pressed for the first time, or if the user has just held it since the last frame).

2. Process the input once a frame. This involves getting entry data from entry$ and appending it to the global text variable. Also, you need to check for backspaces in the string so that you can delete characters accordingly.

3. (a) Display the text to the screen by outputting the text variable.

3. (b) When the return key is pressed, put the text string in a message using TPutString and send it. Clear the text variable.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
TobiasWK
18
Years of Service
User Offline
Joined: 4th Sep 2005
Location: Denmark
Posted: 5th Oct 2006 00:08 Edited at: 5th Oct 2006 14:12
I see now... never realised you gave an answer, sorry about that.
I got it working now... I thank you once again Benjamin! Great work.

Keep it up

EDIT:
Just wanted to show a little sneak-preview from my new online fps game using the tempest dll!



Need a place for your images? Try uploadimago.net
temuchan
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 25th Oct 2006 22:53 Edited at: 25th Oct 2006 22:56
Hey there benjamin. I finaly got all my router problems fixed and the example game works between me and my friend.

I built a world with world maker. I didnt put any objects in, just some fog, a sky, and some hills.

I then merged it into your example program and changed some of your code.

I run the program twice. I choose host on the first one and client on the second. I have them both connect to 127.0.0.1

They both come up fine, but i cant see the other person in either one.

here is the source code, all of your functions are at the very bottom.



here is a screenshot of whats happening. the cubes are in the same corner, looking at the same spot, but they cant see each other. the picture may take a little bit to load.



here are the logs:

host log:


and here is the client log:


Thats everything i could think of, if you need anymore information just let me know.

Thanks
temuchan
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 26th Oct 2006 03:01
I tried to tack this on to the end of my post, but it said i didnt have enough room and my message was too long.


I have attached the host log with TSetDebugMode 255 turned on

Attachments

Login to view attachments
temuchan
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 26th Oct 2006 03:03
And i couldnt find a better way to do this.

Since i can only attach one file per post, i attached the client log to this one. Again this client log has TSetDebugMode turned on.

Attachments

Login to view attachments
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 26th Oct 2006 09:14
Dont use bitmaps online you need to use jpegs

The admiral
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 26th Oct 2006 09:34 Edited at: 26th Oct 2006 09:35
I think the problem is that in HandleNetwork() when it sets the position of the other players, it uses the player number for the object number, which I don't think you've noticed. Of course, you have no warning of this because the code checks for the object's existence before it sets its new position, so try taking out that check and see if you get an error. If so, it means the object number you have used for the other player doesn't correspond with their actual global ID.

I think the errors in the first host log are just because at one point while testing, you closed the client application rather than disconnecting properly (in this case, the error is completely normal).

Quote: "Just wanted to show a little sneak-preview from my new online fps game using the tempest dll!"

Wow, it looks really nice!

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
temuchan
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 26th Oct 2006 18:10 Edited at: 27th Oct 2006 16:19
Ok. In the receive part of HandelNetwork(), I changed it from this:

to this:


When i ran it this time, as soon as the client logged on it said "error object does not exist at line 288". But at the top of the receive part i put: from = TGetSender()

I was looking at the logs, and from my understanding, both host and client are sending fine, but neither are receiving anything. If neither are receiving anything, that would be why the object from doesn't exist.

any ideas?


edit: I think my code is right, its just that the computers cant recieve the data. I thought this might be a router/firewall problem, but it cant be because on a different game i made using tempest me and my friend could play and see each other, meaning ive port forwarded everything correctly.
MageNoir
17
Years of Service
User Offline
Joined: 16th Jul 2006
Location: France - Nord
Posted: 27th Oct 2006 20:09
Salut benjamin!

Je suis francais, et tu parle francais je pense, alors inutile de te parler en anglais, j'y comprend rien lol
Bref, voilà j'ai tester les exemple en local '127.0.0.1' et donc je fais le host, ensuite 1 client, et quand je veut faitre un 2e client, il me met "Failed to join game"

Pourquoi et comment y remedier ?
Merci

*=*=* MageNoir *=*=*
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Oct 2006 00:18 Edited at: 29th Oct 2006 00:20
Quote: "If neither are receiving anything, that would be why the object from doesn't exist."

Actually, it wouldn't indicate that the object doesn't exist if neither were receiving anything, because it wouldn't be trying to process the messages.

My guess is that objects 1 and/or 2 don't exist. For a game with one client, 1 is the host, and 2 is the client. Therefore, TGetSender is returning either 1 or 2, depending on who calls it.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 29th Oct 2006 10:17
Hope the new version is coming soon Keep it up benjamin.. You add virtual lan network some time? Just like in hamachi.. you can google it if you dont know..

MageNoir
17
Years of Service
User Offline
Joined: 16th Jul 2006
Location: France - Nord
Posted: 29th Oct 2006 11:16
Hello!

Cannot join - Game already in session
Why ?

*=*=* MageNoir *=*=*
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Oct 2006 20:19 Edited at: 29th Oct 2006 20:22
Parfois on trouve cette erreur quand on essaye de connecter lorsque on est déjà connecté. Peut-être c'est ça?

Quote: "Hope the new version is coming soon"

I hope so too.

Quote: "You add virtual lan network some time? Just like in hamachi.."

I'm not sure what you mean. I've used Hamachi before, and I'm pretty sure Tempest can operate over it.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
MageNoir
17
Years of Service
User Offline
Joined: 16th Jul 2006
Location: France - Nord
Posted: 29th Oct 2006 22:34
Le probleme c'est que personne peut se connecter, je lance le host, je demande a des amis de se conecter, l'erreur aparait:
Cannot join - Game already in session


Pareil en local...
C'est etrange, car 1 jour avant je n'avais pas le probleme

*=*=* MageNoir *=*=*
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Oct 2006 07:08 Edited at: 30th Oct 2006 07:09
Tu peux m'envoyer les fichiers "Tempest Log - Host.txt" et "Tempest Log - Client.txt" s'il te plait?

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
MageNoir
17
Years of Service
User Offline
Joined: 16th Jul 2006
Location: France - Nord
Posted: 30th Oct 2006 11:29
Tiens:
http://magenoir.free.fr/Tempest%20Logs.zip



Merci

*=*=* MageNoir *=*=*
temuchan
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 30th Oct 2006 12:46
I'm sorry but could you explain what you mean? I dont really get it.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Oct 2006 13:19
MageNoir, la cause du problème est que tu essayes de se connecter deux fois (la deuxième fois t'es déjà connecté).

Quote: "I'm sorry but could you explain what you mean? I dont really get it."

In HandleNetwork(), you try to move the other player objects in this piece of code:



The problem is that at the time, this object may not exist. Therefore, you need to adjust your code so it moves the objects that do exist.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
temuchan
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location:
Posted: 31st Oct 2006 01:35 Edited at: 31st Oct 2006 01:36
Here, maybe this will help explain what i am asking.




For the object name i am using TGetSender(), so it has to be the right object! how could it not exist !?
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 31st Oct 2006 06:38
Quote: "For the object name i am using TGetSender(), so it has to be the right object! how could it not exist !?"

Because you haven't created the object.

Put it this way, for the host and client you are creating their own object (with the number of OURID), but not the object that represents the other player, which is object number 2.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Stupify
17
Years of Service
User Offline
Joined: 28th Oct 2006
Location:
Posted: 5th Nov 2006 08:58
Benjamin, this is simply awesome! Very nice job...

I have a few questions that i couldn't find answers to.

1) Is there a way to get the current amount of players joined in the game? I would like to display the max players vs the joined players on a lobby type screen.

2) If the host DC's or quits does it transfer the hosting to another player or does this need to be done manually? If it has to be done manually how would i go amout doing it?

3) For the "TGetGameAmount" command set, what does the dataType 3 (Time Left) actually do? It doesn't seem to count down. Although maybe I'm not doing something wrong. Also, the Host player doesn't seem to be able to access any of this data with the command set. Is that intentional?

Quote: "If you want to connect a game over the internet, then things are a bit more tricky. What you need to do is have a lobby server, where players can choose a game to join without having to handle any IP addresses. Tempest will eventually have support for this.."
Just curious as what kind of timeline this will take? Not trying to rush you or be pushy. This is something I'm really looking forward to and am just curious...

Once again, great job! I thank you in advance for any help that you can offer.
Jay Bee
17
Years of Service
User Offline
Joined: 15th Jul 2006
Location: Ashford, Kent, England
Posted: 6th Nov 2006 16:36
I was wondering, if I read an integer or boolean into a string, will it get an error or will it just convert it to a string?
cheers
-JB

Your signature has been erased by a mod - 404kb is a little large, don't you think? Nope not really, but heh, ur the boss
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 7th Nov 2006 02:21
Quote: "Benjamin, this is simply awesome! Very nice job..."

Thanks, I'm glad you like it.

Quote: "1) Is there a way to get the current amount of players joined in the game? I would like to display the max players vs the joined players on a lobby type screen."

There is no command for it, you'll have to use a loop to count all the players that are connected.

Quote: "2) If the host DC's or quits does it transfer the hosting to another player or does this need to be done manually? If it has to be done manually how would i go amout doing it?"

It doesn't transfer it to another player, but it sounds like a good feature for a future version of Tempest. Manually it could be done, but it's tricky.

Firstly you would want to stick to a client/server method rather than having the players communicate directly with each other, otherwise things would be very complicated and probably not so reliable.

To decide who the hosting gets transferred to you could either have the host application choose (randomly or based on stats of some sort), or you could make a system where clients connect to the next IP address that matches a certain pattern or sequence. Either way, the clients all have to have the IP address(es) stored so that when the server goes down, they all attempt to connect to it/them. Also, the new host will have to know that it should be hosting.

Quote: "3) For the "TGetGameAmount" command set, what does the dataType 3 (Time Left) actually do? It doesn't seem to count down. Although maybe I'm not doing something wrong. Also, the Host player doesn't seem to be able to access any of this data with the command set. Is that intentional?"

I coded it to be like that, but I realise that this may not be a good idea. I will change it in the next release.

Quote: "Just curious as what kind of timeline this will take?"

I'm not sure, I could possibly have it done by the end of the month, though there is a lot of stuff I want to add to Tempest.

Quote: "I was wondering, if I read an integer or boolean into a string, will it get an error or will it just convert it to a string?"

If you mean trying to read a string from a message when you should be reading an integer then no: it won't give an error, but it also won't convert it. Make sure you don't get data types mixed up, as it will cause bugs in your game.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Stupify
17
Years of Service
User Offline
Joined: 28th Oct 2006
Location:
Posted: 7th Nov 2006 03:09
Benjamin, thanks for taking the time to answer my questions. It's much appreciated.

Got a few more...

Quote: "There is no command for it, you'll have to use a loop to count all the players that are connected."
Correct me if I'm wrong, but you could only do that if you were in the actual game. If I wanted to try and display the number of players currently in the game on a lobby screen, I really wouldn't have access to that data until they joined, correct? Unless maybe I would use the server method...

Any examples of a server version?

Thanks again, and keep up the great work!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 7th Nov 2006 11:21 Edited at: 7th Nov 2006 11:22
Quote: "Correct me if I'm wrong, but you could only do that if you were in the actual game."

Ah sorry, I didn't read the question properly. I'm planning to add more data to games, so eventually this is all the data that will be obtainable: game name, game type, current map name, time remaining, current players, maximum players. I'll add other types of data if people request it, although I'm adding an extra parameter for other data that people can use for whatever they want, so it may not be necessary.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Jay Bee
17
Years of Service
User Offline
Joined: 15th Jul 2006
Location: Ashford, Kent, England
Posted: 15th Nov 2006 21:16 Edited at: 15th Nov 2006 23:02
I was wondering, is it much faster to send for example, 6 strings in one packet, or 6 one string packets?

EDIT: One other thing, I cant get the Lan thing to work when I'm running multiple instances of the program, like it won't pick up the games I'm hosting. It didn't work on hamachi either. Is this all normal? Or is my computer being a b***ard?

Your signature has been erased by a mod - 404kb is a little large, don't you think? Nope not really, but heh, ur the boss
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 16th Nov 2006 10:06
Quote: "I was wondering, is it much faster to send for example, 6 strings in one packet, or 6 one string packets?"

6 strings in one packet. It's always better to send as much as possible in one packet, than to send loads of smaller packets.

Quote: "One other thing, I cant get the Lan thing to work when I'm running multiple instances of the program, like it won't pick up the games I'm hosting."

First, make sure the game actually registered itself(check the host log for this).

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Jay Bee
17
Years of Service
User Offline
Joined: 15th Jul 2006
Location: Ashford, Kent, England
Posted: 17th Nov 2006 01:43
Hmm I checked the logs but they said the game was successfully registered...

Your signature has been erased by a mod - 404kb is a little large, don't you think? Nope not really, but heh, ur the boss

Login to post a reply

Server time is: 2024-04-19 04:58:36
Your offset time is: 2024-04-19 04:58:36