2012年12月15日 星期六

GDC China 2012

GDC China 2012:MDA
Sissy fight
mechanics: how to play, rule
Dynamic : game circle- equal to scourge
Aesthetics : what is interesting part. fellowship, challenge(tactics, problem solving), narrative (drama)

Playtesting and metrics: getting the most out of your usability testing

Testing
In a week recruit player outside
Testing

Learn what are player doing.
Why players do things
Player feeling

Isolate player
Designer/producer behind them.

Datalogging
Significant - record status -upload to db ex: player dead

In testing phase
100% record
In release
10%

Benefit:
Find game imbalance
Find Economic imbalance
Find excessive high failure are
Find weapon imbalance

Drawback
Communication with design
Give designer direct access
Rapid reporting
Data analysis is time consuming
Technical concerns on post release
- sampling rate
-massive amount
-storage capability
-analysis time
Data logging works best with a single programmer.
Verify QA has adequate time
Rely on player

Real time survey modification :survey monkey

Data overload

Tableau: visualization software

EA: the business of art production - 7 critical precepts
Scanning zbrush
Character : dns mapping light map, reflection map
average 5 artists in one game

Manage artists
1. Clarity
Should only one target
Reference can plentiful, not target
If possible visual target should put in the game

2. Iteration
Speed? As fast as your can think
Fast enough to visual explore
Safe enough to allow experiment
Not require other to initiate

3. Feedback
Usual, consumer, peers
Timeline: concept phase (12weeks
Preproduction 7month), entering production. Per-alpha.
Feedback should be early and frequent

4. Standards
Head1.0, head2.0
One format convert to many platform. Format, method, vocabulary

5. Pipeline
上海, 印度,奧蘭多,溫哥華。
Maya.
Pipeline compete
Don't just build by your own
Confirm everything is down before outsourcing

6.orgniaztion
Need smooth communication

7.sevices
If you hire smart people, he want to do everything, we should let service provider or expert do. Capture team in Vancouver, 2 motion capture,80 cameras


Ubisoft Shanghai start to develop mobile platform, stop the relation with Gameloft.

Production value:
Story, atmosphere, character, unique flavor, epic moment, rewards, buzz, polish

Receive professional playtesting report
It is easier to hand over iPhone to somebody.

Agile but Scrum

Pipeline: See modification without waiting anyone

Version checking, and would download through wifi.

Production: First playable presentation in keeping the practice of designing the core game play.
1st 30min player experience

Validation: something playable every 2 weeks at least.

Stages
Concept
Preproduction
Production
Launch/soft launch
Post launch

Concept: prototype, know the game engine

Preproduction: focus on control, camera / character , sign and feedback.
Insist reviewable version everyday
Real data driven at least 2 core feature
Never believe a feature will be be polish / graphics / fps will be better in last month

Production/soft launch
Priority and ready cut functions

Mobile project: motivation
Clear objective
Everybody understand and agree
Build the communication, everybody contribute their idea on game design.

Small steps in the dark, embracing the continuous prototyping

Prototype: an interactive experiment

Conventional prototype: 2-24 weeks, help understand the game , demo and video

Jamestown
21 m dev
3 full time developer
Custom engine 5 month using Flash

Purpose of prototype
- fiill the gap of kinwledge
- destruct magic trick
- camera , weapon, pacing

One code base to every platform

Prototype outcomes
Unified vision and concept

Porting to new engine in 2 weeks
Survived many algo and design

The problem?
Problems keep appearing, even after 2-24 weeks
Too many assumptions
Prototype should be continue

When you innovate, new unexpected question will show up

The hardcore game rising
Cmune: investor Skype, rovio

7m registered
1.3 MAU

5 lessons in 5yrs(from 5 people)
1. Listen your mind, console game is big market
FPS multi billion game genre
1/4 are fps in Facebook game

2. Never underestimate new platform

3. Never underestimate the complexity to do cross platform games
Keep learning: your client 20 people
Unity difficult to master, easy to prototype. Plugin install experience can be optimized. Content release is a part of growing a game
Invest your the worth community.

Prediction: 1,.core gaming will be top grossing on web/social
2. Immersive console like game
3. Cross platform
4. New leaders from Asia/china
5.game as service will allow global communities to connect, learn and create

iOS / android Facebook maybe decrease more and more user. Wanna transform from pc play to web to mobile. Facebook wanna provide more support because many user leave from here.

The last 10%- from naughty dog
Polish: Remove, find affect

-Gameplay related issues
-Presentation issue
-fix we tend to statue quo

Shoot for perfect

Schedule
Per production production alpha beta gold

Allocate 20-25% to polish in schedule.

Rapid iteration
Aim a pipeline with fast iteration time
Direct communication with people.
Don't assume it will get fix with an email .
Encourage Collaborative

Don't fear change

Rolling deadlines:
Too many overlap,

Tiered approvals
Multiple people must approve as you go
A high level person looking for polish daily
Balance polish vs time
Understand what to look for

Htm5

Focus social : pvp, social cooperation
9 yrs
Html5 games market

Did casual game and get success

1-day retention >30%
Draw something like get 1M users

Game IV
1.complex layered strategy /optimization

2. Monetization
Speed up not energy
More resource / units more revenue

Update
HTML 5 always keep up to date
Native app do not that will affect balance

3. Social
Really social pvp trading chatting
Sending resource

Pvp in focus

Hattrick - soccer manager game

Time sensitivity
PVP cross platform can

HTML5
Enable fast prototype

6.passion required

@henricgames

The iteration treadmill

Productivity
Time lost waiting for builds

Quality
More tweaking
Asset testing in game

Ambition goal
See change immediately

No cheating
Target hardware+ target frame rate

Fast games. Fast workflow

Work in smaller chunk, resource be compiled separately, and upload runtime.

Running game listen on tcp/ip port
Message are JSON

Issues
Deploy to console
File transfer not adapted for sub second upload

Sol: a file server on PC-console load app files from here

big resource:
Compile slowly
Separate them

Slow resource
Light map, navmeah
Separate baking from compiler

