Touhou Puppet Play Forums

Touhou Puppet Dance Performance => Touhou Puppet Dance Performance => : PhantomPilot January 22, 2016, 01:47:54 PM

: TPDP Bridge matchmaking server v1.0.1 [status: defunct]
: PhantomPilot 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.

(http://puu.sh/oRdHR/e3601cc440.png)
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 (http://tpdp.dabomstew.com/savegen/)
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:

Player2:

that's it.

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

Notes:
Big thanks to Dabomstew for sharing his save editor code and speeding things along quite a bit.
feedback, bug reports, suggestions etc are welcome.
: Re: TPDP Bridge matchmaking server (alpha)
: PhantomPilot 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.
: Re: TPDP Bridge matchmaking server (alpha)
: Doesnt 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.
: Re: TPDP Bridge matchmaking server (alpha)
: SoulfulLex 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...
: Re: TPDP Bridge matchmaking server (alpha)
: PhantomPilot 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.
: Re: TPDP Bridge matchmaking server (alpha)
: PhantomPilot 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.
: Re: TPDP Bridge matchmaking server (alpha)
: Dabomstew 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 (http://tpdp.dabomstew.com/saveeditor) and a basic netplay save generator (http://tpdp.dabomstew.com/savegen/). 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.
: Re: TPDP Bridge matchmaking server (alpha)
: PhantomPilot 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 (http://tpdp.dabomstew.com/saveeditor) and a basic netplay save generator (http://tpdp.dabomstew.com/savegen/). 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.
: Re: TPDP Bridge matchmaking server (alpha)
: Dabomstew 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 (http://tpdp.dabomstew.com/saveeditor) and a basic netplay save generator (http://tpdp.dabomstew.com/savegen/). 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.
: Re: TPDP Bridge matchmaking server (alpha)
: PhantomPilot 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.
: Re: TPDP Bridge matchmaking server (beta) [status: up]
: PhantomPilot 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
: Re: TPDP Bridge matchmaking server (beta) [status: up]
: PhantomPilot 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.
: Re: TPDP Bridge matchmaking server v1.0.0 [status: up]
: PhantomPilot May 14, 2016, 08:34:38 AM
v1.0 proper is here, old versions will not work anymore.
release highlights:

Server:
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:

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.
: Re: TPDP Bridge matchmaking server v1.0.0 [status: up]
: 404 Username Not Found 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.
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: PhantomPilot 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 (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.
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: DerxwnaKapsyla August 07, 2016, 03:41:17 AM
We actually have an 'Official' save editor now, produced by someone on the team- or rather, we've had one for a while. http://tpdp.dabomstew.com/saveeditor (http://tpdp.dabomstew.com/saveeditor) is the link to it, it works with both Base 1.34 and the current build of Shard of Dreams.
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: PhantomPilot August 07, 2016, 06:03:46 AM
I see. well then i guess it's time to wrap this project up. not much point now that SoD has a translation and you can just use match codes.

server will remain up for the rest of this month, then i'll take it offline.
repos will remain on the off-chance anyone wants them for something
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: DerxwnaKapsyla August 07, 2016, 11:52:20 PM
I think that keeping the bridge might be a good idea? You should hop on by the Discord server and see what the others think! That being said, people still play Base 1.34 from time to time, even with the SoD translation. So there may still be a use for it? People don't seem to wanna touch SoD until story is translated, and I can assure you, that won't be done for a Long While.
Honestly I... haven't kept up with the Shard of Dreams netplay scene at all, so I don't know anything about it, so beyond my very weak opinion, I can't be of much use here.
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: PhantomPilot August 08, 2016, 07:33:13 AM
i'd be happy to keep it running if people actually used it. but we've already had forum posts about how it's always empty, and a quick grep through the debug logs seems to verify this.
clearly it's just not very useful. maybe my view is just too narrow because i don't use discord, and that seems to be where everything happens. i don't know.

but it'll still be up for the rest of this month. if it magically becomes useful during that time, i can keep hosting it.
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: decondelite August 08, 2016, 04:43:05 PM
I have never seen anyone over the bridge and eventually gave up trying to find opponents there.
I'd really like to find opponents though.
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: Zelph August 12, 2016, 10:56:42 AM
Same here.I sometimes logged in but never encountered people.Its probably due to the fact that actually there is not enough people owning/knowing about the game?

I believe lot of pokemon/anime's lover would probably try this game if they known about it,but unlike most of hardcore touhoufan,they are not aware about Touhou Puppet dance Performance.
And even if they do,they probably dont know about the TPDP Bridge matchmaking.
: Re: TPDP Bridge matchmaking server v1.0.1 [status: up]
: decondelite August 12, 2016, 04:10:31 PM
Same here.I sometimes logged in but never encountered people.Its probably due to the fact that actually there is not enough people owning/knowing about the game?

I believe lot of pokemon/anime's lover would probably try this game if they known about it,but unlike most of hardcore touhoufan,they are not aware about Touhou Puppet dance Performance.
And even if they do,they probably dont know about the TPDP Bridge matchmaking.

I did my job regarding FR communities. However, I will admit that I don't think many people will actually try the game if they have to buy it and I'm prick enough in order not to give them a free download.