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 v1.0 - Multiplayer plugin

Author
Message
James H
16
Years of Service
Recently Online
Joined: 21st Apr 2007
Location: St Helens
Posted: 2nd May 2009 19:09
Hi, I`ve been looking at and trying to understand example 1 in 1.4.1.
It would seem I failed miserably. Some questions;

SENDGAP - is this something we are supposed to build on? I can only find two references in the code; once at the begining(its made a constant) and in the line "LASTSENT+SENDGAP<timer()". Maybe its that I don`t understand that line? I thought it meant "if (LASTSENT+SENDGAP)<timer()"? - in which case SENDGAP does nothing?

Why is the division of distx# and distz# by 10 and not another value? I don`t quite get whats going on with the timing of packets here and scene updates. In the clients case the clients object is updated, then messaging is taken care of then other objects in the scene are updated. So, in handlemovement function, the second part does what? Calculate a previous location or something? I really don`t understand, is there any chance you/someone could explain? I keep getting mixed up with everthing!

I`ve downloaded Dark Coders zombie game but there are issues - the player only moves very slowly(rotation is fine so is spawning/dieing - ie the packets seem to be sending/recieving fine - so its not lag I don`t think). In fact if I have more than one instance of the client running all players barely move yet rotation etc is fine. Also bullet decals don`t appear where they should if they don`t belong to the client. I assume its because of either my dbp version(7.3) or the multisync version. I wondered if anyone has updated code?

Whilst failing to try and understand whats what in example one I decided to attempt to change the left and right key option for mouse movement. First I got it to work but only if movement occured on the mouse in the -x/+x direction, then I attempted for mousemove controlled smooth movement. It didn`t work that well at all. Would it be possible for someone to take a look and see what I did wrong?

1st attempt
Server:

Client:


2nd attempt
Server:

Client:

I`ve attached as project files in .rar in case thats easier for you to use.

Attachments

Login to view attachments
Xeno360
14
Years of Service
User Offline
Joined: 30th Apr 2009
Location:
Posted: 2nd May 2009 22:54
Hey, any guides on how to use this? just want somthing simple to get the idea of how it works, maybe the host as a cube. when an ip is connected another cube appears and its location is sent and shown on the hosts screen or somthing? i just want somthign basic to see how it ticks! .
James H
16
Years of Service
Recently Online
Joined: 21st Apr 2007
Location: St Helens
Posted: 3rd May 2009 15:13
Bump, anyone?
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 4th May 2009 19:23
Quote: "Maybe its that I don`t understand that line? I thought it meant "if (LASTSENT+SENDGAP)<timer()"? - in which case SENDGAP does nothing?"

The SENDGAP constant indicates the amount of time between sending updates. LASTSENT+SENDGAP will be higher than timer() until a certain amount of milliseconds (indicated by SENDGAP) have passed.

Quote: "Why is the division of distx# and distz# by 10 and not another value?"

It's just an arbitrary value used for smoothing the movement. If you use a lower value the smoothing will be faster.

The HandleMovement function just gradually moves player objects to their new location from their current location, using smoothing.

James H
16
Years of Service
Recently Online
Joined: 21st Apr 2007
Location: St Helens
Posted: 5th May 2009 03:01
Ok, thanks, I think I get it now
Data
19
Years of Service
User Offline
Joined: 26th Nov 2004
Location: Winnipeg,Canada
Posted: 21st May 2009 06:19 Edited at: 21st May 2009 06:23
Anyone notice/found solutions for the bug in the Zombies game from pg3 as the server crashes after the first 2 rounds of gamemode 1? Would be appreciated.

Oh and just for the benefit of anyone who is having trouble compiling, you may have to change function 'RGBA' to anything else as oddly the compiler seems to think it is a reserved word.

And lastly, thanks Benjamin for making this awesome plugin and free at that too

ABXG
14
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Canada
Posted: 21st May 2009 10:18
Just a little suggestion for the C++ library, could you put the functions into a namespace to make use of the awesomeness of IntelliSense? It is extremely simple, in the header file just encapsulate all the functions like this:



------------------------------------
Currently 1500+ lines of code into an "over-the-shoulder" action RPG with combat based on rag-doll physics.
Dragon Knight
17
Years of Service
User Offline
Joined: 10th Jan 2007
Location: Newcastle
Posted: 27th May 2009 06:46
I'm still going to buy this when you've finished it benjamin, so keep up the work . *random encouragement*

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 5th Jun 2009 10:20 Edited at: 5th Jun 2009 10:21
Thanks for the encouragement.

Quote: "Just a little suggestion for the C++ library, could you put the functions into a namespace to make use of the awesomeness of IntelliSense?"

I could do, although remember that all the functions are prefixed with 'Net', so you can take advantage of IntelliSense quite easily.

Nomad The Great
15
Years of Service
User Offline
Joined: 18th Apr 2008
Location:
Posted: 11th Jun 2009 05:32
I'm having the same old issue with on my LAN the client and server connect fine, yet outside the lan they won't connect. I have read and tried what has been suggested in other posts but am not having any luck at this. here's what I got:

Server:
nethost(100)
netsetport(4000)
-Firewall/anti-virus not installed

Client:
netconnect("the external IP here")
-firewall/anti-virus are both turned off

Port forwarding is enabled on the server PC and i checked that yes it is forwarding 4000 to the correct local IP.

Now when i run the client from a friend's house , it is not able to connect/find the server which is at my house.

Like I've said I've read about 20-30 posts specifically about multisync and this problem and I've tried several ideas and none are working.

Any help is appreciated at this point ^^
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 15th Jun 2009 22:04
Well, apart from the IP address possibly being wrong I don't know what the issue could be.

Mista Wilson
15
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 17th Jun 2009 08:00
Just wanted to say GREAT JOB Benjamin Keep up the excellent work, if you ever release this with more features in a commercial package, you have at least 1 customer here

Just downloaded and started playing around with MultiSync 1.4.1.

The whole thing works perfectly and I will be including it in some projects that I am working on..

However, I havent played with the C++ side yet(its what i will b using), I did have a look through the examples, I use a trial of DBPro to compile dbpro code etc to check it out lol... anyway, Im not sure if its because of the Trial thing or not, but I had to change a bunch of conditionals, and alter some of the variable assignment logic in the example1..

Just things like where it is checking a conditional IF statement :

original:


change:


being a C++ programmer, i realise that the original should enter the if loop if it checks true, but for some reason i had to tell it to check against "true" to make it enter the loop....i assume its my compiler(trial)

A number of small things like that and the example worked perfectly.

Lastly, again, Excellent work

If it ain't broke.... DONT FIX IT !!!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 22nd Jun 2009 15:38
Thanks for the kind comments.

Quote: "i assume its my compiler(trial)"

I think so.

Nomad The Great
15
Years of Service
User Offline
Joined: 18th Apr 2008
Location:
Posted: 23rd Jun 2009 00:22
Quote: "Well, apart from the IP address possibly being wrong I don't know what the issue could be."


I went to whatsmyip.org, and copy + pasted into my client... unless that website is wrong I am not wrong on the IP.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 23rd Jun 2009 04:30
Does This support DBC?

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Nomad The Great
15
Years of Service
User Offline
Joined: 18th Apr 2008
Location:
Posted: 23rd Jun 2009 05:56
Quote: "Does This support DBC?"


Yea, that's currently what I'm using. dbc 1.21 enhanced
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 25th Jun 2009 05:16
kk, SWEET. I'll finally get a multiplayer running.

You rule ,Ben.

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Acolyte
18
Years of Service
User Offline
Joined: 3rd Feb 2006
Location:
Posted: 26th Jun 2009 04:05
Hey Ben, are there any plans on making multisync available for the GDK.NET release?

Windows XP Home Ed. SP/2 ---> GeForce FX 5500 - 256MB
160 GB HD ---> 1 Gig RAM
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 27th Jun 2009 18:11
Quote: "Hey Ben, are there any plans on making multisync available for the GDK.NET release?"

Yes, eventually.

Mummy Killer
15
Years of Service
User Offline
Joined: 4th Oct 2008
Location: Slovenia
Posted: 29th Jun 2009 22:21
erm can i ask sth??

is there any limit how big can be memblock to send?

because i want to make memblock from image and then send it through lan and then make image from memblock there... with 10x10 image it sucsess but with 100x100 it fail... ( i am very big noob at memblocks )

Mummy Killer
Mummy Killer
15
Years of Service
User Offline
Joined: 4th Oct 2008
Location: Slovenia
Posted: 30th Jun 2009 23:35
any answers please?

Mummy Killer
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 30th Jun 2009 23:49
You can only send a certain amount of data in each message, about 2046 bytes.

Mummy Killer
15
Years of Service
User Offline
Joined: 4th Oct 2008
Location: Slovenia
Posted: 1st Jul 2009 00:18
ok, thanks Benjamin

Mummy Killer
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 3rd Jul 2009 23:25
Hey, Ben. I'm having abit of a problem.

My Server program can see and display all my players, but none of my clients can see anyone else.

Has anyone else had this problem with multi sync?

I'll post my code:

after loading multisync, for the client and server, and establishing the connection, i use.....



......for both the client and server.

Whats wrong here...?

Thanks,
-DD

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 4th Jul 2009 15:53
Well, if you use NetSend(0) from the server nothing will happen, as 0 is not a valid player ID.

Veron
17
Years of Service
User Offline
Joined: 22nd Nov 2006
Location:
Posted: 4th Jul 2009 15:58
I'd just like to pop in and extend my thanks to you Benjamin. Great work on the plugin, and if you set up some sort of donation I'd love to be able to donate some cash - simply putting your name on a credits page doesn't really do justice to the amount of time this has saved me.

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 4th Jul 2009 23:15
Ah. I'd have never noticed.
Thanks! And I must say, Multisync is awsome.

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 11th Jul 2009 10:06 Edited at: 11th Jul 2009 10:06
I'm glad you guys like it.