Reload code
C++ tool support reload exe

A compiler database
Shader depends on another shader.
Store information from pervious .

Check binary version, if mismatch recompile

調叫三國
Android earn more money than iOS .
You can earn 200-300w rmb/m in Android

One key register
Login via sns: QQ, 微博

Uncharted 3 effects
2005 in naughty dog

Scheme based macro language
Uberabader

Process split btw ppu spu
Complexity in ppu and than in spu

New system iteration time
- fast iteration == more effect

Shader flexible

100% asynchronous spu

DC data compiler
Particle - dc data - DC - network - engine - display

Noodler shader editing
Vertex frontend define input attribute

Output into ex: normal
Each node are cg function
Automatically split into vs &fs
Automatic space conversation
Made artist manage their cycle
need programmer help artist

Spawner
Charter
Water: use to follow surface move

Gpu cycle is limited for particle
Less particle but more process form one particle

Preupdate: sort collision
Update:
Cull:
Build geometry
Sort
Render list
Use byte code: 16 vector register, create and update

Cull build geom
Cull view frustum

Sorting
Spawn order good than distance sort, sort for emitter set
Reverse spawn sort

Want to run on all spus
Don't want to have ppu

Sand
Deform surface
Animate the deformation
Match lighting with background
Sample depth buffer to particle space, and than will project on the sand
Ztest disable cull front face
Transform world to particle
Add wpos and invScale factor to vertex shader

U3 use partially deferred rendering
Use stencil value to avoid drawing on FG

@Candance_Walker


2012年12月2日 星期日

振奮!! 堅持自己的想法,然後說服別人

今天早上收信聽到一個振奮的消息,三天前我在開發者論壇抗議關於API設計上的問題,雖然有很多人給了我折衷的方法,但我還是堅持我的作法是最佳solution,"如果我們有最佳的方法,為什麼要委屈自己用不是這麼好的作法?"。越來越多人贊同我的意見... 過了一天的安靜~ 終於,我們讓API往前進步了一步...雖然英文不是很好,但是心是與世界並齊的。感謝Flash論壇的開發者們,今天我們讓世界變的更好。

Ernesto Sirolli: Want to help someone? Shut up and listen!



當你想要幫助一個人時,最重要的就是聽他說話。
當世界遭遇到 糧食、交通、能源等等問題,能幫我們解決問題的並不會是政府、大學,而會是企業家。

企業家要怎麼尋找出來,就是單獨地聽他說話。企業家不會在眾人面前公開說他想要做甚麼,怎麼賣他的商品。他需要的是能夠提供他資源的人,能夠給他信任感,給他隱私、熱情和貢獻給他的人。

所有歷史的統計上,沒有一間公司或企業家,從頭到尾都依靠一個人做了所有的設計產品、製造產品、銷售產品等工作。

他需要的是夥伴~~~在Richard Branson的自傳中前兩頁,沒有半個字是"I",但卻出現了32個"We"。

2012年11月30日 星期五

Direct3D Drawing in WPF

In Windows8, you can use SurfaceImageSource, VirtualSurfaceImageSource, SwapChainBackgroundPanel to let DirectX content into a XAML app.

Visual Studio 2010 has removed Microsoft.DirectX support, so if we wanna use D3D in WPF, we need to leverage SlimDX or SharpDX.

However, when you use older Windows version, ex: Win7, WinXP, you only can adopt D3DImage.

D3DImage Lock, unLock image, and copy backbuffer to this image.




You can download the sample code here: https://github.com/DaoshengMu/WPFd3dImageCpp


http://www.gamedev.net/topic/619534-wpf-directx-11-via-d3dimage/

http://www.notesonsoftware.com/directx/initializing-directx-9-drawing-in-wpf/

http://code4k.blogspot.tw/2011/03/benchmarking-cnet-direct3d-11-apis-vs.html

http://www.codeproject.com/Articles/28526/Introduction-to-D3DImage

http://social.msdn.microsoft.com/forums/en-US/wpf/thread/22a83db9-e903-49a5-815b-0647f157bda6

http://www.codeproject.com/Articles/351939/SurfaceImageSource-Manager-Connecting-Csharp-and-D

http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2644759-provide-better-directx-support-in-wpf

http://msdn.microsoft.com/en-us/library/cc656785.aspx

http://msdn.microsoft.com/en-us/library/windows/apps/hh825871.aspx


2012年11月28日 星期三

Flash constrained mode: Targeted at devices that only support PS_2.0 level shaders like the Intel GMA 9xx series



Earlier versions of FlashPlayer 11 support hardware rendering for devices manufactured after 2008. The constrained mode extends this support to all devices released since 2005. 

How does it work?
In order to make your application work in constrained mode you just should set the second parameter of stage3D.requestContext3D() when requesting the context, in the following way:

stage3D.requestContext3D(Context3DRenderMode.AUTO, Context3DProfile.BASELINE_CONSTRAINED);

Targeted at devices that only support PS_2.0 level shaders like the Intel GMA 9xx series.

  • You are limited to 64 ALU and 32 texture instructions per shader.
  • Only four texture read instructions per shader.
  • No support for predicate register. This affects sln/sge/seq/sne, which you replace with compound mov/cmp instructions, available with ps_2_0.
  • The Context3D back buffer must always be within the bounds of the stage.
  • Only one instance of a Context3D running in Constrained profile is allowed within a Flash Player instance.
  • Standard display list list rendering is driven by Context3D.present() instead of being based on the SWF frame rate. That is, if a Context3D object is active and visible you must call Context3D.present() to render the standard display list.
  • Reading back from the back buffer through Context3D.drawToBitmapData() might include parts of the display list content. Alpha information will be lost.

Reference:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display3D/Context3DProfile.html

http://blog.alternativaplatform.com/en/2012/09/05/constrained-mode-support/


2012年11月11日 星期日

Top 5 - Game Engines Of The Future

2012年10月21日 星期日

Android take picture, crop picture, select picture by using intent

