Skip to content

Instantly share code, notes, and snippets.

What would you like to do?


November 1st, 2020:

Initial networking prototype is functional! Here's a work-in-progress video, with an explanation in the description below.

User coordinates printed to console via first Lua script VConsole2 runs with logging enabled (HL:A launch option -condebug) Java program scrapes coords from log, and writes a second Lua script containing these coords Second Lua script moves the red ball to coords.

The Java program sends those coordinates to itself over a network. This networking setup draws from a configuration file that designates server and client TCP/UDP ports, as well as client IP, client timeout (in ms), and HL:A log path.

February 1st, 2021:

We can take player positions data straight from the game's memory now!!!

This is working SO much better than the last solution, holy moly.

February 3rd, 2021:

(The screen briefly flashing is me teleporting around and the Russell drone avatar catching up.)

This test is to make sure we can successfully bring any networked coords back into the game. We set an empty to the local player's coords using Lua, for the sake of compatibility with various info_player_start setups.

Inside the game, info_player_start doesn't rotate on the X and Z axes along with the HMD, which accounts for the zero values in our implementation. Z position is also ceiling'd at a certain point...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment