Showing posts from 2011

LLVM introduction

LLVM introduction View more presentations from Jim Huang Getting Started with the LLVM System   Getting Started: Building and Running Clang

Google: Native Client Getting Started

Getting Started: OpenGL tutorial

Google: Native Client

Support the x86-32, x86-64 and ARM instruction sets. NaCl started as a downloadable NPAPI plugin for multiple browsers, including Firefox, Safari, Opera and Chrome and was designed to transparently load and run other NPAPI plugins compiled as nexes. Download sdk: Native Client: A Sandbox for Portable, Untrusted x86 Native Code:

Problem of Titanium sdk install Android SDK

Install Android SDK to Titanium in windows you may occur some problem: Could not loacate the android sdk titantium Add empty folder "android-7" into "$ANDROID_SDK/platforms/", copy your android sdk folder's content into "android-7". ( for ex: "android-13" to "android-7" ) [ ERROR ] Required jarsigner not found [ ERROR ] Required javac not found [ ERROR ] Required java not found [ ERROR ] One or more required files not found - please check your JAVA_HOME environment variable JAVA_HOME = C:\Program Files\Java\jdk1.7.0_01 But JDK is needed 1.6, reinstall JDK 1.6 and set JAVA_HOME = C:\Program Files\Java\jdk1.6.0_29

Optimizing Graphics Performance on iOS/Android

iOS: 遵守可視的vertex數目限制: 40K - iPhone 3GS以後的新裝置(with SGX GPU) 10K - 較舊款的裝置(with MBX GPU) 如果可能要採用lighing shader,vertex lit會是比較好的選擇 盡可能share material,減少不同material的數目 非會移動的物件,指定為靜態物件會帶來最佳化 使用PVRTC格式或是16bit textures 盡量使用single pass pass的效果 盡可能降低shader floating point的精確度 減少使用複雜的shader指令 在pixel shader-pow , sin , cos   盡量避免使用pixel lighting,頂多一盞(推薦方向光為主) 不要使用動態光源當非必要時 -- 使用lightmap會比較好 在pixel shader貼圖使用越少越好 避免用alpha-testing,用alpha-blending取代 非必要時不要使用fog 盡可能使用Occlusion culling以達到節省draw call次數。  使用skyboxes來模擬遠方景物。 Android: 如果可能要採用lighing shader,vertex lit會是比較好的選擇 盡可能share material,減少不同material的數目 非會移動的物件,指定為靜態物件會帶來最佳化 使用ETC1 格式或是16bit textures 使用mipmaps 盡量使用single pass pass的效果 盡可能降低shader floating point的精確度 減少使用複雜的shader指令 在pixel shader-pow , sin , cos   盡量避免使用pixel lighting,頂多一盞(推薦方向光為主) 不要使用動態光源當非必要時 -- 使用lightmap會比較好 在pixel shader貼圖使用越少越好 避免用alpha-testing,用alpha-blending取代 非必要時不要使用fog 盡可能使用Occlusion culling以達到節省draw call次數。  使用skyboxes來模擬遠方景物。 Referenc

Adobe AIR on mobile platform

Today I port my Flash Player version 3D engine to Adobe AIR, in order to support Android/iOS platform. Because my engine has been done on the PC/Web, so we can't aware performance penalty easily, now I forward to mobile platform, they have limit resource. We need to more optimize our engine. Because iOS version has been convert AS3 to native code, so I believe and found game loop and render loop are not the critical part. The GPU processing part is the issue. We have done several things, I list them on the bottom: ( improving the fps from 4 to 26 ) Resize our texture size, smaller is better. Reduce redundant shader instruction, especially pixel part. We remove the fog and alpha-test part ( for supporting alpha-test, we use 'kil' - it's very evil ) Disable lighting and shadow map. Currently, event-listener is not the issue. Continuing we want to try disable mipmap, it may help us improve current performance. OpenGL ES Programming Guide for iOS: http://developer

id Software releases Doom 3 source code source code: Doom 3: BFG Edition source code: code review:

Visual authoring of HTML5 user interfaces - in the browser!

