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.

DarkBASIC Professional Discussion / Multysync for multiplaye FPS (Moving players around)

Author
Message
kuljot
17
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 2nd Apr 2010 05:43
Hey guys I have been working on a little multiplayer fps. I got everything working except the mutiplayer part. So i am using multisync and i know hwo to create a conenction between the 2 computers. The part i need help with is actually having the players see each other movign around. Now with the native dpbro commands this would be easy but i dont undertsand how to do it with multisync. I read the multsync manual but it is very confusing.

Here is all of my code:


The server and client will all be in 1 applciation. The program does detect the 2 computers conenctng to each other. Now i just need hlep with implanting the moving and seeign eacher other . If someone could give me examples of how to do this wiht multisync it would be great with explanations. thanks and my game with all media and code is attatched.

P.S. I made the map myself.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
Dragon Knight
19
Years of Service
User Offline
Joined: 10th Jan 2007
Location: Newcastle
Posted: 2nd Apr 2010 07:35 Edited at: 2nd Apr 2010 07:36
I created a multiplayer tank game last year, worked quite well.

I left all movement up to the main server.

If a client goes to move his player / shoot or what ever, that information is sent to the server.

the information packet was something like.
MessageType, Moving, PlayerAngle, Shooting
0, 1, 240, 0

mostly integers, and the message type part was to allow the players to also send messages to each other.

E.g.
MessageType, PlayerName, String
1, Kyle, "What's up?!?!"

You just need to get that into you're head.
Then i'd have a message type 2 which was the server sending player positions etc.. back to the clients, thus updating their machines to be seeing the same.

Hope that helps, i'd be happy to go into more information on it, but it's 5:35am!

kuljot
17
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 2nd Apr 2010 08:08
Hey Dragn knight i undertsand the whole prosess. Buti dont get how ot write this out usign the plugin Multisync. I mean with the DBPRO commands i would be done by now. If someone could help me usign the Multisync plugin that would be great.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 2nd Apr 2010 11:26 Edited at: 2nd Apr 2010 11:30
If you are stuck with this anyway you can do it with dbpro and port it later when you are more used to multisync.I`m learning best of writing samples of code for myself and reading other peoples code.Try to make some simple net program with multisync before start using it in your game.I can also suggest you to look at DarkNet, it may be closer to dbpro than multisync.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 2nd Apr 2010 18:32
DarkNet is actually very similar to Multisync in it's command usage.

While they weren't necessarily written the way I would have done it, the demos included with Multisync and DarkNet/MikeNet can teach you a lot about how they do things. It's pretty easy once you get the hang of it.

I'm using DarkNet in Worlds Apart Online and it's been a life saver.

A sample packet flow concept would be,

- Player moves and sends that data to the server
- Server receives the move, checks collision, and send the move to all other players with correction for collision if needed.

To reduce network traffic you can even have the server limit the players it sends the information to, by having the server check the distance between the moving player, and the player you are about to send the packet to. If they are outside a certain range, don't send it.

In DarkNet (very similar to Multisync commands)

` Sending move
mn Add Byte Send, NET_MOVE
mn Add Dword Send, Player_ID
mn Add Float Send, XPosition
mn Add Float Send, YPosition
mn Add Float Send, ZPosition
mn Add Float Send, XAngle
mn Add Float Send, YAngle
mn Add Float Send, ZAngle
mn Add Float Send, Speed
mn Send TCP 0, Send, myID, 0, 1

With that much information, there's a lot you can do to ensure the player shows up in the right spot on other player's machines. It might be overkill, but I've found it useful.

If you're having difficulty with the connection setup, that's another thing. That can be a little confusing, and I haven't messed with Multisync in a long time.

kuljot
17
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 2nd Apr 2010 20:55
actually i dont have dark net. Hopefully someone with more experience in Multisync can help me out.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
kuljot
17
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 4th Apr 2010 04:34
No one helpign me out I seriosuly need help with this.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 4th Apr 2010 04:36
I already said,

Quote: "
DarkNet is actually very similar to Multisync in it's command usage."


kuljot
17
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 4th Apr 2010 07:56
Is there a trial version for dark net. I want to try it out. Either a trial or demo.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 4th Apr 2010 17:35
There isn't a demo of the DLL, but there are code examples.

The commands are very similar, so looking at DarkNet commands should help you some with Multisync.

kuljot
17
Years of Service
User Offline
Joined: 2nd Jan 2009
Location: sacramneto, ca united states
Posted: 4th Apr 2010 19:57
Ok thank you, KISTECH. I really appreciate your help.
I give you a cup of beer for helping me.

Gateway GT5628 Quad Core Desktop Intel Core 2 Q6600 2.4GHz Quad Core 3072MB RAM / 500GB 7200 SATA II Hard drive DVD RW 18X multi dual NVIDIA GeForce 8500GT ....

Login to post a reply

Server time is: 2026-07-26 22:03:47
Your offset time is: 2026-07-26 22:03:47