Poll

Would you use a matchmaking server for TPDP?

Yes
8 (72.7%)
No
0 (0%)
Maybe
3 (27.3%)

Total Members Voted: 10

Author Topic: TPDP Bridge matchmaking server v1.0.1 [status: defunct]  (Read 6733 times)

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
TPDP Bridge matchmaking server v1.0.1 [status: defunct]
« on: January 22, 2016, 01:47:54 PM »
This is no longer being maintained. The server is down indefinitely.
the source code not really worth maintaining due to being a giant pile of spaghetti, however if you'd like to host the server as-is, you can find instructions in the git repository.
the most recent version will need to be compiled from source. it was designed to run on linux, but will compile for windows if necessary. if you need help, post here or PM me and i will try to help.


TPDP Bridge is designed to make it easy to connect to specific players in a lobby environment.
You will need a post-game save file. If you don't have one, Dabomstew has made a convenient save generator
both the base game and YnK are fully supported.

Download the client here (windows only for now): https://github.com/php42/tpdpb-client/releases/latest
Last update: Aug 6. please re-download if you got it before then.

How it works
TPDP Bridge works by tunneling the games network connection through another connection to the matchmaking server, eliminating the need for port forwarding.
This means that you will play the match in TPDP itself as usual, but the bridge client will be running in the background, allowing you to connect to other players using the client.

I've tried to make the on-screen instructions as clear as possible, but here is the procedure to get a match going, in order:
Player1:
  • open TPDP and host a match on the default port (10800)
  • in the bridge client, go to play->host and host your match

Player2:
  • in the bridge client, go to play->join and select the match you want to join
  • in the TPDP netplay menu, make sure your ruleset matches what was listed in the join menu and connect to 127.0.0.1:10700 (this is the loopback address, it connects to the bridge client running on your computer)

that's it.

basically, as long as your settings in the client match your settings in the game, you're good to go.

Notes:
  • when first running the client, it will ask for the game directory, in a default install this should be C:\game\FocasLens\幻想人形演舞 or C:\game\FocasLens\幻想人形演舞-ユメノカケラ-
  • you must have the game directory set to the game you are actually playing, as the server will enforce version checks (you can change it at any time)
  • after saving edits to your party, you will need to exit back to the title screen to reload your save
  • Back up your save! there is a button to do it and the party editor will pester you until you do.
Big thanks to Dabomstew for sharing his save editor code and speeding things along quite a bit.
feedback, bug reports, suggestions etc are welcome.
« Last Edit: October 10, 2017, 05:56:52 AM by PhantomPilot »

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #1 on: January 23, 2016, 08:30:08 PM »
Information for developers and nerds

the trainwreck that is the source code for TPDP Bridge can be found at:
client: https://github.com/php42/tpdpb-client
server: https://github.com/php42/tpdpb-server

it is licensed under the GNU GPL.
« Last Edit: March 05, 2016, 11:23:24 PM by PhantomPilot »

Offline Doesnt

  • much sand. wow.
  • A Member group
  • ***************************************************************************************
  • Posts: 188
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #2 on: January 24, 2016, 05:08:12 AM »
This looks very nice for the base game, but if I understand its functions correctly it is sadly rendered obsolete for the expansion.

That said, if SUWAKO bans the west again it'll become very nice, and I've heard discussion on IRC about pre-emptively moving away from SUWAKO and focusing on 6v6.
i accidentally deleted your avatar so have 90 stars instead ~agastya

Offline SoulfulLex

  • A Member group
  • Posts: 126
  • Self-Proclaimed Touhoumon Nerd
    • View Profile
    • RMXP Eye Candy
Re: TPDP Bridge matchmaking server (alpha)
« Reply #3 on: January 24, 2016, 04:21:36 PM »
There's also the fact that people need to clear the game first and foremost before they could even do netplay battles, whereas in Shoddy you can just make a team from the Team Builder and do whatever you want instead of having to constantly reincarnate and raise puppets to Level 100 for each one you want on your competitive team. Personally, I think that's a great weakness and hinders accessibility to the game (or at least anyone who plays casually or doesn't want to clear the game in order to netplay).

Not that making people clear the game is a bad thing (it teaches newcomers about the game and what to expect), but it'd be nice if Hemo could make a version of TPDP specifically for netplay...

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #4 on: January 25, 2016, 02:05:13 AM »
This looks very nice for the base game, but if I understand its functions correctly it is sadly rendered obsolete for the expansion.

That said, if SUWAKO bans the west again it'll become very nice, and I've heard discussion on IRC about pre-emptively moving away from SUWAKO and focusing on 6v6.

The plan was to (hopefully) add more functionality beyond simply circumventing port forwarding. Things like stat tracking, maybe social features like game lobbies or whatever (and maybe some sort of official platform for tournaments etc?). To what extent will probably depend on how much of the game i can reverse-engineer so it's a bit early to say exactly.

I was waiting for the english patch to get the expansion, so i don't know exactly what features it provides, but my understanding is it was more of a simple proxy service to circumvent port-forwarding?

There's also the fact that people need to clear the game first and foremost before they could even do netplay battles, whereas in Shoddy you can just make a team from the Team Builder and do whatever you want instead of having to constantly reincarnate and raise puppets to Level 100 for each one you want on your competitive team. Personally, I think that's a great weakness and hinders accessibility to the game (or at least anyone who plays casually or doesn't want to clear the game in order to netplay).

Not that making people clear the game is a bad thing (it teaches newcomers about the game and what to expect), but it'd be nice if Hemo could make a version of TPDP specifically for netplay...

I had considered that as well, the only solution i could think of would be a save editor. the games network protocol transmits puppet data in binary format, so i'll probably need to reverse-engineer that anyway, and then writing a save editor should be pretty simple once i know how puppet data is represented (if anyone has decoded it already, please let me know).

EDIT: i just checked the save file, i didn't realize it was encrypted. that poses a whole new challenge, which is unfortunate.

I'm also open to whatever suggestions you might have.
Cheers.
« Last Edit: January 25, 2016, 03:08:49 AM by PhantomPilot »

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #5 on: January 30, 2016, 03:26:01 PM »
Well i broke the encryption on the save file. it was hashed, encrypted, compressed, encrypted again, scrambled, and padded with garbage to try to hide it. who does that for a fan game?

anyway i've got a working prototype save editor, so shoddy style netplay should be quite possible.

i should have a workable release soon-ish provided there are no more hidden obstacles.

cheers.

Offline Dabomstew

  • A Member group
  • Posts: 6
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #6 on: January 30, 2016, 06:50:54 PM »
Hello, I've also been doing some research on the save file recently and made a somewhat usable save editor and a basic netplay save generator. The level of encryption was rather amusing considering how easy the game is to memory edit, but it doesn't seem that bad in the end. As far as I know there aren't any hidden obstacles providing your code is updating all the dumb checksums correctly.

Looking forward to see how this could all be integrated together to give a more shoddy-style experience.
TPDP Save Editor & Netplay Save Generator - http://tpdp.dabomstew.com/

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #7 on: January 31, 2016, 12:23:08 AM »
Hello, I've also been doing some research on the save file recently and made a somewhat usable save editor and a basic netplay save generator. The level of encryption was rather amusing considering how easy the game is to memory edit, but it doesn't seem that bad in the end. As far as I know there aren't any hidden obstacles providing your code is updating all the dumb checksums correctly.

Looking forward to see how this could all be integrated together to give a more shoddy-style experience.

Oh nice, I wasn't aware someone already made one. would you be willing to share the source code? it would save me the time figuring out how to generate a post-game save among other things. If not, no worries.

yeah the encryption is a little silly, i was also amused how easy it is to fish dxlib encryption keys out of memory. they basically fingerprinted the encryption routine with their inline asm so you can do a ctrl-f and set a breakpoint on ANY dxlib game to get the key in like 5 seconds.

Offline Dabomstew

  • A Member group
  • Posts: 6
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #8 on: January 31, 2016, 02:05:55 AM »
Hello, I've also been doing some research on the save file recently and made a somewhat usable save editor and a basic netplay save generator. The level of encryption was rather amusing considering how easy the game is to memory edit, but it doesn't seem that bad in the end. As far as I know there aren't any hidden obstacles providing your code is updating all the dumb checksums correctly.

Looking forward to see how this could all be integrated together to give a more shoddy-style experience.

Oh nice, I wasn't aware someone already made one. would you be willing to share the source code? it would save me the time figuring out how to generate a post-game save among other things. If not, no worries.

yeah the encryption is a little silly, i was also amused how easy it is to fish dxlib encryption keys out of memory. they basically fingerprinted the encryption routine with their inline asm so you can do a ctrl-f and set a breakpoint on ANY dxlib game to get the key in like 5 seconds.

Sent you a PM with the source, though it's a .NET application so it's not too hard to get anyways...

That's a different approach than I used, though equally as effective. The whole format is just a bit lax on security, though it gets the job done of stopping complete amateurs reading stuff in plaintext.
TPDP Save Editor & Netplay Save Generator - http://tpdp.dabomstew.com/

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server (alpha)
« Reply #9 on: January 31, 2016, 05:37:09 AM »
Sent you a PM with the source, though it's a .NET application so it's not too hard to get anyways...

Ah, I'm a linux dev so i don't know much about .NET. it's nice to have the actual source though, thanks.

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server (beta) [status: up]
« Reply #10 on: March 05, 2016, 11:26:17 PM »
well I finally got around to finishing this, OP has been updated. I've set up a small server to see how things go, I don't have a domain so you'll just have to use the IP

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server (beta) [status: up]
« Reply #11 on: April 21, 2016, 04:35:26 AM »
i forgot to make a post, but i pushed an update that should (hopefully) fix the connectivity issues some people have been having. re-download the client if you got it before April 18.

I can't reproduce it on the current build, so if the problem persists please let me know.

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server v1.0.0 [status: up]
« Reply #12 on: May 14, 2016, 08:34:38 AM »
v1.0 proper is here, old versions will not work anymore.
release highlights:

Server:
  • Ban lists are now supported. nothing is currently banned, but blatant cheats are filtered outside of free rules
  • the server will now complain loudly point out your mistakes when you goof up trying to start a match, hopefully this will make troubleshooting easier
i'm abandoning the stat-tracking idea for now. there doesn't seem to be a way to reliably detect the winner of a match from the network traffic alone, since the host is not authoritative and both clients run independent simulations. puppet feints can be detected in certain cases but it's not reliable enough.

Client:
  • fixed a bug in the compression algorithm which, under certain conditions, would cause the save to become incompatible with the games decoder, but would decompress just fine with my own code. this one trolled me pretty hard and is the source of most nonsense with the save editor.
  • puppet stats are now displayed in a sane manner

if you encounter any bugs unintended features, report them here, to the git tracker, or directly into my cerebrum via telepathy.
feedback is also welcome.

Offline 404 Username Not Found

  • A Member group
  • Posts: 1
    • View Profile
Re: TPDP Bridge matchmaking server v1.0.0 [status: up]
« Reply #13 on: August 04, 2016, 10:26:20 PM »
Regarding the save editor part of the program, certain skills appear to not show up under a certain puppets movelist (in the expansion, at least). When the save editor is used whilst these moves are used, the save editor shows them as being no move, which causes the move to be deleted when the editing is completed.

IIRC every Realm skill had this issue,which makes me think it might be a Level 100 issue, although the only 2 I'm certain it did so on are the 2 non-Extra Realm users, so it could equally be an issue of transfer between base game and SoD.

Save file attached, since you said elsewhere that you didn't have one to test with.

Offline PhantomPilot

  • A Member group
  • Posts: 43
    • View Profile
Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
« Reply #14 on: August 06, 2016, 09:36:36 AM »
version 1.0.1 is here to fix the above along with a few other oversights
download it here: https://github.com/php42/tpdpb-client/releases/latest

YnK save files should load without issue now
i'll probably be releasing a standalone version of the save editor soon since it seems to be more useful than the bridge itself at this point.