Maqetta is an open source project that provides WYSIWYG visual authoring of HTML5 user interfaces. The Maqetta application itself is authored in HTML, and therefore runs in the browser without requiring additional plugins or downloads.

shadow map self shadowing artifact

Detection Mobile device browser: User Agent Sniffing Use javaScript detect the keywords of User Agent Sniffing

Quake 3 porting on Andorid

This is a port of Quake3 to Android.


Google I/O 2011: WebGL Techniques and Performance

The math library I'm using TLD or 3D library File at WebGL math benchmarks WebGL based on OpenGL ES 2.0 with zero extention world *viewProj mtx reduce draw call --- use one large buffer limits 64,000 polygons per draw call index primitive 16bit particle library on WebGL wiki (This one which is more stand alone And this one which is integrated with the TDL library ) (Library presented in the video is named ThreeD Library. You can find it on googlecode. You can use ThreeJS which is much, much easier, and then there is SparksJS for particles in ThreeJS.  Thanks, Mackovy ) limits 3D textures not be support. spread it out into a 2D texture Post Processing WebGL2D.js never call gl.get anything while render // don't touch render buffer while rendering

Google I/O 2011: Building Game Development Tools with App Engine, GWT, and WebGL


Starling Framework - The GPU powered 2D Flash API

Some articles about AS3 optimization

狂怒煉獄(RAGE) - id 精神傳承 Making of Legacy


Flash 11 即將推出,支援GPU硬體加速功能 Link:

Macros for Build Commands and Properties in MVS

gameRendering website

We can find some usable resource in this site. Programming.Vertex.Geometry.and.Pixel.Shaders: ebook

Mega Texture Sparse Virtual Textures

JNI keyboard hook

    If you want your JNI program process with your native dll's keyboard I/O, you must implement keyboard hook function.

Using JAWT implements Web3D

JAWT ( Java Abstract Window Toolkit )     Java use it to define the different OS's create window layer, we get this window's handle by JAWT. In this approach we can draw 3D objects presented on the window's handle, which is by GPU acceleration. JNI ( Java Native Interface )    Java can upload native program's library ( etc: *.dll ). Call the native function defined in this linked library. STEPS: Design your java code to be Applet style, You can adopt eclipse SWT(standard widget toolkit) to support JAWT canvas easier. Define the native interface in your *.java file. Like this:     // native entry point for Painting     public native void paintOpenGL();     // native entry point for enabling OpenGL calls.     public native void initializeOpenGL();     // native entry point for disabling OpenGL calls.     public native void cleanupOpenGL(); Load library in the java:     System.loadLibrary("openglAWT"); Compare your java code javac to gener

World to View matrix from Z up right-hand to Y up left-hand

position.x = (-1) * rightVector.dotProduct( orgin ); position.y = (-1) * lookVector.dotProduct( orgin ); position.z = (-1) * upVector.dotProduct( orgin ); _viewMtx.identity(); var data:Vector. = _rotateMtx.rawData; // inverse mtx, and then Z up Y-Z plane to Y up Z-Y plane. _viewMtx.copyRawDataFrom(                 Vector. (                     [    data[0], data[8],  data[4], 0.0,                         data[1], data[9],  data[5], 0.0,                         data[2], data[10],  data[6], 0.0,                         position.x, position.z,  position.y, 1.0 ] )             );       

Using JNI embed OGRE3D in webpage


Flash "Molehill" vs Shockwave 3D

HTML5 canvas demo

Connect to AWS-EC2 Windows OS server and Linux OS server

Access to windows server, all you do are like to use the Remote Desktop Protocol ( RDP ).   First you need to start the EC2 instance, then get Windows password and EC2 IP. Execute the RDP and type your IP and username, select "warn me" certification. Click the connect btn. If you use Linux version OS, you must use SSH protocol, generate private key from key pair. you can following this article.

[Flash Player 11] CPU vs GPU with Molehill


Configuration of Amazon EC2

快速安裝 Amazon EC2 LAMP 環境 (EC2 Console) 什麼是雲端服務?阿正老師教你免費玩Amazon EC2雲端主機!(上篇) 阿正老師教你免費玩Amazon EC2雲端主機(下篇):主機實戰篇 Create a Security Group How to Connect to Amazon AWS EC2 Server from Windows Desktop.