Take Picture
public static Uri takePhoto( Activity act )
 {
  //Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
  //act.startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);
  
  Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
  Uri mImageCaptureUri = Uri.fromFile( new File( Environment.getExternalStorageDirectory(), "tmp_contact_" + String.valueOf(System.currentTimeMillis()) + ".jpg") );
  
  cameraIntent.putExtra( android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri );
  
  try
  {
   cameraIntent.putExtra( "return-data", true);
   act.startActivityForResult(cameraIntent, PICK_FROM_CAMERA);
  }
  catch( ActivityNotFoundException e )
  {
   
  }
  
  return mImageCaptureUri;
 
 }
Crop Picture
@Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      // TODO Auto-generated method stub
    super.onActivityResult(requestCode, resultCode, data);
      
      if ( resultCode != RESULT_OK )
      {
       File f = new File( _imageCaptureUri.getPath() );
       if ( f.exists() )
       {
        f.delete();
       }
       
       return;
      }
      
      switch ( requestCode )
      {
      case CameraCaptureAPI.CROP_FROM_CAMERA:
       
       final Bundle extras = data.getExtras();
       
       if ( extras != null )
       {
        final Bitmap photo = extras.getParcelable("data");
        
         AlertDialog.Builder alert = new AlertDialog.Builder(this);                 
         alert.setTitle( getString( R.string.confirm ) );  

          alert.setPositiveButton( R.string.confirm, new DialogInterface.OnClickListener() {  
             public void onClick(DialogInterface dialog, int whichButton) {  
              
              PictureUploadAPI.uploadPicture( photo, ProfileViewActivity.this );
             }           
               
           });  

           alert.setNegativeButton( R.string.cancel, new DialogInterface.OnClickListener() {

                 public void onClick(DialogInterface dialog, int which) {
                     // TODO Auto-generated method stub
                        
                 }
             });
                     
             alert.show();
       
       }
       
       File f = new File( _imageCaptureUri.getPath() );
       if ( f.exists() )
       {
        f.delete();
       }
      
       break;
      
      case CameraCaptureAPI.PICK_FROM_FILE:
      Intent intent = new Intent( "com.android.camera.action.CROP" );
      _imageCaptureUri = data.getData();
      intent.setDataAndType( _imageCaptureUri, "image/*"); //!!! important
      intent.putExtra("outputX", 96);
      intent.putExtra("outputY", 96);
      intent.putExtra("aspectX", 1);
      intent.putExtra("aspectY", 1);
      intent.putExtra("scale", true);
      intent.putExtra("return-data", true);
      
      try
      {
         startActivityForResult(intent, CameraCaptureAPI.CROP_FROM_CAMERA);
      }
      catch ( Exception e )
      {
       Log.d("pick picture", e.getMessage());
      }
      
      break;
      
      case CameraCaptureAPI.PICK_FROM_CAMERA:
      Intent intent1 = new Intent( "com.android.camera.action.CROP" );
      intent1.setDataAndType(_imageCaptureUri, "image/*"); //!!! important
      intent1.putExtra("outputX", 96);
      intent1.putExtra("outputY", 96);
      intent1.putExtra("aspectX", 1);
      intent1.putExtra("aspectY", 1);
      intent1.putExtra("scale", true);
      intent1.putExtra("return-data", true);
      
      try
      {
         startActivityForResult(intent1, CameraCaptureAPI.CROP_FROM_CAMERA);
      }
      catch ( Exception e )
      {
       Log.d("pick picture", e.getMessage());
      }
      
      break;
      }
     }
Select Picture
 Intent intent = new Intent( Intent.ACTION_GET_CONTENT );
 intent.setType( "image/*" );
           
 try{
      startActivityForResult( intent, CameraCaptureAPI.PICK_FROM_FILE );
 }
 catch( Exception e )
 {
     Log.d("browse picture", e.getMessage());
 }

http://www.technotalkative.com/android-launch-native-camera-application-to-capture-image-and-use-it-inside-imageview/

2012年10月14日 星期日

The San Francisco Games Revolution Is Over

舊金山一直都是產業革命的出生地,遊戲曾經是他們最感興趣的投資項目,Facebook、iOS、Android、Social game,甚至後來的Gamification應用無不都帶來了巨大的成功。不過它已經被改變了:
Social: 被過於高估,不持久。
Price: 開始有了削價競爭。
Scale: 規模太大,平台太多。
Behaviourism: 有些模式沒辦法一直反覆使用,玩家發覺後,這東西價值就變低了。

最後的競爭利器: Graphics! Graphics! Graphics! 九零年代到2006年,Graphics一直都是工作室彼此的主要競爭項目,成本不斷被堆高,到了現在竄出頭的mobile game、social game,還是要靠Graphics來決鬥。

不過誰又能知道下一代的舊金山遊戲革命會是甚麼呢?


2012年10月12日 星期五

Performance tips on JavaScriptV8

2012年10月7日 星期日

中國手機上網用戶行為研究

中國大陸使用手機上網的行為研究: 中國大陸使用手機上網的比例已經超過70%,特別是1~3小時的破碎時間,如果仍在做桌上型裝置的網路遊戲我個人覺得有點堪憂。不過他研究的手機上網行為內,遊戲並沒有排進他的排名,可見想用手機上網玩遊戲的比例亦不高(但另外一篇則排進10%),再者如果有看網路女王的趨勢分析,其實另外一點需要再挑戰,就是ARPU還是有3:1的差距...

http://www.docin.com/p-414448925.html
http://www.cnnic.cn/hlwfzyj/hlwxzbg/ydhlwbg/201209/P020120917506527612622.pdf


2012年10月6日 星期六

Android GridView ImageAdapter

public class ImageAdapter extends BaseAdapter {
 
 private Context _context = null;
 private PhotoItem[] _photoArray = null;
 
 public ImageAdapter( Context ctx, PhotoItem[] imageArray )
 {
  _context = ctx;
  _photoArray = imageArray;
 }

 @Override
 public int getCount() {
  // TODO Auto-generated method stub
  return _photoArray.length;
 }

