bomp.rb

Ruby Gem Version Gem Downloads (for latest version) Gem download rank

A collision detection library for Ruby, works in Ruby2D, Gosu and Tic-80

Introduction

A collision detection library for Ruby that makes it easy to detect collisions between 2D objects in your game or application. The library implements two popular collision detection algorithms AABB and SAT.

Installation

Ensure you have the latest versions of Ruby and Gem installed on your system to work with containerization.

Initial Setup

  1. Clone the Repository: git clone https://github.com/sealtielfreak/bomp.rb.git cd bomp.rb
  2. Install Gemfile:
  3. Follow the instructions at Install gems.

Contributing

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

Setting Up Your Development Environment

Before you start contributing, it's important to set up your development environment. This includes installing necessary tools and configuring pre-commit hooks to ensure code quality.

Pre-Commit Hooks

To maintain code quality and consistency, we use pre-commit hooks. Follow these steps to set up pre-commit hooks in your local development environment:

  1. Install Pre-Commit:

    • Ensure you have Python installed on your system.
    • Install pre-commit globally using pip: pip install pre-commit
  2. Clone the Repository (if not already done):

    git clone https://github.com/sealtielfreak/bomp.rb.git
    cd bomp.rb
    
  3. Set Up Pre-Commit Hooks:

    • In the root directory of the cloned repository, run: pre-commit install
    • The hook repository must have a *.gemspec. It will be installed via gem build *.gemspec && gem install *.gem. The installed package will produce an executable that will match the entry.
  4. Usage:

    • Pre-commit hooks will now run automatically on the files you've staged whenever you commit.
    • You can manually run the hooks on all files in the repository at any time with: pre-commit run --all-files

Creating a Pull Request with your changes

Now that you have done some changes and want to merge them in our repository, feel free to:

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