Java - Writing the Server Side of a Socket

Writing the Server Side of a Socket:

FGS 2011: Making A Game With Molehill: Zombie Tycoon

FGS 2011: Making A Game With Molehill: Zombie Tycoon View more presentations from mochimedia

Compare among Java Servlet, Applet, CGI, and JSP

Java Servlet与Applet、CGI、JSP的比较

MapKit in iOS app

iPhone app實作練習-地圖app iPhone app實作練習-幫你的地圖app加上大頭針 Using iPhone SDK MapKit Framework - A tutorial [iPhone程式]iPhone開發心得04-Mapkit之使用MKMapView實作Google Map Map Kit Framework 的簡單應用 如何抓取google map中的經緯度資料: add it to your browser's URL javascript:void(prompt('',gApplication.getMap().getCenter()));

Map Reduce

Hadoop Map Reduce 程式設計 View more presentations from Wei-Yu Chen

MR. JAMIE:看網路與創投


WebGL – More WebGL Security Flaws

WebGL – More WebGL Security Flaws:



ActionScript 3.0程式最佳化

ActionScript 3.0程式最佳化(一)以及Vector資料類型簡介 ActionScript 3.0程式最佳化(二)

The difference of dedicated server and cloud computing

Using Interfaces in C++

Method 1. #include "objbase.h"  //~~~!! for interface identifier #include "stdio.h" interface IAnimal {     virtual void Forward() = 0;     virtual void Eat() = 0; }; class CBird : public IAnimal {   virtual  void Forward()     {         printf( "walk 3 steps \n" );     };    virtual void Eat()     {         printf( "eat 5 rice \n" );     }; }; void main() {       IAnimal *pAnm = NULL;     CBird bird;        pAnm = &bird;     pAnm->Forward();   } In this method, you need to #include "objbase.h" . And write pure virtual func. in the interface class. Method 2. In VS7 Microsoft has judged __interface introduction in c++ compiler( macOS c++  support?...)  In the msdn  __interface definition: Can inherit from zero or more base interfaces. Cannot inherit from a base class. Can only contain public, pure virtual methods. Cannot contain constructors, destructors, or operators. Cannot contain stati

Cloud computing Apache cloud computing edition

xcode precompiler header

In your xcode proj. You can see a other sources group. there is a xxx_Prefix.PCH. In this *.PCH, If you write the cpp code, you should add #if defined __cplusplus #include "MUtils.h" #endif Then the precompiler header function would be worked. Reference:

Titanium Appcelerator vs. PhoneGap vs. Adobe Air

C++ template in Objective C++

Vector3D.h template(class Type) class cMVector3D { public:     Type x;     Type y;     Type z;     public:     //--------------------------------     // @breif: Constructor     //--------------------------------     cMVector3D(): x(0), y(0), z(0) {};         //--------------------------------     // @breif: Destructor     //--------------------------------     ~cMVector3D() {}; };    --- if your program is objective c  hybrid with c++, you need to rename your file ext. from *.m to *.mm. #import "MVector3D.h" int main(int argc, char *argv[]) {         NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];         cMVector3D(float)   testV;     ~~~template success                int retVal = UIApplicationMain(argc, argv, nil, nil);     [pool release];     return retVal; }  Reference:

Google style guide


OpenGL ES Programming Guide for iOS

Apple provides different implementations of OpenGL ES for different hardware platforms. PowerVR Series5 Graphics

Fractal Lab

Fractal Lab is a WebGL based web application for rendering 2D and 3D fractal in real-time

Chrome web app and first web app

    Chrome web store let you can publish your app and charge it. Overview: Build option: HTML5 - HTML5, CSS, JavaScript Native Client - C/C++ code in the sandbox, with Native Client SDK Adobe Flash - depend on flash plug-in A mix - mix these technologies The first web app: Make a manifest.json   write ---  {   "name": "Ellison's WebApp",   "description": "First App on the chrome web.",   "version": "1.0",   "app": {     "urls": [         ""     ],   "launch": {     "web_url": ""     }   },    "icons": {      "128": "logo.png"    } }  Prepare a icon--- Put them into a folder --- ellison-ap