{"id":13441707,"url":"https://github.com/ubisoft/massgate","last_synced_at":"2025-03-20T12:32:25.584Z","repository":{"id":49384927,"uuid":"114986709","full_name":"ubisoft/massgate","owner":"ubisoft","description":"Massgate is the online backend server for the Massive Entertainment game World in Conflict, and is now open-source to make it possible for anyone to host their own Massgate server.","archived":true,"fork":false,"pushed_at":"2018-10-30T08:23:32.000Z","size":1717,"stargazers_count":1125,"open_issues_count":1,"forks_count":180,"subscribers_count":85,"default_branch":"master","last_synced_at":"2024-10-28T04:19:14.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubisoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-21T09:17:33.000Z","updated_at":"2024-10-26T09:54:58.000Z","dependencies_parsed_at":"2022-08-25T16:20:27.955Z","dependency_job_id":null,"html_url":"https://github.com/ubisoft/massgate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fmassgate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fmassgate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fmassgate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fmassgate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubisoft","download_url":"https://codeload.github.com/ubisoft/massgate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244611378,"owners_count":20481181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:37.222Z","updated_at":"2025-03-20T12:32:25.572Z","avatar_url":"https://github.com/ubisoft.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# World in Conflict Massgate\n\n# Introduction\n\nMassgate is the central server for the Massive Entertainment game World in \nConflict that manages the online functionality such as keeping track \nof dedicated game servers, user accounts, clans, ladders etc. The original game \nwas released in 2007, and the official Massgate server was shutdown in 2016. \nTo make it possible to continue to play World in Conflict online the \nsource code of Massgate is now open source, making it possible for anyone \nto host their own Massgate server.\n\nThe code itself is more or less the same as how the code looked like back\nwhen the game is released. Only minor tweaks have been made to make it build \non a relative modern compiler and to remove the necessity to manage CD-keys.\nNot much of the code has survived into later releases done by Massive \nEntertainment and does not really reflect to code of the company today, apart\nfrom the code standard and the general look and feel of the code. As a piece\nof game development history, and for anyone interested in how online servers\nwere written at the time, it can definitely be a point of interest.\n\n## Dependencies\n\nMassgate depends on _MySQL_, and it was built with MySQL version 4.2.1 which is\nan ancient version today and is 32bit. Massgate has been briefly tested with a \nnewer version of MySQL, but there are no guarantees that it will work \nflawlessly.\n\nThe game also depends on a web server running to get information about the \nlatest patches for the game. Any web server will do, more details below.\n\n## Building Massgate\n\nTo build Massgate you need _CMake_ and some version of Visual Studio. At the\nmoment only Visual Studio 2015 has been tested.\n\nPoint CMake to the root folder of the source to configure and generate a \nsolution. The solution will end up in the build folder.\n\n## Running Massgate\n\n### MySQL\n\nIn order to run Massgate, you need a MySQL server it can connect to and a \ndatabase prepared with data and tables. The commands to create them can be\nfound in the SQL file under the share/sql folder. \n\nTo set up MySQL on localhost using the command line tool would look \nsomething like this:\n\n```\nmysql\u003e create database live;\nmysql\u003e use live;\nDatabase changed\nmysql\u003e grant all on live.* to 'massgateadmin'@'localhost' identified by 'adminpassword';\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql\u003e grant all on live.* to 'massgateclient'@'localhost' identified by 'clientpassword';\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql\u003e source share/sql/databasestructure.sql\n```\n\nIn order for Massgate to be able to connect to the database, the hosts\n`writedb.massgate.local` and `readdb.massgate.local` need to point to the\ndatabase. An easy way of achiving that locally in Windows is to edit the \nWindows hosts file under `C:\\Windows\\System32\\drivers\\etc\\hosts` by adding the\nfollowing lines:\n\n```\n127.0.0.1 writedb.massgate.local\n127.0.0.1 readdb.massgate.local\n```\n\n### Start Massgate\n\nTo start Massgate, you need to run the MMassgateServers.exe found in the \nbuild/bin folder with the following arguments:\n\n```\nMMassgateServers.exe live -noboom -all -dbname live -massgateport 3001 -logsql\n```\n\nBut before you run the executable, make sure config.ini is present int the \nworking directory of the executable.\n\nIf everything is okay you should see something like this in the a console\nwindow:\n\n```\n2015-09-08 12:24:13 [2532] [INFO  ]  : Creating 16 handler threads (8 per core,\nmax 16).\n2015-09-08 12:24:13 [2532] [INFO  ]  : Kickstarting server.\n2015-09-08 12:24:13 [2532] [INFO  ]  : Server startup sequence OK.\n```\n\n### Running a Web Server\n\nWorld in Conflict needs to connect to a web server in order to get information\nabout patches. Any simple web server that points to the `share/www-root`\nfolder should work. \n\nAn easy way to run a web server is to simply use Python \nand start a server like this:\n\n```\ncd share\\www-root\npython -m SimpleHTTPServer 80\n```\n\n### Running a Dedicated Game Server\n\nThe dedicated game server is called `Wic_ds.exe` and is included in the \ndistribution of the game. It is installed by Uplay upon download. \n\nTo redirect the executable to a locally hosted Massgate server \n(running Massagate and the database) host names need to be redirected. \n\nIn the Windows hosts file under `C:\\Windows\\System32\\drivers\\etc\\hosts` \nadd the following lines:\n\n```\n127.0.0.1 liveaccount.massgate.net\n127.0.0.1 liveaccountbackup.massgate.net\n127.0.0.1 stats.massgate.net\n127.0.0.1 www.massgate.net  \n```\n\nIn order for the dedicated game server to connect to Massgate, make sure the\nWic_ds.ini is set to report to Massgate.\n\n```\n[ReportToMassgate] \n1\n```\n\n### Connect With the Game\n\nTo make the game connect to Massgate you need to redirect host names on the\nmachine the game is running on as well. In the Windows hosts file \nunder `C:\\Windows\\System32\\drivers\\etc\\hosts` add the following lines:\n\n```\n127.0.0.1 liveaccount.massgate.net\n127.0.0.1 liveaccountbackup.massgate.net\n127.0.0.1 stats.massgate.net\n127.0.0.1 www.massgate.net  \n```\n\n## Contributing \n\nThe code is shared as is. Anyone is free to fork the code and do whathever\nthey want as long as the licences are respected. We will generally not accept \npull requests as the source is shared to let the community \ntake over and continue with Massgate.\n\nIf there is a major issue with the codebase that should apply to any version\nof it we will consider such a request.\n\n## Suggestions For Possible Improvements\n\nAdding support for more databases, such as Sqllite or PostgreSQL, could ease\nsetup and hosting of Massgate. If you are interested take a look at the\nMDatabase library.\n\nThere is also the possibility to recreate, or make a new modern improved \nMassgate web portal by using the data found in the database. The original\nportal (not included in this repo) did just that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubisoft%2Fmassgate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubisoft%2Fmassgate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubisoft%2Fmassgate/lists"}