Posts

Showing posts from April, 2013

Porting a HTML5 game to mobile platform

Image
When I read the article from Michal Budzynski that teaches me the first lesson "How to make a HTML5 game", and I try to let it also can be played fun on mobile devices. Here is the link I put on my Github: https://github.com/DaoshengMu/Simple-game-with-HTML5-Canvas/tree/master/mobile Link: https://dl.dropboxusercontent.com/u/75721204/Html5/mobile/index.html Different screen size You must define different item-size for supporting different screen size. Therefore, you need to write the CSS file, CSS provides px, %, em to adjust the item size. "px" is absolute pixel of the screen. "%" means percentage of the font size. For example, your browser default font size is 12 point, 80% means you use 9.6 point. "em" is the m letter size, it has the same meaning as "%", if your em is 0.5 that means your item is 6 point. Put the mobile.css in your index.html, and define the media(resolution) you want to support. media="s

WebGL: How to write portable WebGL

Image
WebGL has been occupied about 67% users' devices. Now, it is a big chance to do some innovative works on it. http://webglstats.com/ http://codeflow.org/entries/2013/feb/22/how-to-write-portable-webgl/

架設Gerrit和Git

Image
Gerrit是對於Git的一種使用Web-based的code-review管理工具。 管理者可以透過網頁的介面管理project與reviewer。 設定方式有點複雜,我個人本身花了三天,而且還找到翻譯文章拼命試,後來才發現找錯方向。 整理一下目前可能的裝設方法: 使用OpenID OpenID是由一些大型的網站所提供(ex: google, Yahoo...),可以透過他們的介面取得我們的使用者帳號,利用此法可以登入我們架設好的Gerrit,但是對於企業專案不打算使用外部帳號的需求上這點就不實用。這種架設方法Gerrit官方號稱只需要十分鐘就可以完成,不過我還是花了半小時... http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/install-quick.html 首先替我們的ubuntu創建一個user: $ sudo adduser gerrit2 $ sudo su gerrit2 下載Gerrit,我這次很乖照文件載了較舊版本 2.2 A list of releases available Link to the 2.2.2 war archive 安裝Gerrit gerrit2@host:~$ java -jar gerrit.war init --batch -d ~/gerrit_testsite Generating SSH host key ... rsa(simple)... done Initialized /home/gerrit2/gerrit_testsite Executing /home/gerrit2/gerrit_testsite/bin/gerrit.sh start Starting Gerrit Code Review: OK gerrit2@host:~$ 確認Gerrit restart是否ok gerrit2@host:~$ ~/gerrit_sites/bin/gerrit.sh restart Stopping Gerrit Code Review: OK Starting Gerrit Code Review: OK gerrit2@host:~$ 修改canonica

Porting C++ apps to FLASCC

Porting C++ apps to FLASCC from Pavel Nakaznenko