Quote: "Great work on the plugin, and if you set up some sort of donation I'd love to be able to donate some cash - simply putting your name on a credits page doesn't really do justice to the amount of time this has saved me."

Consider buying Multisync 2 when I release it then.

deaths judge
17
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 13th Jul 2009 20:02 Edited at: 13th Jul 2009 22:37
im really confused ... can i make a login script with this to check the username and password ?

i have the username and password in login$ on the client side. but what command would i used to send this to my server so the server has login$ and knows what IP its from so it can compare against something and return a string back to the client.

im stuck guys help




EDIT:

Ive managed to put this together but it doesnt seem to work

CLIENT;


SERVER;


it keeps saying "DAM SOMETHING IS WRONG" ie the client isnt recieving the message but when i check the server it says that the server is recieving it

[[[[wobble]]]] {{{{wobble}}}}
deaths judge
17
Years of Service
User Offline
Joined: 4th Jan 2007
Location:
Posted: 14th Jul 2009 12:47
could do with a response soon guys i cant get any furthur without this bit of help.

[[[[wobble]]]] {{{{wobble}}}}
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 19th Jul 2009 04:00
hrmm.......try putting it in a loop...... if it already is, Try changing



to



And do the same for whatever returns "yes".

HOPE I HELPED.


Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 28th Jul 2009 00:46
Hey, Ben? How would I go about Setting up a Sever that can handle multiple games(sessions) at once with multisync?

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 28th Jul 2009 01:10
If you're referring to separate games on the same server, all you need to do is use a different port for each game.

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 28th Jul 2009 23:33
No, I need differant sessions of the same game.

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 29th Jul 2009 22:12
So session 1 has say 10 players, and session 2 has 5 players, etc..?

Or are you wondering about multiplayer? (100+ players in the same session?)

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 31st Jul 2009 17:57
Quote: "So session 1 has say 10 players, and session 2 has 5 players, etc..?"


Yepper.

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 31st Jul 2009 19:39
That would then be a situation where you would just make two copies of the same server application, and have them use different ports.

If you're doing this to get as many players as you can on one server, then have the server app itself manage this.

Server1 starts at say port 3900.
When it gets 50 players it starts telling any clients that connect after that to connect to 3901.
Server2 runs on port 3901.
When it gets full it sends players to 3902, etc...

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 31st Jul 2009 20:22 Edited at: 31st Jul 2009 20:23
Ah, I see......Thank you for clearing that up..

Ok, so say i have 10 sessions with upto 4 players each.

Now, Does this method slow any of the other server apps down(Does it make others lag because of all the apps that are running?)

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 3rd Aug 2009 03:15
Depends on the amount of processing going on, but from what I've seen with DBPro, if there's only 4 players in each session you shouldn't run into any performance issues unless you are transferring massive amounts of data.

Using UDP I've been able to send the position data of 100 NPCs every second without a significant performance hit.

Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 3rd Aug 2009 22:53
Okay, Thanks fer the help, Its very appreciated.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 4th Aug 2009 19:21
No problem.

SFCBias
14
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 16th Aug 2009 01:04
Could someone post a tut on how to set this up using the DGDK. I can tell its winsock but ive never done it in C++.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 17th Aug 2009 19:54 Edited at: 17th Aug 2009 20:47
Right, I've got this set up in DGDK, it runs smooth and everything, HOWEVER every time I try to recover data it kills itself with these errors:


I probably messed this up:



EDIT : Yes User and Pass are declared, as char*.

It's not the world that turns against you, it's you that turns against the world.
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 17th Aug 2009 20:23
hmmmmmmmmmmmmmm......................Ben?

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 17th Aug 2009 20:25
Yes?

This message was brought to you by Grandma industries.

Making yesterdays games, today!
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 17th Aug 2009 20:41

lol.
Yo granny, Try ur hand at helping that guy out.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 17th Aug 2009 20:48
So you didn't need help? Bumping for other people ey? No, I'm afraid I can't help "that guy".

This message was brought to you by Grandma industries.

Making yesterdays games, today!
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 17th Aug 2009 20:52
Quote: "EDIT : Yes User and Pass are declared, as char*."

How big are the buffers that they point to?

Quote: "hmmmmmmmmmmmmmm......................Ben?"

I don't read this thread every half-hour, sorry.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 17th Aug 2009 21:12
Quote: "How big are the buffers that they point to?"

What's that supposed to mean? I figured just declaring them as char* would be sufficient.

It's not the world that turns against you, it's you that turns against the world.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 17th Aug 2009 21:51
Defining pointers isn't enough, you have to actually point them to something. Also, the second parameter of NetGetString should be the size of the buffer supplied, to allow the function to avoid writing past the end of the buffer.

Login to post a reply

Server time is: 2024-03-29 15:00:28
Your offset time is: 2024-03-29 15:00:28