[過去ログ]
Ruby でなんかゲームつくる (121レス)
Ruby でなんかゲームつくる http://mevius.5ch.net/test/read.cgi/gamedev/1205141142/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
114: 名前は開発中のものです。 [sage] 2009/12/08(火) 17:12:18 ID:feD2TaiO 拾い物てとりす 画像1.bmp 2.bmpを適当に用意、 サイズは縦横20px require"dxruby" b=[[-1,0,0,0,1,0,0,-1],[0,0,0,1,0,2,1,1],[0,0,1,0,2,0,1,1],[0,0,0,1,0,2,-1,1], [0,0,0,1,0,2,1,2],[0,0,1,0,2,0,0,1],[0,0,1,0,1,1,1,2],[0,0,1,0,2,0,2,-1], [0,0,1,0,2,0,2,1],[0,0,0,1,0,2,1,0],[0,0,1,0,2,0,0,-1],[0,0,0,1,0,2,1,2], [0,0,1,0,1,1,2,1],[0,0,1,0,0,1,1,-1],[0,0,1,0,1,1,2,1],[0,0,1,0,0,1,1,-1], [0,1,1,0,1,1,2,0],[0,1,0,0,1,1,1,2],[0,1,1,0,1,1,2,0],[0,1,0,0,1,1,1,2], [0,0,0,1,0,2,0,-1],[1,0,2,0,3,0,0,0],[0,0,0,1,0,2,0,-1],[1,0,2,0,3,0,0,0], [0,1,1,1,1,0,0,0],[0,1,1,1,1,0,0,0],[0,1,1,1,1,0,0,0],[0,1,1,1,1,0,0,0],] g=[Image.load("1.bmp"),Image.load("0.bmp")];z=Input; t=b[(c=rand Y=5+X=8+x=y=2)%27];q=(0..Y).map{(0..X).map{0}} def n(q,t,x,y,o=1)4.times{|i|q[x+t[i*2]][y+t[i*2+1]]=o}end def v(q,t,x,y)4.times{|i|return nil if q[n=x+t[i*2]][m=y+t[i*2+1]]==1||m==Y||n==X||n<0};1 end Window.loop{c+=1;n(q,t,x,y,0);(a=(b.index(t)+1)%28)%4<1?a-=4:0 v(q,b[a],x,y)?z.keyPush?(57)?t=b[a]:0:0;n=z.keyPush?(205)?1:z.keyPush?(203)?-1:0 v(q,t,x+n,y)?x+=n:0;v(q,t,x,y+1)?z.keyDown?(208)&&c%3<1?y+=1:0:(n q,t,x,y;t=b[c%27];x=y=2) c%50<1?v(q,t,x,y+1)?y+=1:0:Y.times{|i|f=1;X.times{|k|f=nil if q[k][i]==0} X.times{|k|q[k].delete_at i;q[k].unshift 0}if f};n q,t,x,y X.times{|i|Y.times{|k|2.times{|u|q[i][k]==u ?Window.drawEx(i*20,k*20,g[u]):0}}}} http://mevius.5ch.net/test/read.cgi/gamedev/1205141142/114
115: 名前は開発中のものです。 [sage] 2009/12/08(火) 17:13:27 ID:feD2TaiO 画像0.bmoと1.bmpだ http://mevius.5ch.net/test/read.cgi/gamedev/1205141142/115
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.657s*