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 / Multisync 0.1 - Multiplayer plugin for DarkBASIC Professional

Author
Message
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 6th Mar 2005 21:07
Oh ok I didn't see that.. I await your online-ness


"Lets migrate like bricks" - Me
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 9th Mar 2005 05:01
Sounds great, can't wait to see what it does I need to know one thing first What is the "Local IP"?



I tried it with my ip for www.whatismyip.com (or something like that) and it said "Failed"
dj chainz
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 9th Mar 2005 05:52
It should work like that. Anyhow, try it first using the loopback address - without the internet. Enter 127.0.0.1 on the host, then run the client and enter the same. They will link.

I am the lead programmer at red spark studios
I also have a blog on how to make a game enginehttp://dbgame.blogspot.com
http://www.brazilianhotties.tk
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Mar 2005 07:27 Edited at: 9th Mar 2005 07:30
The local IP is basically your IP. Oh and yeah, do as dj chainz suggested, it should work unless theres something wrong with your computer. Also instead of typing 127.0.0.1 which can be a pain just type loop as the ip and it'll automatically use the loopback address.


"Lets migrate like bricks" - Me
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 10th Mar 2005 01:24
Thanks!
Turoid
20
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 11th Mar 2005 05:30
you can find it also like this:

start > run > cmd.exe

type in: ipconfig


now you should see your local ip adress


[B]changed my old name "jopie dopie" to my real name[/B]
dj chainz
19
Years of Service
User Offline
Joined: 25th Sep 2004
Location: England
Posted: 12th Mar 2005 01:51
Hey benjamin, make someway in the plugin to find out your own IP address for hosting - using the loopback address won't allow someone from outside to connect, so you need you internet IP - surely there must be an API call or something that allows the program to find out the IP address.

I am the lead programmer at red spark studios
http://www.brazilianhotties.tk
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 12th Mar 2005 03:05
I'm thinking about that at the moment. I'm not sure what the best way to do it would be, but I'm sure it won't be too hard.


"Lets migrate like bricks" - Me
izaboo
19
Years of Service
User Offline
Joined: 29th Jan 2005
Location:
Posted: 27th Mar 2005 07:03
I can not get the puglin to work but non of my puglins work...

I do own darkbasic pro and it is registered...
Chris Nottm
19
Years of Service
User Offline
Joined: 27th Mar 2005
Location: Nottingham, England
Posted: 28th Mar 2005 03:13
Im getting this error, and none of the commands will work. Im obviously doin somethin really simple wrong, but what is it?

Command in DLL command-table unrecognised (NET HOST%LS%-Z8net_hostiPc%MaxPlayers, IP$)

Please help me
Yian
20
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 29th Mar 2005 03:24
ok Benjamin I have a question in the 2 player example ,for the client,you send player coordinates twice.Is this a mistake or is it to ensure it is sent well?

It's Mr.Yian to you.
Yian
20
Years of Service
User Offline
Joined: 16th Jun 2003
Location: Nicosia, Cyprus(the Greek half)
Posted: 29th Mar 2005 03:42
about finding the ip :


It's Mr.Yian to you.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Mar 2005 05:15
Quote: " I can not get the puglin to work but non of my puglins work...

I do own darkbasic pro and it is registered..."

Have you put it in the plugins-user directory? What exactly do you mean it doesn't work?

Quote: "ok Benjamin I have a question in the 2 player example ,for the client,you send player coordinates twice.Is this a mistake or is it to ensure it is sent well?"

Oops! I did that when I was testing something, and forgot to change it back. Thanks for telling me.

Quote: " Im getting this error, and none of the commands will work. Im obviously doin somethin really simple wrong, but what is it?"

Not entirely sure what the problem could be. What code were you trying to run? Also, what patch are you using?


"Lets migrate like bricks" - Me
Chris Nottm
19
Years of Service
User Offline
Joined: 27th Mar 2005
Location: Nottingham, England
Posted: 29th Mar 2005 20:15
Quote: "" Im getting this error, and none of the commands will work. Im obviously doin somethin really simple wrong, but what is it?" "


I've fixed this now - i registered my dbpro and got the newest version and the commands work fine now, except for i have one problem - i can use the ip loop to test the games with myself, but i sent the cubes example to my friend, and he couldnt join me and i couldnt join him, although hosting was fine. Should i try using a different port using the net set port command? I dont know much about them, but are there any which may work better?
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 29th Mar 2005 20:37
Ok I'm not sure whats going on, because I received an e-mail about an edited post, yet its not appearing here.

Quote: "i can use the ip loop to
test the games with myself, but i sent the cubes example to my friend, and he couldnt join me and i couldnt join him, although hosting was fine"

The loopback address only works when you are hosting and joining on the same computer, otherwise you need to get your internet ip. You can retrieve your internet ip through ipconfig or you can go to this site: http://www.whatsmyip.net


