Telemetry client for F1 Game, written in Go. Supports the F1 UDP 2022 and previous formats.
- Event System
- Rich Env Constants
- UDP Stats (recv, err and packet per second rate),
- Vector3 support
# latest version (F1 2022)
go get -u github.com/anilmisirlioglu/f1-telemetry-go@master
# for F1 2022
go get -u github.com/anilmisirlioglu/f1-telemetry-go@v1.1.0
# for F1 2020
go get -u github.com/anilmisirlioglu/f1-telemetry-go@v1.0.0
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()
}
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()
}
If you need more information on the F1 UDP specifications, see the docs.