小塌客

石头的博客

蛋人网EGGMAN.TV上线啦

有好多年没有更新博客了,那是因为我在攒大招,我们的项目最近上线了 http://eggman.tv 蛋人网,一个在线的Ruby/Rails/Web开发学习平台。

因为我自己做Ruby有近10年了,我们的定位就是Ruby, Rails和Web开发方面的,模式就是采用类似于railscast的方式,定期推出视频课件,有付费和免费的,以后的内容会扩展到mongodb,erlang和react。

程序员创业,希望大家能多多支持提意见,有想法的朋友也可以联系我mytake6@gmail.com

BalloonsRush 节奏气球

我的第二个iPhone游戏,属于休闲类型的,节奏气球(BalloonsRush).

 

balloonsrush

 

 

内容提要

♧可爱的动物气球按键反应游戏,27种不同的动物气球,清新可爱的纸片风格,不同的动物气球对应不同的按键顺序组合,你有一分钟的时间,你能折好几个气球呢,来试试吧!

♧简单易上手,游戏共有4种类型的按键:左,上,下,右。不同的气球对应不同的按键组合,比如企鹅气球对应的按键顺序是左左上右,那么你需要依次快速按下对应的按键来折好气球;而且还有组合按键,组合按键需要你同时按下两个按键。

♧狂热模式,每次折好一个气球时狂热槽就会增长,当狂热槽加满时会进入狂热模式,这时倒计时会暂停,这会给你赢取更多的时间。

♧连击数,正确按键次数越多连击数就越高,而连击数越高,狂热槽增长的会越快,努力确保按键快速又正确吧!

♧♧
- 27种动物气球(部分需要解锁)
- 清新可爱的纸片风格
- 连击数设定
- 狂热模式设定
- 本地最高分记录
- 支持游戏中心

 

balloonsrush

 

balloonsrush

 

 

balloonsrush

 

http://itunes.apple.com/cn/app/balloonsrush/id556799396

 

The Story of Ship Fall

The Ship Fal is the first iphone game i have developed, now it has been submitted to app store, and still in waiting for review for almost two weeks, and Ship Fall is an paid app for $1.99.

 

As a huge fan of Halo series, in Halo 1, The Pillar of Autumn is the main warship of human being, in chinese it is 秋风之墩, that's the Ship Fall name comes from, all because the love of Halo:)

 

And of cause, Ship Fall is based at a science background, and the story is: Year 2147, the power resource on the earth is on the edge of being exhausted! People desperately need a replacement to survive. Airship Ship Fall is sent out to the unknown universe to find more power resource. Luckily, the ship arrived a dark planet named Dark Cave, it find the resource blue minerals, meanwhile, the unknown and danger is waiting for Ship Fall...

 

http://www.ccok.me/photo/image/84/medium/Screenshot_2012.08.08_16.17.52.png

 

In Ship Fall, you need to collect the blue minerals in a limited time to finish evey map, and there're many kinds of minerals will help you to achieve the map if you got them, and the game is in a black style, it's very like the XBLA game Limbo, Limbo is an awesome game, and i love this style, so i made Ship Fall this way too.

 

http://www.ccok.me/photo/image/85/medium/2012-08-13T15-27-18_0.jpg

 

And i'm planning to make Ship Fall 2, and make Ship Fall to become a series, and the story will continue, so hope you like Ship Fall, and enjoy Ship Fall, if you have an idea please put a comment here, when this game is ready for sale, i will let you know:)

 

Ship Fall - 秋风号

丢掉iphone开发有两年时间了,最近又捡了起来,同时看了下cocos2d,由于之前研究过html5的游戏开发,所以cocos2d上手还比较快,做了一个游戏,Ship Fall, 秋风号,类型属于科幻背景的动作解谜游戏,风格类似于Limbo,黑暗风格的,玩过Halo的朋友在看到这个名字后应该都感觉有点似曾相识,Halo 1代中人类的主力战舰叫秋风之墩,其实我是halo的忠实脑残粉丝,所以就用了这个名字,已经提交app store审核了,处于waiting for review快一个星期了,希望能一次通过...

 

http://www.ccok.me/photo/image/84/medium/Screenshot_2012.08.08_16.17.52.png

 

http://www.ccok.me/photo/image/85/medium/2012-08-13T15-27-18_0.jpg

 

http://www.ccok.me/photo/image/86/medium/Screenshot_2012.08.08_16.21.32.png

 

http://www.ccok.me/photo/image/87/medium/Screenshot_2012.08.08_16.24.06.png

 

Mongodb sharding环境中update问题

在MongoDB Sharding环境中如果update操作没有命中sharding key的话可能会遇到无法更新的问题,问题就在于这种update必须是multi-updates,就是需要指定multi-updates的参数为true(默认情况下mongodb只会更新命中的第一条数据),,而在官方文档中这点并没有提到,后来通过在mongodb google group中发帖讨论后,才知道这点,之后官方文档也马上更新了,

 

Sharding Introduction

db.foo.update( { age : 40 }, Updates without the shard key must be multi-updates

 

虽然mongodb一直在不停的推出版本的更新,但问题还是比较多的,目前已经支持的一些功能虽然在官方文档都有描述,但是一旦遇到细节处理的地方还是没有解决办法的

 

shell中字符串排序

在shell中对一列数据排序可以使用sort,但是默认shell中是不支持对一个字符串排序的,但可以通过其它命令来完成,比如: 对一个字符串每个字符进行排序:
#echo "hello" | grep -o . | sort -n | tr -d "\n"; echo
对字符串以指定字符分隔进行排序:
#echo "00 12 02 01 23" | tr -s " " "\n" | sort -n | tr -s "\n" " "; echo