pixelfaucet
Version, currently 0.2.311 versions
- 0.2.3latestJan 19, 2026
- 0.2.0not indexedFeb 22, 2026
- 0.0.10not indexedFeb 22, 2026
- 0.0.9not indexedFeb 22, 2026
- 0.0.7not indexedFeb 22, 2026
- 0.0.6not indexedFeb 22, 2026
- 0.0.5not indexedFeb 22, 2026
- 0.0.4not indexedFeb 22, 2026
- 0.0.3not indexedFeb 22, 2026
- 0.0.2not indexedFeb 22, 2026
- 0.0.1not indexedFeb 22, 2026
github.com/SleepingInsomniac/pixelfaucet
PixelFaucet Game "engine"
Installation
# Add this to your shard.yml
dependencies:
pixelfaucet:
github: SleepingInsomniac/pixelfaucet
version: ~> 0.2.3Then run:
shards installshard.yml
- Crystal
1.3.2- License
- MIT
- Author
- Alex Clink
Dependencies
Runtime Dependencies
README
PixelFaucet Game
PixelFaucet is a "Game Engine" written in the Crystal programming language and uses SDL under the hood to create a window, draw pixels, and expose hardware interfaces.
See the examples.
The examples can either be run with crystal run examples/<name>.cr from the root of the repo, or be all built by running the ./scripts/build_examples.rb script. This will place the binaries in the examples/build folder.
Setup
PixelFaucet requires the crystal compiler which can be installed via homebrew
- Install crystal
brew install crystal
- Install sdl3
brew install sdl3
brew install sdl3_image
- Create a new project:
crystal init app my_game
- Add the dependency to your
shard.yml:
dependencies:
pixelfaucet:
github: sleepinginsomniac/pixelfaucet
version: 0.2.2 # Or the current version
- Run the shards command:
shards install
Usage
The engine works be subclassing the PF::Game which requires two methods be defined:
require "pixelfaucet"
class Static < PF::Game
# Called every game tick
def update(delta_time : Time::Span)
end
# Called at a rate to satify `fps_limit` (Float::INFINITY by default)
def frame(delta_time)
window.lock do
window.clear
window.each_point { |p| window.draw_point(p, PF::RGBA.random) }
end
end
end
e = Example.new(100, 60, 5)
e.run!
Drawing methods come from PF2d. PF::Window`` and PF::Spriteimplement thePF2d::Canvas(PF:RGBA)` module which provides methods for drawing points, lines, rects, circles, bezier curves, triangles, and more.
Documentation
Run crystal docs to generate documentation. The documentation can then be found under the docs folder.
Contributing
- Fork it (https://github.com/sleepinginsomniac/pixelfaucet/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
- Alex Clink - creator and 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.2.3- Tagged
- Jan 19, 2026
- Commit
827fda484c16- Crystal
1.3.2- Indexed
- yes
Dependents
Repository
github.com/SleepingInsomniac/pixelfaucet
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 11