game
Version, currently 0.1.142 versions
- 0.3.10latestFeb 5, 2021
- 0.3.9not indexedFeb 5, 2021
- 0.3.8not indexedFeb 5, 2021
- 0.3.7not indexedFeb 5, 2021
- 0.3.6not indexedFeb 5, 2021
- 0.3.5not indexedFeb 5, 2021
- 0.3.4not indexedFeb 5, 2021
- 0.3.3not indexedFeb 5, 2021
- 0.3.2not indexedFeb 5, 2021
- 0.3.1not indexedFeb 5, 2021
- 0.3.0not indexedFeb 5, 2021
- 0.2.21not indexedFeb 5, 2021
- 0.2.20not indexedFeb 5, 2021
- 0.2.19not indexedFeb 5, 2021
- 0.2.18not indexedFeb 5, 2021
- 0.2.17not indexedFeb 5, 2021
- 0.2.16not indexedFeb 5, 2021
- 0.2.15not indexedFeb 5, 2021
- 0.2.14not indexedFeb 5, 2021
- 0.2.13not indexedFeb 5, 2021
- 0.2.12not indexedFeb 5, 2021
- 0.2.11not indexedFeb 5, 2021
- 0.2.10not indexedFeb 5, 2021
- 0.2.9not indexedFeb 5, 2021
- 0.2.8not indexedFeb 5, 2021
- 0.2.7not indexedFeb 5, 2021
- 0.2.6not indexedFeb 5, 2021
- 0.2.5not indexedFeb 5, 2021
- 0.2.4not indexedFeb 5, 2021
- 0.2.3not indexedFeb 5, 2021
- 0.2.2not indexedFeb 5, 2021
- 0.2.1not indexedFeb 5, 2021
- 0.2.0not indexedFeb 5, 2021
- 0.1.9not indexedFeb 5, 2021
- 0.1.8not indexedFeb 5, 2021
- 0.1.7not indexedFeb 5, 2021
- 0.1.6not indexedFeb 5, 2021
- 0.1.5not indexedFeb 5, 2021
- 0.1.4not indexedFeb 5, 2021
- 0.1.3not indexedFeb 5, 2021
- 0.1.2not indexedFeb 5, 2021
- 0.1.1not indexedFeb 5, 2021
github.com/mswieboda/game_raylib
Crystal game wrapper library for Cray (RayLib bindings to Crystal)
Nothing has been indexed for 0.1.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
game:
github: mswieboda/game_raylib
version: ~> 0.1.1Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
game
Game wrapper library internally using cray (RayLib bindings to Crystal).
Installation
- Add the dependency to your
shard.yml:
dependencies:
game:
github: mswieboda/game
- Run
shards install
Usage
For now this is basically just an object-oriented wrapper around Cray/RayLib functionality.
Eventually will include more concepts such as a Viewport, basic Player or Player Controllers, UI messages, loading/saving, and other miscelleneous concepts to assist developing a game.
See the examples examples/hello_world.cr and examples/shapes.cr on how to use the provided classes.
Inherit your main game project class from Game to enable the RayLib setup and game loop.
require "game"
class FooGame < Game
def initialize
super(
name: "FooGame",
screen_width: 1024,
screen_height: 768
)
end
def update(frame_time)
end
def draw
end
end
FooGame.new.run
Game#run will initialize RayLib, and begin the game loop, calling Game#update and Game#draw which are meant to be overriden with your game and drawing logic. Use the built-in classes to draw with using #draw or call drawing methods directly with LibRay (available via the cray shard dependency).
def draw
# use built-in classes created in `initialize` or elsewhere to draw, such as `Rectangle`
@rectangle.draw
# or call LibRay draw methods directly
LibRay.draw_rectangle(x: 30, y: 30, width: 100, height: 25, color: Color::Red.to_struct)
end
Note: Since many features are currently WIP, interacting with LibRay directly is a valid option.
Development
- [ ] API docs
- [ ] auto docs with tools like https://crystal-lang.org/api and other crystal shards
- [ ] host on github pages, or heroku, etc
- [x] Game (core)
- [x] basic window: title, size, fullscreen (moving to Window)
- [x] basic setup: FPS, audio
- [x] basic game loop: running? frame time, update, draw wrapper, draw
- [x] set drawing mode 2D/3D
- [ ] specific sprite pre loading
Game#load_spritesmethod to override - [ ] specific sound pre loading
Game#load_soundsmethod to override
- [ ] Window
- [ ] Monitor
- [ ] Clipboard
- [ ] Cursor
- [ ] Input
- [x] Keys
- [x] Mouse
- [ ] Gamepad
- [ ] Touch
- [ ] Camera for 2D
- [ ] Viewport
- [x] Color
- [x] Vectors
- [x] Vector
- [x] Vector3
- [x] Shapes
- [x] Shape parent class
- [ ] collision detection
- [x] Pixel
- [x] Line
- [x] Circle
- [x] Ellipse
- [x] Ring
- [x] Rectangle
- [x] Square
- [x] Triangle
- [x] Polygon
- [x] Shape parent class
- [x] Textures
- [x] Loading images from files
- [ ] Loading images from code, data,
- [x] Loading Texture (into GPU memory) from file or image
- [x] Sprites
- [x] Animated Sprites
- TODO:
- [ ] reverse
- [x] pause/stop
- TODO:
- [x] Text
- [x] Loading Fonts
- [x] Drawing Text with Fonts
- [x] Sound
- [ ] Loading Wave
- [x] Loading Sounds
- [x] Play, stop, pause, resume
- [ ]
- [ ] Entity (for inheriting game objects with functionality)
- [ ] implement children/parent, generic containers
- [x] SpriteEntity
- [x] ShapeEntity
- [ ] 3D
- [x] Camera
- [x] Model
- [x] Mesh
- [ ] Shaders
Contributing
- Fork it (https://github.com/mswieboda/game/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Matt Swieboda - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Feb 5, 2021
- Commit
7ec9de84167d- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/mswieboda/game_raylib
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 42