Cortex Command

Cortex Command

Not enough ratings
Beta LAN Multiplayer (ccoss open source b33)
By Kostet960604
Multiplayer, in the Cortex Command, oh yes!
   
Award
Favorite
Favorited
Unfavorite
FOREWORD
Before reading my guide, check out the vibrant Discord community that appeared supposedly on November 14, 2020:
https://discord.gg/TSU6StNQUG
They are in the process of building their own Cortex Command multiplayer client, and they have created a Steam guide on November 29, 2020 for review. In it you will most likely find everything you need:
https://steamcommunity.com/sharedfiles/filedetails/?id=2302213847
How to install beta version of b33 with local multiplayer?
In the Steam library, click Properties
Go to the beta tab
Select ccoss - Open Source build
ATTENTION! Before that, it’s better to delete the folder with the game, also I don’t know how the workshop affects the beta game, so you can temporarily unsubscribe from all mods.
Server Creation Official Instruction
Cortex Command Experimental Online Multiplayer
Operations guide

How does it work?
Because Cortex Command was never designed for networking multiplayer current implementation is quite hacky. In order to play online you’ll need to run a self-hosted dedicated Cortex Command server. The server runs Cortex Command simulation, accepts input from the clients and sends them rendered frames, sound events and post effects events. Input and frames are sent at 30 fps. Cortex Command multiplayer is not designed to play with strangers, consider it a thousand miles couch you sit on with your friends, because you’ll have to communicate and negotiate in order to start a match because only the first connected player controls the mouse in lobby UI. To reset current activity either press ESC on the server, or all players need to press and hold BACKSPACE.

Requirements
Because server streams visual data to clients at 30 fps you’ll need lots of bandwidth and CPU power to run the server. You need 1 CPU core to run the game itself plus about 0.75 CPU cores per every client connected. If you’re playing on the PC where the server is, you’ll need 1 more CPU core to run client. Bandwidth requirements are also quite heavy. Depending on resolution and amount of action on the screen server may use up to 10 mbits of bandwidth per connection or even more. Common values though are about 6 mbits in combat benchmark and 3-4 mbits in not so very intensive battle.
The server must be accessible over the network directly or through simple NAT configuration which support NAT punch-trough or external players will be unable to connect.

Deployment
The server itself is the same binary as the game – Cortex Command.exe. To start it in server mode specify a program argument -server <port> via command line or start the included DedicatedServer.bat batch file. Default port is 8000, it can be used for direct LAN connections.
To play over the internet without direct connection NAT punch-through technique is used. Server and clients try to contact an external NAT-service server currently located at 194.87.238.58:61111. To enable NAT punch-trough on the server add or edit the following lines in Settings.ini:
UseNATService = 1
NATServiceAddress = 194.87.238.58:61111
NATServerName = <ServerName>
NATServerPassword = <ServerPassword>
Other players will have to input the same Service Address, Server Name and Server Password as specified in your Settings.ini when they connect to the server via Multiplayer Game activity. If external players are unable to connect via NAT punch-through, take a look at the console with ~ button for any clues. If you see ID_NAT_PUNCHTHROUGH_FAILED in error messages then unfortunately your or other player’s ISP don’t let UDP packets through it’s NAT. In this case you can host dedicated server on some VPS hosting or connect via VPN directly or Hamachi service and then use direct LAN connection mechanism.
After the server starts take a look at the top of the server screen, if you see NAT SERVICE CONNECTED message along with your server name and password, then you’re good and clients can connect.
If you decide to host server on your own or rented hardware, or play on LAN you can try to connect to server directly, by providing it’s IP address and port.

Limitations (Alpha 10)
Client should have at least all the same modules as server, or client will lack skyboxes, glows and sounds.
Dedicated IP or lightweight NAT ISP required to connect to each other.
Only skirmish activities support, no campaign support planned.
Fog of war was not tested at all, don’t enable it as it may consume lots of bandwidth and render incorrectly.
Events consuming terrain, sounds, and glows will consume additional bandwidth.
Controller support was not tested.

Settings.ini
PlayerNetworkName = PlayerX // Player name to display in lobby and in activities
NetworkServerName = 127.0.0.1:8000 // LAN server address to connect
ServerUseHighCompression = 1 // Set to 1 to use higher compression methods (default)
ServerUseFastCompression = 0 // Set to 1 to use faster compression methods and conserve CPU
ServerHighCompressionLevel = 10 // Compression level, 10 is optimal, 12 is highest
ServerFastAccelerationFactor = 1 // Acceleration factor, higher values consume more bandwidth but less CPU
ServerUseInterlacing = 0 // Use interlacing to heavily reduce bandwidth usage at the cost of visual degradation (unusable at 30 fps, but may be suitable at 60 fps)
ServerEncodingFps = 30 // Frame transmission rate. Higher value - more CPU and bandwidth consumption
ServerTransmitAsBoxes = 1 // Transmit frames as blocks instead of lines. Provides better compression at the cost of higher CPU usage.
ServerBoxWidth = 32 // Size of the transmitted CPU block. Different values may improve bandwidth usage.
ServerBoxHeight = 44 // Though the compression is quite high it is recommended that Width * Height are less than MTU size or about 1500 bytes or packets may be fragmented by network hardware or dropped completely.
ClientInputFps = 30 // Input send rate
UseNATService = 1 // Server settings to use NAT service for server registration
NATServiceAddress = 194.87.238.58:61111 // NAT service address, don’t change unless you host your own NAT punch-trough server.
NATServerName = WeegeeServer // Server name to use when connecting via NAT punch-through service.
NATServerPassword = WeegeeServer // Server password to use when connecting via NAT punch-through service.
GitHub
https://github.com/DataRealms/CCOSS

