tes3mp code was made public

Everything having to do with OpenMW's TES3MP branch.
User avatar
DestinedToDie
Posts: 1181
Joined: 29 Jun 2015, 09:08

tes3mp code was made public

Post by DestinedToDie »

Github

Koncord wrote this on reddit:
Koncord wrote:This code recommended only for Developers who want help me =) I really hope someone be inspired idea and rewrite tes3mp from scratch
TES3MP subreddit thread

Morrowind subreddit thread

Capostrophic translated the changelog:
Capostrophic wrote:
Spoiler: Show
Koncord
Posts: 5
Joined: 22 Jul 2015, 23:13
Location: Russia, Irkutsk

Re: tes3mp code was made public

Post by Koncord »

Anyone can help me update code to latest OpenMW?
aesylwinn
Posts: 243
Joined: 14 Dec 2015, 20:30

Re: tes3mp code was made public

Post by aesylwinn »

It runs! It took a bit of tweaking to get it to build and run on arch linux. I thought I'd write down some of the things I did to get it up and running if others are struggling.

To build:
- For RakNet, I only needed to build the static libraries. It looks like the install prefix is broken because it installed it to the repository. :lol:
- The lua parsing library needed to be downloaded as well. It requires clang to build it. It was in the AUR as terra-git, so I got it there.
- To be able to link everything, I had to install libtinfo, that was available on the AUR so I got it there.
- There were a couple of files that had to be changed to get it to build. There are probably better changes, but whatever, mine worked.

Code: Select all

CMakeLists.txt

line: 383
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -std=c++98 -pedantic -Wno-long-long")

Changes:
Change "-std=c++98" to "-std=c++11"

line: 463-466
INSTALL(FILES "${OpenMW_BINARY_DIR}/tes3mp-client-default" DESTINATION "${SYSCONFDIR}" COMPONENT "openmw") ...

Changes: (Probably a better way)
Remove lines with tes3mp-client-default.install and tes3mp-server-default.install
Change remaining "tes3mp-client-default" to "tes3mp-client-default.cfg"
Change remaining "tes3mp-server-default" to "tes3mp-server-default.cfg"

apps/openmw/mwworld/worldimp.cpp

line 111:
typedef std::tr1::unordered_map<std::string, ContentLoader*> LoadersContainer;

Changes:
Change "std::tr1::" to "std::"
- The "openmw-mp" target wasn't being installed, so I copied that from the build directory to the install directory

To run:
- The PluginExamples repository has the server scripts.
- The tes3mp-client-default.cfg needed to be modified so that "server" pointed to my computer.
- The tes3mp-server-default.cfg needed to be modified so that "home" pointed to the PluginExamples directory with an absolute path.
- I removed the chat_parser.lua script from "plugins" since it looked like the file didn't exist, but I didn't test that.
- Run "openmw-mp" in the terminal (not in the build directory if you want to use the global config file), then run "openmw"

I had multiple clients running on the same computer and was able to hit myself on the other client. :cry: It hurt.
User avatar
psi29a
Posts: 5355
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: tes3mp code was made public

Post by psi29a »

Koncord wrote:Anyone can help me update code to latest OpenMW?
I suggest that you fork OpenMW proper on github, then checkout openmw-0.37 release tag.

Then port your changes over. Compile make sure everything works like you had it.

Make a new branch "openmw-mp", then rebase that branch against master.

That should get you up to date... and more importantly, we see the branch your working on with the possibility of having it merged into openmw itself! :)

Thank you again for all your work! I hope you enjoyed hacking away at it. :D
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: tes3mp code was made public

Post by lysol »

Hahaha, the music sounds like when you watch an old worn VHS tape.
User avatar
Shnatsel
Posts: 64
Joined: 31 Oct 2014, 01:06
Location: Moscow
Contact:

Re: tes3mp code was made public

Post by Shnatsel »

This is a 3-minute video that captures it perfectly, I think: https://www.youtube.com/watch?v=y7iDTRrhM4w

https://www.reddit.com/r/morrowind is full of tes3mp videos right now, some lasting for over an hour.

What this code missing right now is a roadmap. To make this multiplayer mod actually useful, the game logic has to be moved to the server, so there is a single timeline to which each client is synchronized. Right now the server is a dumb relay, and all the game events are applied client-side as soon as they arrive. So every client maintains its own timeline, and it's very easy for clients to get desynced.

So in the hypothetical actually useful version clients should send events to the server on user actions and play events sent by the server instead of running a local instance of game logic. Sending events to server as well as playback of events from server are already implemented in the current version. What's missing is keeping a single timeline on the server, plus either disabling local logic entirely in the client or using something like Drawpile's retcon to continuously correct the client's state to the server state.

Running the game logic on a server, decoupled from the rest of the engine, requires a deeper understanding of OpenMW than Koncord currently possesses, and it all has to be done as close to the main OpenMW repository as possible because a fork of this doesn't stand a chance of getting merged or even syncing the changes from upstream.

Scrawl once said he'd be happy to assist with decoupling and the like, it seems we've reached a point where it is actually needed. I'll try to get Koncord and Scrawl in touch so they can work out what exactly needs to be done.
User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: tes3mp code was made public

Post by raevol »

Shnatsel wrote:This is a 3-minute video that captures it perfectly, I think: https://www.youtube.com/watch?v=y7iDTRrhM4w
Whoever made this video needs a medal... so good!
User avatar
ElderTroll
Posts: 499
Joined: 25 Jan 2012, 07:01

Re: tes3mp code was made public

Post by ElderTroll »

That video is hilarious. Someone should link it to the elderscrolls or gaming reddit threads.
User avatar
GrimKriegor
Posts: 4
Joined: 17 Apr 2016, 00:14
Location: Portugal
Contact:

Re: tes3mp code was made public

Post by GrimKriegor »

Hello there gentlemen of Vehkland, I see aesylwinn has already suggested ways to build TES3MP, allow me to suggest however this build script we have prepared in the last few days to help people build and update it easily on GNU/Linux, and maybe even Mac OS X.

Hope this can be of use to some of you. :D
Post Reply