Skip to content

Malizma333/lr-core-py

Repository files navigation

Line Rider Physics in Python

A compatible implementation of Line Rider's physics engine written in python. Despite the name, this is not a fork of lr-core and is structured entirely differently for ease of reference. Nothing requires external dependencies.

Tests can be run with src/test.py.1
A primitive track simulator can be run with src/simulator.py.

Thanks to:

  • lr-core for having nice test cases and class abstractions
  • LROverhaul and linerider-advanced for putting all the math in a few files
  • OpenLR for showing clear differences in legacy grid algorithms
  • bosh-rs for motivating me to start working on this

1Point values in fixture_tests.json are f64s represented as hex strings for precision purposes, see src/utils/capture_state.js for an example

Features

  • beta 6.0, 6.1, 6.2 grid implementations
  • beta 6.3 / 6.7 gravity fix
  • line properties
    • line extensions
    • flipped lines
    • acceleration multipliers
  • rider physics
    • multiple riders
    • flash scarf physics
    • linerider.com scarf physics (approximation)
    • lra:ce remounting
    • linerider.com remounting
      • with multipler riders

License

This project is licensed with GPL to remain compliant with LRA's GPL license, since it was used as a reference. Any modification or reference of this project must also be GPL-licensed and remain open source. See the licenses directory for the full list of included licenses.

Some track fixtures sampled from the following:

About

A compatible implementation of Line Rider's physics engine written in python

Resources

License

Stars

Watchers

Forks

Contributors