Cortex Command - open source under GNU AGPL v3 (no game data included)

Known problems and limitations
Tested to build only with Visual Studio 2017 for Win32 platform with Visual Studio 2013 toolset installed (You may need to install full VS 2013).

Almost builds with modern toolchains in VS 2017 and VS 2019, but there's some incompatibility in Luabind which fails to compile. Other than that should be fine.

Included source code does not match the current B32 functionality. This is a work-in-progress snapshot of what's internally called "B33", so it won't start with data from B32.

No game data and most of required runtime DLLs are included, you should get those from the Cortex Command beta branch on Steam.

Commercial fmod library was replaced with free SDL Mixer which lacks pitching functionality hence some sound effects will sound differently or incorrectly.

All source and binary dependencies required to build the project are included.

This version uses a slightly modified version of Allegro. The only difference from the original is a custom window borderless mode implemented to fix fullscreen issues. If you're gonna rebuild Allegro you'l probably need to disable custom calls in FrameMan.

BUILD PROCESS
Use Debug Open Source configuration to debug (be prepared, it's very slow).

Use Final Open Source configuration to build release .exe.

Binaries go to _Bin, you can't run from there outside of the IDE, it won't find required stuff.

You need to copy SDL related dlls from external\lib\win\ next to .exe in order to run it.

The data can be found under the "ccoss" beta branch of Cortex Command on Steam, if you own a license for the game.

CONTACT
support@datarealms.com
Create Server
Given my knowledge in this area, this section is temporarily empty.
All I know is that b33 has a local multiplayer (LAN), and there is a chance that you can try to run it through a VPN, for example Hamachi.
Update 33, news July 11, 2019
Major features:
LAN Multiplater
Implemented mass and passengers count constraints for crafts
Dynamic pie menus
Dynamic buy menus

Fixes:
Reworked loading screen to reduce loading time.
Added an option "DisableLoadingScreen" in settings.ini to disable loading screen completely to reduce loading time (Thanks Duh102, CrazyMLC, MaximDude)
Fixed InvincibleCrafts and ToughCrafts global scripts (Thanks 4zK)
Fixed a bug when AEmitter flash was drawn in the wrong position if emitter was not emitting.
Fixed a bug in Siege when incorrect units wear spawned.
Fixed a crash when calling TimerMan.TicksPerSecond in Lua script
Fixed a situation where flipped crafts dropped units in invalid direction.

Added shortcuts and bindings:
Added binding UI for weapon pick, drop, next, prev and reload for "keyboard only" and "keyboard" control schemes.
You can press CTRL + ~ (ConsoleMan.ForceVisibility = true) to toggle console which does not grab input.

F1 - Shortcut help
F2 - Reload all scripts
F3 - Dump console text to file
F4 - Dump console input to file
F5 - Clear console log

New global scripts:
Added Low Gravity and Faster walking global scripts.
Added bulky drop ships global script.
Added global scripts to disable buy menu constraints.
Added Global scripts Better jetpacks, Constant Gold Income and All Units Are Brains

New collections:
MOSRotating.Emitters
MOSRotating.Attachables
Scene.Deployments
Emitter.EmissionList
PresetMan.Modules
DataModule.Presets
Note
After the news of July 11, 2019, there are only updates from another game in the Cortex Command news that can be misleading.
Parsec - analogue of Remote Play Together
Parsec works simply as a screen-sharing technology. You either share your screen with yourself (remotely), with your friends (for co-op), or with gamers around the world (to play your favorite games).

Parsec client registration and download:
https://parsecgaming.com/

Discord - Parsec
https://discord.com/invite/cQjEGFy
NOTE
For maximum convenience, play through the controllers, in other words - on the joysticks.
The xbox joysticks are best configured, but you can try others.
10 Comments
Kostet960604  [author] Dec 15, 2023 @ 8:53pm 
Amen
percocet consumption Dec 15, 2023 @ 8:09pm 
I have. I thank you for your illuminating guide...
Kostet960604  [author] Dec 15, 2023 @ 4:11pm 
This is not CS or GTA with a bunch of servers, where you can find a server with one click. This is a godforsaken game for old users or accidentally lost travelers who must learn to use the game themselves, like scientists after finding an ancient relic in abandoned ruins. Everything I wrote earlier was just a piece of the puzzle left by the developers and a little ad-lib that I don’t even want to think about. I hope you find your path, enlightenment given from above.
percocet consumption Dec 15, 2023 @ 1:33pm 
holy fucking SHIT where is the shiny button to quick join a server
Kostet960604  [author] Dec 13, 2021 @ 6:46am 
ADDED SECTION: FOREWORD

Before tossing your slippers in my direction, please read this section.
joey12313 Sep 30, 2021 @ 10:09pm 
parsec is pretty god
Kostet960604  [author] Aug 12, 2021 @ 10:13am 
Leave your message after a short beep. Piiiiiiiii
FrancisNile Aug 12, 2021 @ 3:01am 
BROOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
Zelfior Nov 28, 2020 @ 10:00am 
hi! thanks for the guide, did you get to make it work?
Kostet960604  [author] Nov 2, 2020 @ 3:53pm 
Added a section - an alternative to Remote Play Together