 @Override
 public PhotoItem getItem(int pos) {
  // TODO Auto-generated method stub
  return _photoArray[ pos ];
 }

 @Override
 public long getItemId(int position) {
  // TODO Auto-generated method stub
  return 0;
 }

 @Override
 public View getView(int pos, View convertView, ViewGroup parent) {
  // TODO Auto-generated method stub
  View gridView;

  if ( convertView == null ) // if it's not recycled, initialize some attribute
  { 
   LayoutInflater vi = (LayoutInflater) _context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   gridView = vi.inflate( R.layout.image_item, null);
   
   ImageView imageView = (ImageView)gridView.findViewById( R.id.imageItemView );
   imageView.setImageDrawable( _photoArray[ pos ].getPhoto() );
  }
  else
  {
   gridView = (View)convertView;
  }
 
  return gridView;
 }

}

http://www.mkyong.com/android/android-gridview-example/

2012年9月27日 星期四

AMD CodeXL: OpenGL and OpenCL Debugger and Profiler


AMD CodeXL is a new tool for OpenGL and OpenCL developers. CodeXL includes a GPU debugger, a profiler for both GPU and CPU and offers OpenCL kernels analysis capabilities. CodeXL is available as a standalone application for Linux (64-bit) and Windows (32 and 64-bit). An extension for Visual Studio is also available. http://developer.amd.com/tools/hc/CodeXL/Pages/default.aspx

2012年9月26日 星期三

Android customized button

drawable/ return_btn.xml values/ style.xml

Create drawable/return_btn.xml in drawable folder


      
     
     

Create values/style.xml in your value folder


    

Add ReturnButton style in your layout
http://jp-lin.blogspot.tw/2010/12/android.html

2012年9月23日 星期日

SQLite

MesaSQLite可以幫助讀入及編輯*.sqlite

讀入已存在的sqlite
    
 private static final String DB_PATH  = "/data/data/com.xxx.xxx/databases/";
 private static final String DB_NAME  = "xxx.sqlite";

 SQLiteDatabase database = this.getReadableDatabase();
  
 try {
  //Open your local db as the input stream
   InputStream myInput = ctx.getAssets().open(DB_NAME);
  
   // Path to the just created empty db
    String outFileName = DB_PATH + DB_NAME;
  
     //Open the empty db as the output stream
     OutputStream myOutput = new FileOutputStream(outFileName);
  
      //transfer bytes from the inputfile to the outputfile
         byte[] buffer = new byte[1024];
      int length;
      while ((length = myInput.read(buffer))>0){
       myOutput.write(buffer, 0, length);
      }
  
      //Close the streams
      myOutput.flush();
      myOutput.close();
      myInput.close();
  
        
  } catch (IOException e) 
  {
      throw new Error("Error copying database");
  }
          
     database.close();

2012年9月11日 星期二

Chat List show/hide keyboard

    
_chatList.setOnTouchListener( new OnTouchListener()
{

      @Override
      public boolean onTouch(View v, MotionEvent event) {
      // TODO Auto-generated method stub
       (
           //close keyboard
            (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(
            _chatText.getWindowToken(), 0);

            //open keyboard
              ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(chatText,
                        InputMethodManager.SHOW_FORCED);

     return false;
 }
         
});

http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard

2012年8月27日 星期一

Head in the Clouds: The reasons of OnLive's failure


  • OnLive的最高同時上線人數大概1800位,註冊用戶2萬人。但是OnLive每個月卻有五百萬美金的的服務開銷。想想每個使用者平均要花多少錢才能回本,這是一個失敗的business model。
  • 錯誤的策略,這些console主機仍然是被玩家使用中的。OnLive卻仍想要賣服務給這些已經有主機的玩家。
  • 網路頻寬問題: 許多註冊用戶被發現他們並沒有去依照OnLive的需求來升級頻寬。
  • 如果你給一個人免費服務,他們會覺得這東西的價值是比較低的,遊戲主機的business model會運作的原因是當你購買了一台主機,用戶會想證明自己的投資是對的就會購買更多的遊戲。但對於OnLive的用戶因為沒花到錢,所以也不急著要付費投資他,包含去申請符合OnLive要求的網路頻寬。
  • OnLive的針對用戶是core gamer和搶先玩家。但是他們不會滿意OnLive的performance,包含lag和畫面失真等不可避免由於網路頻寬造成的結果。OnLive所提供的軟體不是最熱門最新的遊戲,這些核心玩家是不會有興趣的,反而這樣的服務會吸引casual玩家(對於最新遊戲或是購買最新硬體沒這麼熱衷的玩家),但這種玩家通常頻寬不會太好。
  • 本身的硬體更新每次費用都會非常昂貴。
  • 它不是console平台的掌握者,它沒辦法掌握硬體的升級,說服玩家只要用低規的硬體就可以遊玩高級的遊戲。
  • 隨著Graphics processor越來越便宜和精巧,以及效能越來越好。越來越多輕薄的手機終將會超越現今的console,然後在家裡的TV上用它們遊玩高級遊戲。
  • 當一切策略錯誤後,沒有將目標鎖定到專一特殊的領域。例如,Gaikai專精提供game demo服務。

Reference:

2012年8月25日 星期六

Android: Async-Http library


Android Asynchronous Http Client
A Callback-Based Http Client Library for Android
http://loopj.com/android-async-http/

Http Send:

// http send
AsyncHttpClient _clientPost = new AsyncHttpClient();

RequestParams params = new RequestParams();
params.put( "type", "" + type );
params.put( "text", message );
  
if( CookieManager.getInstance().getCookie(HttpAPI.uriAPI) != null )
{
     String cookieStr = CookieManager.getInstance().getCookie(HttpAPI.uriAPI);
           
     _clientPost.addHeader( "Cookie", cookieStr );
}
   
_clientPost.post( addr, params, new AsyncHttpResponseHandler() 
{
   @Override
   public void onSuccess(String response) 
   {
     try 
     { 
     
     }
      catch (JSONException e) 
      {
     
      }
       
   }

});

Http Get:

// http get
AsyncHttpResponseHandler _responseHandler = new AsyncHttpResponseHandler() 
{
  @Override
  public void onSuccess(String response) 
  {
  
  }
};

if( CookieManager.getInstance().getCookie(HttpAPI.uriAPI) != null )
{
   String cookieStr = CookieManager.getInstance().getCookie(HttpAPI.uriAPI);
           
   _clientGet.addHeader( "Cookie", cookieStr );
}
   
_clientGet.get( addr, responseHandler );

2012年8月23日 星期四

Build OGRE with dependency

Dependence file Updated 19 Aug 2012 is not work.
Boost link error for OGRE 1.8 build

http://blog.csdn.net/hackbuteer1/article/details/6597710

2012年8月21日 星期二

WebGL - Three.js + impactJS



http://asmallgame.com/labsopen/webgl_impact/

Using three.js to render a game made with impactJS and box2D

2012年8月18日 星期六

Android chat room copy/delete text

// long press click
@Override
public boolean onItemLongClick(AdapterView arg0, View arg1,
     final int pos, long id) {

                // AlertDialog can try to move to global variable, can avoid to multiple creating.
                AlertDialog.Builder dialog = new AlertDialog.Builder(ChatActivity.this);
                dialog.setTitle(getResources().getString(R.string.selection));
                
                String strCopy = getResources().getString(R.string.copy);
                final String strDel = getResources().getString(R.string.delete);
                
                String[] options = { strCopy, strDel };  // copy and delete items
                
                DialogInterface.OnClickListener actionListener = new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                      switch (which) {
                      case 0: // Copy
                       String copyTxt = _list.get( pos ).getText();
                       
                       //place your TextView's text in clipboard
                       ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); 
                       clipboard.setText(copyTxt);
                       
                        break;
                        
                      case 1: // Delete
                       AlertDialog.Builder delete = new AlertDialog.Builder(ChatRoomActivity.this);
                       delete.setTitle( strDel );
                       
                          // if confirm to del item, remove it from list and update adapter
                       delete.setPositiveButton( R.string.confirm,  new DialogInterface.OnClickListener() {  
                              public void onClick(DialogInterface dialog, int whichButton) {  
                               _list.remove( pos );
                               _chatList.setAdapter(_adapter);  
                              }  
                          });  
                       
                       delete.setNeutralButton( R.string.cancel, null );
                       delete.show(); 
                      
                        break;
                      
                      default:
                       Toast.makeText( ChatActivity.this, "undefine this type in ChatActivity", Toast.LENGTH_LONG ).show();
                        break;
                      }
                    }
                  };
                  
                dialog.setItems(options, actionListener);
                
                // end AlertDialog create
                  
                dialog.show();

       return true;
         
  }

