playMaker

Author Topic: Multiplayer: Basics?  (Read 2469 times)

Red

  • Hero Member
  • *****
  • Posts: 563
Multiplayer: Basics?
« on: September 09, 2012, 04:52:23 PM »
I've been reading up on the networking systems and though it's helping, there are still some questions that have been left unanswered so i was hoping to see about opening up a dialogue so as to figure out networking with playmaker and how best to implement it.

for starters, i think i've figured out how to transfer the positional information (dumping the positional information into a vector3 and make it network sync) and the rotational information (same with position.) thing is, i'm still wondering how to best get the computers to talk to eachother to determine when players are firing weapons and at what direction.

So, has anyone done networking with Playmaker? could you help a brother out please? i'm still a little fuzzy on how to do this.

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Multiplayer: Basics?
« Reply #1 on: September 09, 2012, 05:08:58 PM »
Also, i'm curious how to integrate the GUI into this so that there's an interface to let the user decide if they want to host a game or join one...

basically, what i'm hoping to achieve is a system where a player can launch a server instance of the game and their friends can join in by selecting it from the list of available servers. (i'm hoping to make it behave similar to Team Fortress 2's server system in the end.)

but for now all i'm hoping to get through is how to set up the basic infrastructure so that two (or more) players can interact with and use their weapons against each other (a basic Deathmatch setup.)

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Multiplayer: Basics?
« Reply #2 on: September 09, 2012, 07:21:57 PM »
Hi Red
1-So your first question about firing. "determine when players are firing weapons and at what direction".

Ray Cast - so your ray create particles, holes, etc when hits something.
The direction of the ray is only know in the the shooter computer.
I think you can´t transfer it in networking.But you can transfer a Vector3.
The solution I think is on all players you add an FSM that creates the holes.
When somebody shots and hits something sends an RPC to all that FSM´s transferring the Vector3 and then you say on that state create object on that position.Other computer will create the hole.
Do you get the idea?
If you want to kill a player is with the same way (RPC´s). The RPC´s are the events between networking.

2- I´m creating a networking menu too. Are you using Photon or you are hosting on your computer?
With any tip of host (Photon or your computer) you can make it.
If you are using Photon please install PlayMaker Photon examples and actions and you can make it very fast. I can help you.
If you want to host it on your computer.
You need to install networking actions.You need to know your IP etc. And I can help you too.

Basic things:
Create room- creates a local, and another players can join where too.
Join room- joins to a room already created.
Leave room-leaves the currently room.

3-Do you play Team Fortress 2?

Bye
« Last Edit: September 09, 2012, 07:23:59 PM by Sebastiao »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Multiplayer: Basics?
« Reply #3 on: September 10, 2012, 03:22:37 AM »
Hi,

 You should definitly Look into the photon Demo I did. It's a fully working simple example, that covers what you need, in terms of gui and simple enough processed so that you grasp the concepts.

 one thing, Photon uses the cloud server, which means that there is no such thing as  a dedicated server, all your overall gameLogic if any has to be handled by the master, that is one of the connected client that is designated by photon as the master. It's all set up so that you know this within playmaker.

 so, have a go, I tried to make the doc as clear as I could:

https://hutonggames.fogbugz.com/default.asp?W927

And the current package

http://hutonggames.com/playmakerforum/index.php?topic=1390.0

bye,

 Jean