Skip to content

openrider-game/openrider

Repository files navigation

Contributors Forks Stargazers Issues MIT License


OpenRider

A port of a port of a port of FreeRider

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Openrider is the last link in a pretty long chain of reboots of freerider, a bike riding game where players draw tracks and race on them.

It features what is essentially an entire rewrite of the game engine that aims to keep the same physics and functionality as the historic versions such as CanvasRider and its invite-only successor, BlackHatRider, while improving performance and user experience, and adding modern features for racers and creators alike.

The endpoints for database actions exist and can be accessed through a small API but UI has been left out of the scope of this project, and need to be implemented by the reader to enjoy the classic FreeRider experience.

This repository is not endorsed nor approved by FreeRiderHD, the official successor to the FreeRider series of games. It is entirely written from scratch and does not borrow any assets. It is made out of love for the franchise and is not meant for commercial use. See LICENSE for more information.

(back to top)

Getting Started

To get a local copy up and running follow these steps.

Prerequisites

  • NPM (optional)
  • XAMPP (or any way to get an apache php environment)
  • PostgreSQL

Installation

  1. Configure PostgreSQL with the default password 'postgresql'
  2. Clone the repo
    git clone https://github.com/tomiy/openrider.git
  3. Install NPM packages
    npm install
  4. In httpd.conf, change DocumentRoot & Directory so that it is possible to at least path to this folder (and optionally change port number if another process is running on :80)
  5. In php.ini, enable the pdo_pgsql extension
  6. Run the script in .setup\db\tables.sql to create the base table structure
  7. Move the file sample.htaccess to the top directory of the repo and rename it to .htaccess
  8. Optionally, you may move the .setup\db\ folder to place it anywhere you see fit, but if you do be sure to change the constants in class\constant\RequestConstants.js so that they still point to the correct URL
  9. Optionally, you may minify the js with vite
    npm run build
    Then follow the instructions in index.php
  10. The game is now playable at localhost[optional :port]/[optional url path]

(back to top)

Usage

Unlike previous iterations of the game, the rendering and processing of physics are entirely separated in the engine, which means you can render arbitrarily fast (more FPS!) while keeping the physics system intact (backwards compatibility with CR and BHR!) and have an overall better experience.

The editor as is is compatible to a degree with FreeRiderHD, you may import your tracks from there with little to no trouble, except for vehicles which won't be added in this repo. With that said, anyone can fork it and go through the hassle of doing it, the game structure supports it pretty well!

A new layers feature has been added, you now have the option of drawing onto the main layer, like the previous games, or you can now draw onto the foreground layer, which is rendered in front of the bike, does not interact with physics and is semi transparent.

Item options are now available for the relevant tools and will appear when you select the tool. You can click the tool (or the hotkey) again to hide them. For example, you may now filter what you want to erase with the eraser tool.

You can now change the start position of the rider.

You can now debug render and physics cells, item IDs, bike hitboxes, collision checks...

Many more improvements will be made in the future!

(back to top)

Roadmap

  • Hat ❔ (could be a good idea for scalability)
  • Powerups
    • Zero gravity 🚧
    • Teleport ✅
    • Invincibility ❌
    • No steer ❌
    • Engine off ❌
    • Slippery wheels ❌
    • Restore/reset bike state (for the above powerups) ❌

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

(back to top)

Contact

Tomiy - @tomiy

Project Link: https://github.com/tomiy/openrider

(back to top)

Acknowledgments

  • Polygon for the HUGE initial help and interpolation math
  • Joel Huff for fixing physics (thanks!)
  • Calculus for bug fixes

(back to top)