為自己爭氣──群聯電子十年318億元的創業故事



昨天我從圖書館裡了這本書回家閱讀,一個月內要歸還...

今天第一次翻開這本書閱讀,整本書p.238我看了p.56頁。我停了下來。因為這本書讓我熱情澎湃,如果不停下來,可能下禮拜就遞辭呈了。

有幾個觀點很值得我們記住,在此筆記下來:
  • 這本書百分之五十的版稅捐給交大校友會,另外百分之五十捐給兒童扶助基金會...這決定太棒了,因為年輕學子一定是未來的希望,我們要多幫助他們。
  • 當初潘健成董事長從馬來西亞來台灣交大唸書,其實也很平凡的想說畢業後回馬來西亞工廠上班,一個月領個三萬元,實在沒想說要創業。
  • 他在研究所的時候替教授所開的公司做事,常常沒什麼時間去上課,這間公司在未上市公司潛力曾經位居第二名,不過管理階層出了問題。很多都是高層的親戚,朋友。甚至一個主管跟他說,我們不賺錢也沒關係,只要把我們募資來的好幾億元放到銀行生利息就夠了,要不然就是六塊買進DRAM再12塊賣出可以翻賺一倍。....這種不是在認真經營公司而是在玩金錢遊戲的例子,也促成了潘董對於他日後群聯電子所警惕的。
  • 第一筆大生意是做成全球第一顆USB快閃記憶體系統控制單晶片。後來發現成品比較好賺就開始做隨身碟。
  • 年輕很難給別人信任,但如果你言之有物且做的東西是好的,對方反而會記得你。成功的定義:今天的成功是由於昨天做了對的事情,在每天做很多對的事情,那每天都是做的很成功。
  • 28歲時候被前公司控告侵權,公司的資金被扣押,董事長去拜託合作夥伴能夠將現金能夠提早付給他們,積極地面對媒體,最後終於和解。科技公司難逃侵權,遭到Sandisk告侵權,不像其他廠商跟著和解,因為不甘本業被收取權利金,最後也打贏了。
  • 找保護傘,引進重要股東。找上東芝,它替他們解決了很多難關,讓外界直覺群聯很厲害,無論是資金與專利上。但在東芝的保護緩衝期,仍然要不斷地補專利。
  • 持續為善,賺錢本來就是要花,但要花在該做的地方,幫助年輕人念書、創業,讓越來越多人能夠替社會帶來希望。
  • 以技術發展為基礎,挑正值長期耕耘的客戶。遇到小廠以劣質品競爭,放掉大中華區,找真正有品牌的客戶。做生意就像待人處世,不佔客戶便宜,賣貴了,下張訂單要還給他。
  • 創業夥伴,找可以長久的夥伴,創業有成後,一起打天下的夥伴也沒有分開。在學校認識的朋友是最好的,夥伴選對了麻煩也就少了。

2012年8月13日 星期一

PlayCanvas WebGL 3rd Person Multiplayer Demo

D.E.M.O. screenshot

       WebGL再度做出驚人的表現,PlayCanvas的人員花了
兩個禮拜製作。這個demo與以前不一樣的是做到了multiplayer,支援mouse lock, full screen,在Chrome還支援gamepad。Chrome真的是一個很適合發展HTML5的平台。對於有1.3 billion的潛在玩家,並且相較於triple-A專案的開發成本低的HTML5 platform,能不趁早涉入嗎?

