A 2D game engine written in Crystal using crsfml
This library aims to offer a simple interface for game programming with less boilerplate code. I mainly create it for my own games, for my own education and of course for the fun.
- Event system
- Configurable input handling
- Universal 2D Vector class
- Entity-Component-System architecture
- Configuration manager
- Asset manager with hot-reloading
- Inbetweening
- Tiled map support
- Some builtin components and systems
- Sound manager
- Video playback
You can find examples in the examples directory. To run an example, execute the following command in your terminal, while in the root directory of this repo:
crystal run examples/<example-name>/main.cr
# e. g.
crystal run examples/hello_world/main.cr
Add this to your application's shard.yml
:
dependencies:
scar:
github: vypxl/scar
branch: main
If you run into build/linking problems, please check if you have SFML installed properly, as described in the CrSFML Guide. You do not need to add CrSFML as a dependency!
Feature requests are welcome, just open an issue!
- Create an [Feature Request] Issue
- Fork it ( https://github.com/vypxl/scar/fork )
- (optional) Create the git hook checks via
$ scripts/create-git-hooks
- 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 and mention your issue
You have to ensure that crystal spec
and crystal tool format --check ./src ./spec
return 0.
- vypxl vypxl - creator, maintainer