jwoertink / gosu.cr

Shard for the Gosu game library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actions Status

gosu.cr

Shard for using Gosu with Crystal

Under development: implementation is incomplete.

Status

Implemented

  • Gosu
  • Window
  • TextInput
  • Font
  • Song
  • Sample
  • Channel
  • Image
  • GLTexInfo
  • Color (in-progress)
  • Numeric helper functions e.g. 90.degrees_to_radians

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      gosu:
        github: gosu/gosu.cr
  2. Run shards install

Usage

require "gosu"

class Window < Gosu::Window
  def initialize
    super(512, 512)
  end
end

Window.new.show

Where possible gosu.cr imitates the Ruby gem.

Development

  1. Install gosu as a system library, see wiki. (Note: may need to edit gosu/cmake/build/cmake_install.cmake to change set(CMAKE_INSTALL_PREFIX "/usr/local") to set(CMAKE_INSTALL_PREFIX "/usr"))

Contributing

  1. Fork it (https://github.com/gosu/gosu.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

Shard for the Gosu game library

License:MIT License


Languages

Language:Crystal 100.0%