Source code: https://bitbucket.org/playcanvas/scifi
Reference:
http://playcanvas.com/a-multiplayer-3rd-person-shooter-in-html5/
http://www.html5gamedevelopment.org/html5-demos/2012-08-playcanvas-webgl-3rd-person-multiplayer-demo?utm_source=twitterfeed&utm_medium=facebook

2012年8月11日 星期六

Introduce to Chrome plugin


In this diagram, it describes how was the Chrome been designed. If we want to develop some plugins on Chrome, we have several ways.
  1. First, we could use NPAPI which Firefox also follow it interface. (Out of process plugin)
  2. Second, we could choose to write NaCI which support native code( C/C++) be compiled to nexe and be executed on the Chrome sandbox, it would bring some performance benefits because we could enjoy the performance from native code. NaCI provides PPAPI which is different from NPAPI because PPAPI is in order to focus on high performance for 3D/2D rendering, and Google has recommended it to Mozilla but Mozilla not yet decided to support it.
  3. Third, Chrome has some in-Process-plugins that are internal plugins. They could enjoy the PPAPI .

Flash player on Chrome
Chrome provides the Flash Player Pepper in order to let chrome be convenient to maintain and keep it is secure. BTW, Chrome make it be in-process-plugin type and utilize PPAPI in rendering. Flash Player Pepper is different to Adobe Flash Player which use NPAPI interface.

Chrome wants to use PPAPI to involve NaCI, Flash Player and WebGL, because they all support OpenGL ES 2.0. However, it restricts the future of Flayer Player on Chrome due to Stage3D is still possible to support D3D11. With NPAPI based flash player on Windows:  Stage3D->AGAL->DirectX->SwiftShader, but with PPAPI based one: Stage3D->AGAL->OpenGLES2->IPC channel->OpenGLES2->DirectX->SwiftShader, there are a lot of tasks be translated, therefore, it would bring performance hit.

Layout engine:
  • Chrome: Webkit
  • Firefox: Gecko

 Reference:
http://www.chromium.org/nativeclient/getting-started/getting-started-background-and-basics#TOC-Pepper-Plugin-API-PPAPI- 
http://www.chromium.org/developers/design-documents/pepper-plugin-implementation
http://blogs.adobe.com/flashplayer/tag/chrome-flash-player-pepper
http://docs.unity3d.com/Documentation/Manual/nacl-gettingstarted.html


2012年8月10日 星期五

Android: progress dialog and thread

//不顯示title

ProgressDialog _progressDialog = ProgressDialog.show(

               FriendListViewActivity.this, "", getString( R.string.progressing )

               , true, false );

//顯示title

ProgressDialog _progressDialog = ProgressDialog.show(

               FriendListViewActivity.this, "title mssage", getString( R.string.progressing )

               , true, false );

//建立執行緒
        new Thread(){ 
            @Override
            public void run(){ 
                try{
                    //可改為欲執行的程式碼
                    Thread.sleep(5000);
                }
                catch (Exception e){
                    e.printStackTrace();
                }
                finally{
                    pDialog.dismiss(); //關閉dialog
                }
            }
        }.start(); //開始執行緒

//如果有欲修改到UI的內容部分,加上
runOnUiThread(new Runnable() { // Correct!! 
    public void run() {
        //modify View object
  textView.setText("test"); 
     }
});

Reference:
http://kerkerj.twgg.org/2012/04/android-thread-ui-update.html

2012年8月8日 星期三

OpenGL 4.3 spec and Adaptive Scalable Texture Compression Extension (ASTC)

Aug.6th is the 20th anniversary for OpenGL. Khronos revealed OpenGL4.3 spec and compression texture format -ASTC in Siggraph 2012.

ASTC:
http://www.geeks3d.com/20120806/opengl-4-3-and-opengl-es-3-0-adaptive-scalable-texture-compression-extension-astc/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheGeeksOf3d+%28The+Geeks+Of+3D%29

OpenGL4.3 spec has been released:
http://www.geeks3d.com/20120806/opengl-4-3-specifications-released-advanced-computation-with-compute-shaders/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheGeeksOf3d+%28The+Geeks+Of+3D%29

http://www.opengl.org/registry/doc/glspec43.core.20120806.pdf

OpenGL 4.3 compute shader:
http://www.geeks3d.com/20120806/opengl-4-3-compute-shaders-details/?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheGeeksOf3d+%28The+Geeks+Of+3D%29

2012年7月27日 星期五

Turbulenz WebGL Engine using Quake 4 assets

2012年7月26日 星期四

Photoshop Overlay




Target: lower layer texture
Blend: upper layer texture

Overlay = (Target > 0.5) * (1 - (1-2*(Target-0.5)) * (1-Blend)) +
(Target <= 0.5) * ((2*Target) * Blend)

http://www.binary-artist.com/photoshop_tutorials/layer/photoshop_layer_blend_mode_overlay.php

http://blog.deepskycolors.com/archivo/2010/04/21/formulas-for-Photoshop-blending-modes.html

2012年7月21日 星期六

年輕人該負起的責任

這幾年來確實台灣的經濟環境變得很差,如果說是失落的十年,那我們這十年錯過了什麼?

1980-90 年代,台積電, 宏碁, 華碩替台灣建立了半導體以及個人電腦的經濟體,讓台灣賺進了大量的外匯,也擠身亞洲四小龍,那時也奠定了科技島的美譽。那時的時空背景會這麼成功的原因是我們與國際接軌了,我們在跟美國矽谷的創新作了一樣的事情,我們走的是朝陽的產業,是未來獲利十分看好的產業。

2000年代,.com網路產業興起,從美國湧起的Yahoo, eBay,這時台灣沒有缺席,Kimo, yam, PChome帶領台灣面對挑戰,雖然後來Kimo被Yahoo收購, yam變得比較沒這麼影響力,PChome後來經過幾次轉型變成大型的網路購物平台,這些網路公司都帶來台灣非常優秀的研發能量,這些技術力一樣是跟國際接軌的。

