Skip to content

Fuelvine/f1-telemetry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

F1 Game Telemetry Client in Go Made With Go

Telemetry client for F1 Game, written in Go. Supports the UDP 2020 and 2021 format.

f1-telemetry-client

Features

  • Event System
  • Rich Env Constants
  • UDP Stats (recv, err and packet per second rate),
  • Vector3 support

Install

# latest version (F1 2021)
go get -u github.com/anilmisirlioglu/f1-telemetry-go@master

# for F1 2020
go get -u github.com/anilmisirlioglu/f1-telemetry-go@v1.0.0

Quick Start

func main() {
  client, err := telemetry.NewClient()
  if err != nil {
	log.Fatal(err)
  }

  client.OnEventPacket(func(packet *packets.PacketEventData) {
  	fmt.Printf("Code: %s\n", packet.EventCodeString())
  })

  client.Run()
}

Specific Address & Port

func main() {
  client, err := telemetry.NewClientByCustomIpAddressAndPort("0.0.0.0", 20777)
  if err != nil {
	log.Fatal(err)
  }

  client.OnCarDamagePacket(func(packet *packets.PacketCarDamageData) {
  	fmt.Printf("Code: %s\n", packet.EventCodeString())
  })

  client.Run()
}

Docs

If you need more information on the F1 UDP specifications, see the docs.

About

F1 Game Telemetry Client for Fuelvine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 98.3%
  • JavaScript 1.4%
  • Dockerfile 0.3%