It is currently 16 Apr 2024, 17:08
   
Text Size

Manalink 3.0 multiplayers setup and test

Discuss Upcoming Releases, Coding New Cards, Etc.
PLEASE DO NOT REPORT BUGS HERE!

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

Re: Manalink 3.0 multiplayers setup and test

Postby Korath » 14 Sep 2015, 18:39

The three most obvious things that'll desync multiplayer are
  1. generating random numbers and not sending them over the network
  2. calling the non-network-aware versions of low-level UI choice functions (I think the only one Manalink uses is choose_a_card()) without communicating the result over the network
  3. treating players 0 (the human in a human-AI duel, or the local player in multiplayer) and 1 (the AI in a human-AI duel, or the remote player in multiplayer) differently.
Misuse of random numbers is easy to find - grep finds 152 uses of internal_rand() in Manalink source, essentially all of them problematic - but not terribly difficult to fix. There's a function at 0x44E070 that I've labeled network_rand_raw() which takes a player and an upper bound (the same way internal_rand() does), and either picks a random number and sends it if player is the local player, or waits to receive the random number if player is the remote one. All you need to do is make a front end that calls that instead of internal_rand() during multiplayer, like I've done in network_rand() in src/shandalar/ai.cpp.

There's no premade network-aware front end for choose_a_card(), since it was originally only used for Ring of Ma'ruf, but the network handling for it can be lifted out of that card's function in magic.exe.

The third case is the hardest to automatically find, the most extensive, and the hardest to fix. There are many, many cases where, instead of coaxing the AI to choose to do the right thing, it's instead forced to - Energy Arc, for example, can only legally target non-attacking creatures if player 0 is casting it; and many cards similar to Bloodthirsty Ogre have end-of-turn triggers forcing them to activate if controlled by player 1. So if one player - remember, both players in a network game think they're player 0, and the other is player 1 - casts Energy Arc and targets a blocking creature, the other player is going to think the target's illegal; and if someone controls an untapped Bloodthirsty Ogre at the end of his opponent's turn, the other player is going to think it has more devotion counters than it should. Kaboom.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Manalink 3.0 multiplayers setup and test

Postby stuffdogg » 27 Aug 2021, 21:23

I'm assuming the current version still does not support multiplayer? Does anyone know What the last version was that will do multiplayer? I remember being able to do it over a virtual network but that was years ago.
stuffdogg
 
Posts: 24
Joined: 10 Jul 2010, 03:33
Has thanked: 0 time
Been thanked: 0 time

Re: Manalink 3.0 multiplayers setup and test

Postby travolter » 26 Dec 2023, 15:18

Ill post my guide to play multiplayer manalink on 2023.

- Use Manalink 1.3.2 version
- Be sure that you have directplay enabled in windows8/10/11
TURN WINDOWS FEATURES ON/OFF --> LEGACY COMPONENTS --> DIRECT PLAY
or use cmd or powershell and check writing
DISM /online /get-features /format:table | more
to activate directplay
DISM /online /enable-feature /all /featurename:DirectPlay

- Download a program called Radmin_VPN (to setup your multiplayer connection)
- Under Radmin_vpn create a channel and set password.
(The two players have to install the program, but only the host player create the channel).
- The 2 players have to be connected to same radmin channel (the 2 names should appear in the window).

- Launch manalink 1.3.2
- Click on the manalink floating "gem". If it does not appear check if you have a manalink.reg file and click over it to enable.

---Now under mananink connection--
- If you create the game:--> TCP/IP --> CONNECT --> HOST
- If you connect into the created game: TCP/IP --> CONNECT --> JOIN --> IP OF RADMIN_VPN

- When the two players appear into the manalink box dialog the host crator should "invite" the selected player to start.

- When you are connected go to duel and play against your buddy! ;)

If you use same procedure in manalink 3 it should connect too... but its not playable...
Yesterday I played a multiplayer game in manalink3 until 4 turn.. and then crash... other times crashes after first turn or at the begining
travolter
 
Posts: 250
Joined: 26 Mar 2012, 17:56
Has thanked: 4 times
Been thanked: 8 times

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 19 guests


Who is online

In total there are 19 users online :: 0 registered, 0 hidden and 19 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 19 guests

Login Form