Skip to main content

No project description provided

Project description

HydroSim SDK Python

This is a python package for connecting to the Shared Memory API of the boat racing sim HydroSim.

Install

The package can be installed with pip.

pip install hydrosim_sdk

Usage

First import the HydroSimSDK.

from hydrosim_sdk import HydroSimSDK

Then create an instance of the SDK.

hydrosim = HydroSimSDK()

This will automatically start a thread that reads from the Memory Mapped Files that HydroSim writes to at 60hz.

The data can be accessed through several member properties.

Note: You can look at the hydrosim.running property to check if the game is currently running.

  • hydrosim.hydro_sim - Returns the game and API version and a tick value that will increment as long as the game is running.
  • hydrosim.telemetry - Telemetry data for the local player
  • hydrosim.timing - Live timing data for all drivers.
  • hydrosim.course_info - Information about the current course and layout.
  • hydrosim.session - Session time and status data.
  • hydrosim.buoys - Location and state of all the buoys.

Dealing with multiple instances

In case you need to work with multiple instances of HydroSim, for instance, if running multiple dedicated servers on the same machine.

You can pass the command line parameter -mmapName with any string value when launching HydroSim. This will append the name to the default memory mapped file names.

For instance if you pass -mmapName "Server1", then the names will change from:

hydro_sim_file_name = "Local\\HydroSim"
telemetry_file_name = "Local\\HydroSimTelemetry"
session_file_name = "Local\\HydroSimSession"
timing_file_name = "Local\\HydroSimTiming"
course_info_file_name = "Local\\HydroSimCourseInfo"
buoys_file_name = "Local\\HydroSimBuoys"

to

hydro_sim_file_name = "Local\\HydroSim.Server1"
telemetry_file_name = "Local\\HydroSimTelemetry.Server1"
session_file_name = "Local\\HydroSimSession.Server1"
timing_file_name = "Local\\HydroSimTiming.Server1"
course_info_file_name = "Local\\HydroSimCourseInfo.Server1"
buoys_file_name = "Local\\HydroSimBuoys.Server1"

To connect the python SDK to this instance, you then need to specify the name to the HydroSimSDK constructor.

hydrosim = HydroSimSDK(mmap_name='Server1')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

hydrosim_sdk-1.0.0b6-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file hydrosim_sdk-1.0.0b6-py3-none-any.whl.

File metadata

File hashes

Hashes for hydrosim_sdk-1.0.0b6-py3-none-any.whl
Algorithm Hash digest
SHA256 2d68b6c55e4050fc163215473a880529d60a52f64ac5d455bf7b3778e74b53b9
MD5 f50e01b5fd2c297f06fa360f00881a3e
BLAKE2b-256 bdc7d9c8df68f4799c71f5c0408d3bdae322aadeb4b6f042d13f3ef28994ca39

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page