"Lets migrate like bricks" - Me
The Real 87
20
Years of Service
User Offline
Joined: 3rd Mar 2004
Location: somewhere between 86 and 88
Posted: 30th Mar 2005 14:28
ok this may be stupid but I have neer worked with an outside DLL before. what am I doing wrong?

load dll "multisync.dll", 1
call dll 1, host net 10,"loop"
do
loop

http://87.savefile.com
87 Productions is the shizz.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Mar 2005 23:14
Well, because the DLL contains string tables you don't need to use call dll, you can do it like this:



Of course, you'll need to put the DLL in the plugins-user directory in order for that to work.


"Lets migrate like bricks" - Me
The Real 87
20
Years of Service
User Offline
Joined: 3rd Mar 2004
Location: somewhere between 86 and 88
Posted: 31st Mar 2005 06:56
Are the player numbers changed as players join and leave the server. I mean if there are 5 players conected will they always be players 1-5, or can they be like players 3, 6, 7, 8, and 13?

http://87.savefile.com
87 Productions is the shizz.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 31st Mar 2005 09:04
Player numbers stay static, so say, there could be 1-4 players connected then player 2 leaves, the others keep the same numbers.


"Lets migrate like bricks" - Me
The Real 87
20
Years of Service
User Offline
Joined: 3rd Mar 2004
Location: somewhere between 86 and 88
Posted: 31st Mar 2005 11:36
then I am assuming that when new players join they take the lowest available number, or is this thought wrong?

http://87.savefile.com
87 Productions is the shizz.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 1st Apr 2005 10:01
That is correct.


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 00:12 Edited at: 2nd Apr 2005 00:25
Hey Benjamin. I've started converting my code to 0.5, and I can't seem to send more than 4 floats in a packet. I'm not sure how many bytes floats are in your plugin, but even if they are 8 bytes each, that should only amount to 40 bytes, rather than the 1024 bytes maximum per packet. When I try and pop the floats (I'm pretty sure it's the popping, as that reads the memory, and it's the server app that pops the floats, and the server app that crashes), it gives me a this error.



Not sure what to do about it.

Also, I don't know if it's a problem with the initial buffer size, as my program just quits without any message when I use NET MAKE BUFFERS.

Isn't it? Wasn't it? Marvellous!

Attachments

Login to view attachments
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 00:25 Edited at: 2nd Apr 2005 00:30
Thats a wierd problem. As I seem to remember, I coded the popping functions to not read any more data than available, however when using different datatypes, if you read data in the wrong order you get that error. Are you sure its just floats you are transfering? I'll do some tests later.

edit: Done some tests, can't find that error. I tried sending and receiving 5 floats per message, and it worked fine. You sure its not actually 3 floats and one byte you are pushing into each message?

Quote: "as my program just quits without any message when I use NET MAKE BUFFERS."

I'll sort that out right away


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 00:31
I'm pushing 5 floats, and then a word (to identify what message I'm sending). Also take note of what I added onto my previous post. Here is the code for pushing...



It sends the data every 100 ms. Here is the popping...



It reads the word, and then checks what it is, and then reads the data depending on it. Weird thing is, with 4 floats it works fine, but with 5 it doesn't work.

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 00:58
This is so wierd, I can't seem to replicate the problem at all myself. I'm not sure if this will help, but in that id word, what number are you using?


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 01:03
3.

Are you using the stack?

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 01:10
Indeed I am using the stack. Are you checking for data once every sync?


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 01:14 Edited at: 2nd Apr 2005 01:18
Yep I am. I've discovered it doesn't give the error if you only pop one float, but more than that and it gives the error (twice in fact). I'm trying to narrow it down, but without much success.

It also seems to happen with sending 4 floats and 2 words.

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 01:25
I have an idea that might help narrow it down...perhaps checking the message size before you read any data?

size = net get msginsize()

By the way, due to an error I missed in the DLL, you'll need to take away 2 from the value returned to get the real size(I'll fix that some time).


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 01:30 Edited at: 2nd Apr 2005 01:31
double post

Isn't it? Wasn't it? Marvellous!
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 01:30
I'll try that, but I think it's fairly conclusive that it's a problem with floats. I tried sending 50 words, that works fine. 1 word and 5 floats doesn't work. Exactly the same code, but with net pop/push word instead of net pop/push float. And the message size won't really work unless I know how many bytes a float takes up.

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 01:34
The floats are 4 bytes each. This problem is really baffling. Perhaps you could try changing the 2 player example(the one that comes in the zip) to make it produce the same error, so I can try it?


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 01:46
I'll try that. And another thing, I tried using net get msginsize()
but calling it also causes the error. There's something wrong here with floats and the buffer.

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 02:15
I think the problem is that Multisync thinks you have a message waiting when you don't. I'm not sure if this is your fault or it's yet though. Will just wait for you to recreate that error with the example.

I can't see anything in the DLL's code that would allow it to report false information, but I'll keep looking


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 02:31
I've found the problem. When the player joins, the server program pauses for about 6 seconds, loading the character model. In that time, the client has sent about 60 messages all with 5 floats and 1 word in. This obviously was screwing up the stack somehow.

So I think it was mostly my fault for being so stupid, but I think the stack should also be able to deal with stuff like this, as there will undoubtedly be pauses some of the time, and it wouldn't be too good if the program crashed because of it.

Thanks for your help anyway .

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 03:57 Edited at: 2nd Apr 2005 03:58
22 * 60 = 1320

The limit is 1024 by default. Though it is partially my fault, because you see, there are three buffers. One of the buffers is for storing data for access from the user, one is for storing stack data, and one is a temporary buffer. Now this temporary buffer should have been as big as the stack buffer, but I only made it as big as a single message buffer, which is 1024 bytes, so thats why it happened.

Next time I update the plugin I'll be sure to change the temporary buffer size to 10240 bytes.

So yeah.. yo fault.


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 04:40
Well, couldn't you prevent the stack from overflowing by not allowing more messages than it's capacity. If it had done that I certainly wouldn't have got that error, just rather a lot of identical messages .

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 06:08
Yeah that would work, but the problem laid in the size of the temporary buffer.


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 2nd Apr 2005 08:36
Oh, sorry, didn't read your message properly.

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2005 08:59 Edited at: 2nd Apr 2005 09:00
Well MAYBE next time you will!



Erm I was just thinking, do you need a fix for this or are you working around it some how?


"Lets migrate like bricks" - Me
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 3rd Apr 2005 07:50
I just send a message to clients saying not to send messages to the server until told to again. In the end I'll have to do this for every player, but it's hardly ideal. I'm probably best to load the animation data beforehand and apply it to loaded objects. The animation is what's making the object loading so slow I think.

It's mainly my problem as my program shouldn't really pause for that long. A clear stack command may be useful though in extreme situations, to avoid crashes even if it loses data. No hurry though.

Isn't it? Wasn't it? Marvellous!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 6th Apr 2005 00:33 Edited at: 6th Apr 2005 00:37
I've made minor changes to the DLL. I've changed the temporary buffer size fo 10KB and fixed some functions that were returning wrong values. The download is in the same place as always..

http://forum.thegamecreators.com/xt/xt_apollo_download.php?i=495817


"Lets migrate like bricks" - Me
Vixen
19
Years of Service
User Offline
Joined: 6th Apr 2005
Location: Netherlands
Posted: 7th Apr 2005 20:24
Try entering the IP 127.0.0.1. It works for me.

Trying to help where I can [Newbie status ]
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 5th May 2005 02:25
Why isn't this stickied yet?

"We make the worst games in the universe."

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th May 2005 02:27
Quote: " Try entering the IP 127.0.0.1."

What?

Quote: " Why isn't this stickied yet? "

Its too um... l33t for a sticky..


"Lets migrate like bricks" - Me
Scorpio Midget
20
Years of Service
User Offline
Joined: 23rd Mar 2004
Location: Nottingham
Posted: 5th May 2005 03:00
Quote: "This can be used for server/client multiplayer games, and because it uses TCP message transfering is reliable."

Wish it could do UDP as well, i dont want most of my messages sent 'reliable'.

Scorpiomidget
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th May 2005 03:03
Well, when I rewrite it, I may try and add UDP support as well. My current project(another kind of multiplayer plugin) uses UDP, but its for peer-to-peer games.


"Lets migrate like bricks" - Me
Scorpio Midget
20
Years of Service
User Offline
Joined: 23rd Mar 2004
Location: Nottingham
Posted: 5th May 2005 03:07 Edited at: 5th May 2005 03:07
Quote: "My current project(another kind of multiplayer plugin) uses UDP"
Great news, i'll look forward to it. I presume it can be used for client/server as well as P2P.

Scorpiomidget
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th May 2005 07:11 Edited at: 5th May 2005 07:13
That wasn't the really intention when I first started the project. It was going to be purely for the faster paced games (such as FPSs, etc) and therefore I was only going to make it work using the P2P strategy, however making it work using the client/server method won't be difficult and it could definately be usefull I'm sure.


"Lets migrate like bricks" - Me
Skeletor
19
Years of Service
User Offline
Joined: 21st Jun 2004
Location: florida
Posted: 6th May 2005 01:56
Question, is it bad to take away the sendDelay? The reason being, is in my Online Pong game, I made it where the Host is in charge of where the ball is and sends the coords to the Client. With SendDelay of 5 the Ball looks jumpy so I cut out the SendDelay to make it look smoother.


created by "Lord ShitNipple"

Login to post a reply

Server time is: 2024-04-25 00:10:26
Your offset time is: 2024-04-25 00:10:26