Giter Site home page Giter Site logo

openrider's Introduction

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)

openrider's People

Contributors

tomiy avatar calculamatrise avatar dependabot[bot] avatar

Stargazers

 avatar  avatar Hugo Benard avatar pinn avatar Albin Ahlbäck avatar  avatar  avatar Manu avatar Gabriel Gutierrez avatar

Watchers

James Cloos avatar  avatar  avatar

openrider's Issues

Rework the toolbar system

Make a Toolbar object and a Tool object and plug them into the events
(already somewhat made and copy-pastable in the obfuscated bhr.js - not in the repo)

Not working yet?

Hey guys, I came across this while trying to create an alternate FRHD editor. I downloaded and unzipped the repo, but when I open the index.html file, it looks like this:
Screen Shot 2020-06-09 at 6 13 53 PM
I am kind of confused on why this is - I downloaded the master branch, so is it still in-dev? If so, I would be willing to help, at least as much as I can. Thanks!

Clear game

In order to not use eraser tool for this or to resort to import an empty file.

Add a Game object and rework the game loop

Right now the entry point is canvas_ride in bootstrap.js, which initializes a Track object and its Bike object and pushes its update method to the instances array with a setInterval that loops through it
The problem is that updating and rendering is done at the same time, so we don't have granularity over fps while keeping the game mechanics the same (25 ups, 40ms ticks)

My proposal is to have a Game object that's the entry point and handles creating a new Track and Bike, and also has a run() method that updates every x tick and renders as often as it can with requestAnimationFrame
Consider adding a constant for the tick rate since it's used in the Ghost* classes

Add license

In my opinion, GPL version 2 or 3 is perfect for this.

Improve constants

Instead of exporting each constant as is and importing a whole slew of them at once in some files, make an object array, so instead of:

export const
    TOOL_CAMERA = 'CAMERA',
    TOOL_BRUSH = 'BRUSH'

we have:

export const TOOL = {
    CAMERA = 'CAMERA',
    BRUSH = 'BRUSH'
}

and all impacts on affected files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.