2005年左右,Web走向2.0時代,內容分享變成重點,搜尋引擎龍頭Google在矽谷發跡,中國大陸的百度也在之後藉由主打中國市場也被創立了,Youtube讓大家上傳有趣的影片,電腦桌變成家裡的客廳,中國出了土豆網,台灣也出了個無名小站,一群還沒畢業的交大學生讓台灣發光發熱,在這個平台上捧紅了很多網路作家。

2008年開始,社群網路崛起,Facebook席捲全球,中國人人網,日本mixi相繼出頭。台灣這次沒有人成功。或許是國內人口數沒這麼多,社群網站發展不起來。不過人口數,文化背景並不是絕對先天上的劣勢,Rovio在2011憑著Angry bird席捲全球,芬蘭國家只有500萬人,我們有2000萬人口,我們一定也有機會!

2010年,智慧手機的App經濟體被蘋果賈伯斯所建立完成。全世界的人都對它開啓了掏金夢,Rovio因為Angry bird市值56億英鎊,Instagram 十億美金被Facebook收購, Omgpop因為DrawSomething被Zynga以2.1億收購。這次台灣尚未發生一個巨額的併購案,或是因為App而締造一個產業,不過周遭很多聲音都在努力着,期待他們成功的發生。

創新的事業是由年輕人所創造的,如果年輕人過得很辛苦而又不肯站出來突破,告訴世界我們要的是怎樣的生活,那又有誰能保證你十年後會過得怎樣呢? 如果是不敢冒險,那麼二三十年前的年輕人又有誰能成功呢?我們現在能過的尚有一定水準其實是他們給的...以前的年輕人或許害怕未來會與對岸戰死而勇敢冒險,而我們卻因為害怕失敗而不敢冒險,勇敢點~~放手一搏吧!就算一百個人只有一個人成功,成功的人還是會張開雙手歡迎失敗者的,因為他知道在挑戰未來的路途中,我們是一起走過來的夥伴。

2012年7月17日 星期二

Texture compression on GPU


  1. Reduce texture memory size, it can reduce gpu memory bandwidth to read texture while rendering, and compressed format can have better performance because it use less memory.
  2. Fast decompress, it compressed on the GPU card, and while rendering it be decompressed at least once per frame.
  3. Fast random access,  if a texture cover a mesh but the mesh just can be seen on one side, GPU will only decompress the part of texture which can be seen. Therefore, if we do well in Hidden Surface Removal that can help us reduce GPU card loading.

old D3Dnew D3DOpenGLD3D supportOpenGL support
DXT1BC1S3TC6.0EXT_texture_compression_s3tc
DXT3BC2S3TC6.0EXT_texture_compression_s3tc
DXT5BC3S3TC6.0EXT_texture_compression_s3tc
ATI1BC4RGTC110.03.0 (or via extension)
ATI2BC5RGTC210.03.0 (or via extension)
-BC6HBPTC_FLOAT11.04.2 (or via extension)
-BC7BPTC11.04.2 (or via extension)
Reference: http://renderingpipeline.com/2012/07/texture-compression/
http://www.cnblogs.com/luming1979/archive/2013/02/04/2891421.html

2012年7月13日 星期五

Mobile design matters - iOS and Android


Mobile design matters - iOS and Android
View more presentations from Light Lin

2012年7月10日 星期二

Friend fumction in C++ class

// in the header file

void changeVar();   // define it.

class testFriend

{

friend void changeVar();  // declare it

private:

     int m_i;

}

// in the cpp file

void changeVar( testFriend&i )  // implement it

{

   i.m_i++;

}

// in the main file

int main()

{

 testFriend test;
 changeVar(test);

}

2012年7月9日 星期一

Android ListView pull to refresh library


http://erikw.eu/open-source-android-pull-to-refresh-library/

2012年7月4日 星期三

Google I/O 2012 - GRITS: PvP Gaming with HTML5

2012年6月25日 星期一

大學時候的專題:進化城市

Haxe: One language, everywhere.

