0.0
No release in over a year
Glimmer Snake game cross-platform desktop GUI application built with Glimmer DSL for LibUI to run on Mac, Windows, and Linux. Gem ships with glimmer_snake script for launching game.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 2.4.9
~> 3.5.0

Runtime

 Project Readme

Glimmer Tetris Icon Glimmer Snake 1.0.1

Gem Version

Snake game that runs on Mac, Windows, and Linux. Built with Ruby and Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library) using Application Scaffolding.

glimmer-dsl-libui-mac-snake.gif

Setup

Assuming you have Ruby installed (standard MRI / CRuby).

Run:

gem install glimmer_snake

Usage

Run:

glimmer_snake
Mac Windows Linux
glimmer-dsl-libui-mac-snake.png glimmer-dsl-libui-mac-snake-game-over.png glimmer-dsl-libui-windows-snake.png glimmer-dsl-libui-windows-snake-game-over.png glimmer-dsl-libui-linux-snake.png glimmer-dsl-libui-linux-snake-game-over.png

The goal of the game is for the green snake to eat the red apple and to survive for as long as possible. The snake always moves forward at a fixed speed. You can change the direction of the snake using arrow keys (Up is North, Right is East, Down is South, Left is West). Every time the snake eats an apple, it grows by 1 block (the size of the apple), and the apple regenerates somewhere else. If the snake hits its own body (especially after enlargement), it dies. Pressing the spacebar pauses/unpauses the game.

The game remembers the highest score by storing in ~/.glimmer-snake. You can delete that file if you want to reset the highest score.

Development

Clone project:

git clone https://github.com/AndyObtiva/glimmer_snake.git

Change directory:

cd glimmer_snake

Install project gems with Bundler:

bundle

Run application with glimmer command:

glimmer run

Or run using included binary script:

bin/glimmer_snake

Package as a Ruby gem with glimmer command:

glimmer "package:gem"

Or package using equivalent direct rake command:

rake build

Generate updated gemspec with glimmer command:

glimmer "package:gemspec"

Or generate gemspec using equivalent direct rake command:

rake gemspec:generate

Contributing to glimmer_snake

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

TODO

TODO.md

Change Log

CHANGELOG.md

Copyright

MIT

Copyright (c) 2023 Andy Maleh. See LICENSE.txt for further details.

--

Built with Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development Cross-Platform Native GUI Library)

Glimmer Snake icon made by Freepik from www.flaticon.com