https://twitter.com/mcclure111/status/501577286463008768 https://twitter.com/mcclure111/status/501577443648757760
Direct link: Guys who are evidently wearing RCP shirts? https://twitter.com/LaurieSkrivan/status/501461969417678848
require 'rubygems' | |
require 'gosu' | |
require 'chipmunk' | |
class Window < Gosu::Window | |
def initialize | |
height = 900 | |
width = (height.to_f*16/9).to_i | |
fullscreen = false |
module CP | |
module Shape | |
class Poly | |
# return an array of all vertices | |
def verts | |
out = Array.new(self.num_verts) | |
self.num_verts.times do |i| | |
out[i] = self.vert(i) | |
end | |
https://twitter.com/mcclure111/status/501577286463008768 https://twitter.com/mcclure111/status/501577443648757760
Direct link: Guys who are evidently wearing RCP shirts? https://twitter.com/LaurieSkrivan/status/501461969417678848
/home/ravenskrag/.rvm/gems/ruby-2.0.0-p247/gems/gosu-0.7.50/lib/gosu/swig_patches.rb:37: [BUG] Segmentation fault | |
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0004 p:---- s:0012 e:000011 CFUNC :show | |
c:0003 p:0007 s:0009 e:000008 METHOD /home/ravenskrag/.rvm/gems/ruby-2.0.0-p247/gems/gosu-0.7.50/lib/gosu/swig_patches.rb:37 | |
c:0002 p:0226 s:0006 E:001118 EVAL ./main.rb:152 [FINISH] | |
c:0001 p:0000 s:0002 E:0000a8 TOP [FINISH] | |
./main.rb:152:in `<main>' |
Program received signal SIGSEGV, Segmentation fault. | |
0x00007ffff7aad9c8 in st_lookup (table=0x7ffff7b02c70 <env_free>, key=key@entry=6016, | |
value=value@entry=0x7fffffffd210) at st.c:341 | |
341 st.c: No such file or directory. | |
(gdb) backtrace | |
#0 0x00007ffff7aad9c8 in st_lookup (table=0x7ffff7b02c70 <env_free>, key=key@entry=6016, | |
value=value@entry=0x7fffffffd210) at st.c:341 | |
#1 0x00007ffff7b05bb7 in search_method (id=6016, klass=26081240) at vm_method.c:374 | |
#2 rb_method_entry_get_without_cache (id=6016, klass=26081240) at vm_method.c:393 | |
#3 rb_method_entry (klass=26081240, id=6016) at vm_method.c:426 |
/home/ravenskrag/.rvm/gems/ruby-1.9.3-p448/gems/gosu-0.7.50/lib/gosu/swig_patches.rb:37: [BUG] Segmentation fault | |
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0005 p:---- s:0014 b:0014 l:000013 d:000013 CFUNC :show | |
c:0004 p:0011 s:0011 b:0011 l:000010 d:000010 METHOD /home/ravenskrag/.rvm/gems/ruby-1.9.3-p448/gems/gosu-0.7.50/lib/gosu/swig_patches.rb:37 | |
c:0003 p:0316 s:0008 b:0008 l:001368 d:001fd8 EVAL ./main.rb:149 | |
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH | |
c:0001 p:0000 s:0002 b:0002 l:001368 d:001368 TOP |
$window.gl z do | |
glPushMatrix() | |
glTranslatef(self.body.p.x, self.body.p.y, 0) | |
glBegin(GL_TRIANGLE_FAN) | |
glColor4ub(color.red, color.green, color.blue, color.alpha) | |
iterations = 60 # maybe high iterations cause crashes? | |
rotation_angle = 2*Math::PI / iterations # radians | |
rotation_vector = CP::Vec2.for_angle rotation_angle |
numbers = (1..10).to_a # array of numbers 1-10 inclusive on both ends | |
numbers.detect {|i| i % 2 == 0} # first value divis by 2, starting from the front | |
numbers.reverse_each.detect {|i| i % 2 == 0 } # start from the rear instead |
@animation["my_animation"].fade_in(5.frames) do |influence, time| | |
# influence = Current influence [0..1] | |
# time = milliseconds since the fade started [0..timeout] | |
# Result of this block becomes the influence for the next frame | |
# After the time specified, this track will be disabled | |
a = 1 | |
b = 1 |
$ env GOSU_RELEASE_VERSION='0.7.44' rake linux:gem --trace | |
rake aborted! | |
can't modify frozen String | |
/usr/lib/ruby/1.9.1/rubygems/version.rb:191:in `strip!' | |
/usr/lib/ruby/1.9.1/rubygems/version.rb:191:in `initialize' | |
/usr/lib/ruby/1.9.1/rubygems/version.rb:178:in `new' | |
/usr/lib/ruby/1.9.1/rubygems/version.rb:178:in `create' | |
/usr/lib/ruby/1.9.1/rubygems/specification.rb:2092:in `version=' | |
/home/ravenskrag/GameDev/gosu/Rakefile:30:in `apply_gemspec_defaults' | |
/home/ravenskrag/GameDev/gosu/rake/linux.rb:27:in `block (2 levels) in <top (required)>' |