GGPO in P2P [LAN]

RongYaoRongYao Red ElkJoined: Posts: 10
GGPO in LAN

From fba_ggpo.cpp sourcecode
sscanf(connect, "quark:direct,%[^,],%d,%[^,],%d,%d", game, &localPort, ip, &remotePort, &p1);
ggpo = ggpo_start_session(&cb, game, localPort, ip, remotePort, p1);
} else if (strncmp(connect, "quark:synctest", strlen("quark:synctest")) == 0) {
int frames;
char game[128];

Notice that line...
(connect, "quark:direct,%[^,],%d,%[^,],%d,%d", game, &localPort, ip, &remotePort, &p1);


and that line here!
&cb, game, localPort, ip, remotePort, p1

So following the example of the code!
When you execute online play it goes quark:served command, which means that you sending or accepting challenge. Then it goes to quark:direct, which means the challenge is accepted and the game starts. After that it goes to synchronization and then to stream the match!
Here I'm showing only the direct connection part.
Let's jump to the place where we playing on LAN, shall we do it?

PLAYER1
ggpofba.exe quark:direct,mvsc,7000,192.168.1.168,7001,0 -w
quark:direct - means direct connection
mvsc - obviously means marvel vs capcom... at least for the people here should be a known term
7000 - YOUR open port
IP (192.168.1.168) - means the IP of your opponent / PLAYER2 IP address
7001 - means PLAYER2 open port
0 - means player1
-w - that means windowed, runs fba in window mode

PLAYER2
ggpofba.exe quark:direct,mvsc,7001,192.168.1.168,7000,1 -w
quark:direct - means direct connection
mvsc - should be the same as above
7001 - YOUR open port
IP (192.168.1.168) - means the IP of your opponent / PLAYER1 IP address
7000 - means PLAYER1 open port
1 - means player2
-w - means windowed mode

Ip means the ip address to which you should connect to! In this case I'm on one single pc so the ip is the same!

For the players mapping I'm not sure because 0 and 1 map the inputs to player1 for both clients, I suppose that every player plays with player1 inputs.

Nice isn't it?
They GGPO guys did great work, they also have input lag and frameskipping presets for the separate games, so no matter that the emulator support many games, these games are not avaiable for internet play, because they are not optimized for it still... at least that is what I'm assuming here.

You don't need adobe air to play on LAN, you don't need ggpo account, you don't need to connect to ggpo servers also!
It is perfect if you want to play with friends in closed network... in the office at work for example haha, really! XD

Check my other tutorial in supercade in LAN! ^^
Have a nice playing guys!
Art!
I use pencils to write notes and paint to make my day colorful.

Comments

  • zeechzeech Dismember Joined: Posts: 578
    Nice one. I assume this can also be used as a direct IP connection to someone on the internet? With proper port forwarding and so forth.
  • RongYaoRongYao Red Elk Joined: Posts: 10
    Nice one. I assume this can also be used as a direct IP connection to someone on the internet? With proper port forwarding and so forth.
    Yes, when I use my external IP, it also works, I guess if you port forward correctly and both know your IPs, there would be no any issues!

    Few things to mention!
    1. Ports... local port and remote port settings are very important, since if you both use same port, players get black screen or one of the players got black screen in the emulator, no matter that connection is established.
    It could be any port that is open and it is not used!
    I'm player1 which is equal to 0 at the end of the command line options!
    ggpofba.exe quark:direct,mvsc,MY_OWN_PORT,your_ip,your_port,0 -w
    Your are player2 which is equal to 1 at the end of the command line options!
    ggpofba.exe quark:direct,mvsc,YOUR_OWN_PORT,my_ip,my_port,1 -w

    2. Keymaps are global, which mean that if window loses focus it still detect your key presses, which is also a plus if some application stole the focus of the window till you playing, then you will keep be able to play without being bothered.
    3. Keybinding is always set to player 1 for every player. So player1 uses player1 inputs, player2 on the other pc uses player1 inputs too to move his own character.
    4. I noticed one thing, the chat "T" button ingame chat, doesn't send messages from one player to another.

    Hope explained it good, so everyone (even people that know nothing about this) to understand how it works.

    I can't make the stream "quark:stream" (match streaming thing) option to work since it requires match ID and i'm not sure that LAN games generates such an ID, but there should be possible to watch people playing on LAN as far as the functions are there.
    And it should be possible even if theres no such an option as far as code is avaiable, I should thank to ggpo that they keep their sourcecode avaiable. It is still possible to record your input as if you playing in normal fba there, so it works in the same way as recording reply which peoplecan watch later.

    On other note, Supercade is based on fba too, the game list is generated with clrmamepro and they using n02 p2p kaillera with their own modifications, still they not providing the source to the people, it is kinda not so cool. Still who cares as the players are happy? Both emulators works in LAN for other oses and platforms too (under wine of course, as far as lan doesn't require adobeair or net framework), so I guess linux and mac users will be more happy to know about those tricks than windows users.
    Art!
    I use pencils to write notes and paint to make my day colorful.
  • sketch21sketch21 Joined: Posts: 4
    tried this out last nite and it works well. good job man.
  • toastedsubtoastedsub zzzz Joined: Posts: 197
    where is fba_ggpo.cpp?
    zzzzzzzzz
  • jedpossumjedpossum Ok, Darling Joined: Posts: 4,227
    src\burner\win32

    I occasionally stream so you can see how boring poking around in the memory is. www.hitbox.tv/jedpossum

    [8/6/2014 8:19:53 PM] Pasky: jedpossum, hacker of the obscure fighting games

  • toastedsubtoastedsub zzzz Joined: Posts: 197
    what are you guys using to compile this, everytime I tried it failed, or what source are you using?
    zzzzzzzzz
  • -TheBastard--TheBastard- FAB u LOSE! Joined: Posts: 1,276
    someone should make a customizable version of it
    <blitzfu> cool, and bastard is a loser, screen shot that
    <Pasky> he's always trolling, he has a macro button that troll
    <Kyouya>LoL Bastard, best post evah! But you forgot the tiger uppercut!!
    Imagine a snail being able to play fgs, and being a noob in it, it would sure be a salty snail, oh the tragedy of a snail!
  • sketch21sketch21 Joined: Posts: 4
    player one : put the following in a notpad and save as ".bat"
    ggpofba.exe quark:direct,mvsc,(your ip here without brackets),7001,0 -w



    player two : put the following in a note pad and save as ".bat"
    ggpofba.exe quark:direct,mvsc,(your ip here without brackets),7000,1 -w



    now both players put the .bat file in the ggpo directory and double click

    simple as that. have fun :)
Sign In or Register to comment.