http://haxe.org/
Haxe (pronounced as hex) is an open source programming language
While most other languages are bound to their own platform (Java to the JVM, C# to .Net, ActionScript to the Flash Player), Haxe is a multiplatform language.

2012年6月21日 星期四

Blogger顯示特殊符號

http://01mistery.blogspot.com/2009/07/htmlcode.html

2012年6月19日 星期二

Mac can't detect your Android device

http://www.mkyong.com/android/android-debugging-on-real-device/
http://stackoverflow.com/questions/7135999/adb-not-finding-my-device-phone-macos-x

adb kill-server ; adb devices

If you installed EasyTether, it will interfere with ADB, you should disable EasyTether. 

Disable EasyTether:
sudo kextunload /System/Library/Extensions/EasyTetherUSBEthernet.kext 
   
Enable EasyTether:
sudo kextload /System/Library/Extensions/EasyTetherUSBEthernet.kext

2012年6月17日 星期日

美国手机及平板电脑用户游戏习惯

Reference: 
http://gamerboom.com/archives/55146

平板电脑已成为比手机更受欢迎的游戏设备,在同时拥有手机和平板电脑的用户中,有58%受访者玩平板电脑游戏的时间多于玩手机游戏,40%受访者表示自己更少在手机上玩游戏。

2012 22%玩家表示自己每周在这类游戏中投入时间达3小时左右,而2011年的这一玩家比例则是14%。同时拥有平板电脑和手机的用户每周游戏时间甚至更长。Kindle Fire和iPad等平板电脑在过去12个月中为移动领域引进了1100万新玩家。

虽然玩家在这些游戏中的平均消费额已从2010年的29.21美元降至2011年的21.24美元,但平板电脑游戏玩家同一时期的平均消费额却从 20.37美元增长至25.47美元。从总体上看,同时拥有两种设备的玩家更具盈利性,他们过去两年中在此类游戏中平均投入达34.57美元。

Game Developer Magazine in May 2012

Reference: 
http://studioirregular.blogspot.tw/2012/06/game-engine.html
http://gamasutra.com/view/news/169846/Mobile_game_developer_survey_leans_heavily_toward_iOS_Unity.php

Game Developer Magazine:
53% 移動裝置遊戲開發商表示正在使用或是即將採用 Unity3D 遊戲引擎。14% 的開發商使用 Unreal Engine,另外有 10% 使用 cocos2d。
銷售成績最頂尖的開發商當中,39.8% 使用自行開發的遊戲引擎。
Game developer magazine 的調查還有一項:每五位開發商有 4.45 位使用遊戲引擎的首要原因是為了加快開發速度。

Kingdom Rush 的開發商回答了開發相關的細節,他們的 web 版本使用 Flash ActionScript 開發
  • 沒有使用像是 PushButton 之類的 flash game engine,而是自行開發塔防專用 (tower defense) 遊戲引擎。
  • 僅使用三套小小的 3rd party library,看起來其他部分都是自行開發。

Ellis:
       使用套裝引擎是可以幫助遊戲快速開發,並且節省研發成本。但通用引擎帶來的代價就是效能沒辦法針對特定遊戲類型做有效率的優化,以及部分遊戲操作及玩法上需要加以特化產生專屬的feature時,使用套裝引擎會有一定難度來辦到。

2012年6月10日 星期日

Android ProgressDialog

When you want to wait some wasting time function, and show dialog, you will need ProgressDialog


http://bend-ing.blogspot.tw/2008/11/properly-handle-progress-dialog-in.html
http://lp43.blogspot.tw/2010/08/progressdialog.html

Android get C2DM registration_id


  1. Emulator doesn't support it
  2. Your device must later than Android 2.2
  3. Have log-in Android market first
  4. Eclipse use Google API 2.2, not Android SDK2.2
  5. Registration_id max_size is 4096 byte 
Important: C2DM has been officially deprecated as of June 26, 2012. This means that C2DM has stopped accepting new users and quota requests. No new features will be added to C2DM. However, apps using C2DM will continue to work. Existing C2DM developers are encouraged to migrate to the new version of C2DM, called Google Cloud Messaging for Android (GCM). See the C2DM-to-GCM Migration document for more information. Developers must use GCM for new development. 

https://developers.google.com/android/c2dm/


2012年6月3日 星期日

我們需要的是世界級的網路公司

這張表是網路女王Mary在2010年的研究報告。看了這張表我有了以下幾個想法:
  1. 網路產業環境是很激烈的,在六年內霸主換了將近一半。
  2. 中國網路公司大躍進,從2004年一家到現在有了三家。
  3. 2004年的領先群有兩家遊戲公司(Shanda, NcSoft),ㄧ家遊戲平台(NHN)。 [NHN同時也有搜尋服務平台],到了2010年專門的網路遊戲開發公司不見了,易主成兩家遊戲平台(Tencent, NHN)。
  4. 雖然領先群很多都易主了,但是大家總市值其實都成長了兩倍,營收甚至是漲了五倍。 
網路的產業在過去十年是在爆發性成長的,中國大陸整個很積極的進入了世界的領先群,我們自己台灣也該多多認真對待這個產業,它才是整個國家應該投資的未來經濟,一個爆發性的產業走對了,營收六年內增加五倍,想想看他可以替國家帶來多少進步。

國內可以共同協力打造一個遊戲平台,目標是像騰訊那樣,可以讓許多開發公司在此讓產品上架,節省通路,節制盜版,整合大家的金流。一個專屬的網路平台上面的廣告效益一定很大,又能夠幫助許多台灣認真打拼的遊戲開發商。我覺得現在的台灣遊戲界需要的不是遊戲營運商,我們需要的遊戲社群平台。

再者,網路這個產業本身就是高知識密集的,可以大幅度減少環境污染與土地消耗,甚至不尋常的製造業輪班制,這才是國家該選擇的產業轉型吧...

新的遊戲Business Model

以前可能人們會覺得單機遊戲通路是個負擔,盜版也是個問題,積怨過久,製作端往往放棄了製作單機遊戲的熱忱。但現在好的遊戲還是經得起考驗,以往id software帶起的share software方式,現在革新成現在這個形態。

Humble Indie Bundle,優秀的獨立開發者共同將受到玩家歡迎的作品協力販售,在三天內已經賣出33萬套。一套平均售價7.82美金,支援Linux, Windows, Mac。再者購買時其實只是買到其中的四款遊戲,但如果你的出價比平均售價高!就能夠得到第五款遊戲,如此產生了網路競標行為,售價會越來越高,我前天看的時候平均售價是7.67USD。
http://igdshare.org/content/humble-indie-bundle-v

2012年6月1日 星期五

Mary Meeker's 2012 annel internet trend report

KPCB Internet Trends 2012

2012 KPCB Internet Trends Year-End Update

來看看網路女王Mary所整理的趨勢,簡單提一下:

  1. 我們活在一個正在進化的時代,以前習以為常的習慣到了這兩三年都換了面貌。 
  2. Desktop internet與mobile internet的用戶數已經出現黃金交叉了,但是收益比還是將近3:1,所以mobile市場還有很大的爆炸潛力被開發。
  3. Android的市場成長幅度是iPhone的四倍(2012年底是六倍)。
  4. 從行動電話轉換到智慧手機的用戶群還有六倍的潛在客戶。
  5. 使用電子閱讀器的成年人三年內從2%變成29%
  6. 行動裝置的上網速度每年都在成長進步,今年更是成長了10%
  7. Mobile device的出現其實幫助了eCommerce的成長。
  8. 全球行動裝置的 App+Ad三年內成長15倍。
  9. 廣告的投注在行動裝置上目前相對偏低,未來會大幅增進,並且行動裝置使用數也會成長。
  10. 廣告在行動平台上的有效曝光度顯得偏低,需要找一個好的方式。
  11. 使用者在行動平台的消費金額比桌上裝置而言弱了三倍。
  12. iPad達到兩千萬台的時間(一年)只花了iPhone的一半。