Forum index VCMI Project - Heroes 3: WoG recreated
Forum of the project aiming to recreate best turn-based strategy ever!

FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  StatisticsStatistics
RegisterRegister  Log inLog in  AlbumAlbum  DownloadDownload

Previous topic :: Next topic
Question about loading a multiplayer game through cmd
Author Message
Shrekmate

Joined: 16 Sep 2016
Posts: 1
Posted: 2016-09-16, 17:47   Question about loading a multiplayer game through cmd

Hello everyone,

I've been loosely following the development of VCMI for last years. My main reason for being interested in the project is me being hopeful that it could someday provide a somewhat stable LAN multiplayer environment including WOG and other mods. Something which has been plagued with crashes and other issues from the days when I actively played internet LAN games with my friends.

While reading about VCMI v0.97 I've noticed command-line game loading has been introduced. I've been trying to get this to work properly, but unfortunately my friend and I have not been able to find the right sequence of actions to perform a proper server-client connection followed by the loading of the multiplayer save.

Steps taken to obtain a multiplayer save to load
Player 1: Hosted a portforwarded multiplayer game on a 2 player sized map.
Player 2: Joined the lobby.
Player 1: Started the game, both players properly connect. Plays and ends the turn.
Player 2: Plays and ends a turn.
Player 1: Saves and returns to the main menu, exits game.
Player 2: Client crashes.

Steps taken to load a multiplayer game
Player 2: Downloads the same save files from player 1 (game.vcgm1 game.vsgm1) and places them in the vcmi/Saves folder.
Player 1: Starts up the client to main menu using the sample command, which is suitable for the previous save.
Code:
vcmiclient --loadserver --loadnumplayers 2 --loadhumanplayerindices 0 --loadhumanplayerindices 1 --loadplayer 0

Player 2: Starts up the client to main menu through the following command.
Code:
vcmiclient --loadplayer 1 --loadserverip (serverip) --loadserverport (serverport)

Player 1: Selects load game, multiplayer and specifies the saved game. The game will enter the loading screen where the bar is frozen at 0%.
Player 2: Selects load game, multiplayer and specifies the saved game. The loading screen will remain at 0%
Player 1: Now loads the game and starts the turn. Player 2 wont get past the loading screen.

We've tried several other ways of loading a multiplayer game. Including changing up the command line times (server goes into loading screen first, player 2 then starts client). And trying to have player 2 load the game by going into new multiplayer game -> join. This crashes the game for player 2 and then player 1 starts the game.

I hope anyone could provide me with instructions on how to properly load a game through the commandline but also what steps to take with the client for both parties.
 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 360
Posted: 2016-09-16, 21:32   

Welcome to forums. Unfortunately if you use "stable" 0.98 build from @Warmonger it's most likely have too many of unfixed bugs and latest development build have MP in broken state.

Today I added workaround for MP and option to make server startup easier. Check github:
https://github.com/vcmi/vcmi/commits/develop

So in case you run on Windows you can use those builds:
http://vcmi.arseniyshestakov.com/

On Linux I don't think there's many options except to compile it yourself.
 
     
SXX 
VCMI programmer

Age: 25
Joined: 04 Jul 2014
Posts: 360
Posted: 2016-09-16, 21:58   

BTW I tested loading with latest version and it's works for me on my local PC:

Start server like that:
Code:
vcmiserver --port 3333

First client like that:
Code:
vcmiclient --donotstartserver --testingport 3333 --testingfileprefix MPTEST_3333_clientone_ --loadserver --loadnumplayers 2 --loadhumanplayerindices 0 --loadhumanplayerindices 1 --loadplayer 0

Second client:
Code:
vcmiclient -d --testingport 3333 --testingfileprefix MPTEST_3333_clienttwo_  --loadplayer 1 --loadserverip 127.0.0.1 --loadserverport 3333


Works. Though keep in mind both testingport and testingfileprefix have to be set in order to savegames on same PC to not overwrite each other.

Also multiplayer heavily untested so unfortunately at least for now it's going to crash.
 
     
Display posts from previous:   
Reply to topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Add this topic to your bookmarks
Printable version

Jump to:  

Powered by phpBB modified by Przemo © 2003 phpBB Group

Hosting provided by DigitalOcean
Page generated in 0.02 second. SQL queries: 12