Skip to content
/ cringu Public

A framework for libSDL on crystal, inspired by ippa/chingu

Notifications You must be signed in to change notification settings

cringu/cringu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Cringu

Join the chat at https://gitter.im/cringu/cringu

A game framework for libSDL2 on crystal, inspired by ippa/chingu.

Cringu Header Image

Installation

Will be here soon.

Add this to your application's shard.yml:

dependencies:
  cringu:
    github: cringu/cringu

Usage

require "cringu"
require "../cringu"

WWIDTH = 800_f64
WHEIGHT = 600_f64
LAYERS_ENABLED = true

class Square < GameObject
  property size = 80_f64
  def update
    f = rand(0.1..0.9)
    Graphics.draw_block(@pos.x * f, @pos.y * f, @size * f, BasicColor.sample);
  end
end
5.times do
s = Square.new
s.pos.x = (WWIDTH / 2 - s.size / 2) * rand(0.1..0.9)
s.pos.y = (WHEIGHT / 2 - s.size / 2) * rand(0.1..0.9)
s.manage
end
NGine.setup WWIDTH, WHEIGHT
NGine.start

Development

TODO: Write development instructions here

Contributing

  1. Fork it ( https://github.com/cringu/cringu/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

A framework for libSDL on crystal, inspired by ippa/chingu

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published