More servicesWindows Live
HomeHotmailSpacesOneCare
 
MSN
Sign in
 
 
Spaces home  Yelz的江湖PhotosProfileFriendsBlog Tools Explore the Spaces community

Blog

June 22

欧洲杯

 

小组赛被西班牙连捅4刀,一点脾气也没有的俄罗斯人居然在8强赛里3:1干掉了此前狂胜世界杯冠亚军的荷兰。单看结局,有些匪夷所思,但纵观整个场比赛,这个比分绝对是合情合理。

事实再一次证明:什么胜负统计;什么历史宿命;什么主力少打一场的体能优势, 统统都是扯淡。双方教练之间犹抱琵琶的机锋互探,足坛名宿的倚老卖老的指点江山,专业与非专业评论员故作高深的比赛前瞻,博彩公司老谋深算的让球开盘,这所有得一切,无非是这场好莱坞悬疑片的必要陪衬。不得不佩服希丁克这位天才的导演,似乎总有一种化腐朽为神奇的魔力,02年的韩国,06年的澳大利亚,今年的俄罗斯,无不是他的杰作。也许他会一直这么神奇,只要他老人家不会患上老年痴呆,有朝一日跑到中国来执教。

土耳其人的最后一秒钟的超级逆转和俄罗斯人面无冕之王的谋朝篡位,让我们这些中立国的球迷享受了一个难忘的足球周末。而我也以此为契机来更新一下久违的blog^_^,无论如何,不为这么一届跌宕起伏的欧洲杯留下只言片语,总是说不过去。

最早看的一届欧洲杯是92年在瑞典举行的那届,如日中天的巴斯滕在半决赛中罚失点球,成全了丹麦人得童话。要知道丹麦当时是顶替受制裁的南斯拉夫进入欧锦赛决赛圈的,留给他们的备战时间不过两周。 “我本来计划装修厨房,但却被召回国家队,到瑞典去参赛。”丹麦教练夺冠后极富喜剧性的说了这翻话。

96年欧洲杯也颇具喜剧性,伤病缠身的德国战车跌跌撞撞打到决赛,居然连个18人名单都凑不齐了,临时从国内抽调了一个叫比埃尔霍夫的大个儿,而这位仁兄最终成为历史上第一个金球的制造者,热血的捷克人成了他的牺牲品。那届比赛中,内德维德开始崭露头角,并在随后的几年中成为闻名足坛的铁血战士。我一开始倒没有太关注他,倒是我老姐关注他多些,因为少年时的内德酷似汤姆克鲁斯。那届比赛,我的伪球迷老爸也爬起来看了一场法国队的比赛,让我印象深刻。

2000年欧洲杯,正好上大三。荷兰对南斯拉夫比赛开始前,宿舍已经熄灯了,兄弟们把班里唯一的一台二手电视机抬到楼道里接上电源看比赛。正值夏季,电视机前左右两列一字排开,每人摆上一张凉席,一边和蚊子斗争,一边看球。荷兰最终6:1狂胜南斯拉夫,大家看得痛快淋漓,却压抑着不敢大声呼喊,只怕惊动了宿管科的人,现在想来,真是乐在其中。现在想来,当时还是挺疯狂的,第二天考试,夜里还坚持看完了葡萄牙对英格兰,目睹了葡萄牙人史诗般得逆转。

2004年欧洲杯,我已经在微软研究院上班了,终于不能像学生时代那么随心所欲,只能看自己喜欢的几个队的比赛。这届欧洲杯,总得说来经典比赛不太多,希腊最终夺冠,恐怕也没人能想到。12年一个轮回,12年前是童话,12年后是神话。

今晚是意大利vs西班牙,这两支球队,我都比较喜欢,希望他们能打出一场好看的比赛,即使是失败者,也要华丽的离开

May 13

祈祷,愿家乡人民平安

农历四月八是佛诞,甘孜州每年在这个时候都会放假两天,全城老百姓都上跑马山游玩,又叫做转山会。

原本应该是个吉祥的日子,没想到却发生了这样大地震。

昨天下午,电话一直打不通,到了晚上7点才通过家里得固定电话联系上二姐,得知家人平安,也安心了些。和姐姐通了10分钟电话,还没讲完,余震又来了,姐姐赶紧挂了电话带爸妈出门躲避。

大家在户外呆了一整夜,今天早上才回家休息。下午又发生了多次余震,不知道什么时候才能结束,心里很堵。

成都还在下雨,老是呆在户外也不是办法。

默默祈祷,愿家乡人民能平安渡过难关。等交通一好,就把爸妈接来杭州。

May 01

Implement Skinned animation (with vertex diffuse, specular and fog) by Vertex Shader

The demands:

1. Implement skinned animation with vertex shader

2. Implement vertex diffuse, specular and fog in the vertex shader.

During the period I am focusing on implementing the above features, I refered different materials, D3DX SDK help, Google, Gamedev.net...such like that. They are helpful, but none of them is really work!

D3DX SDK sample doesn't show the way to do specular and fog. It also failed to emphasize the points new HLSL programmers (like me) need to pay attention. Pages searched by google are too cursory and full with mistake. It tooks me much time to get everything work. Here is the piece of shader code. I am trying to add enough comments so that you can not only know "how" but also know "why".

////// Shader file for skin animation/////////////////////////////////////////////
// hufuzhipeng@hotmail.com

// Matrx used to do camera space transformations. it is worldMatrix * viewMatrix
//Actually, we need the transpose of the inverse of matWorldView to do normal transform. but becuase to transform
//nomal, only 3x3 part of the matrix will be used and the 3x3 part matWorldView is always orthogonal matrix, and
// transpose(inverse(othogonal matrix))) = othogonal matrix, so we can just input matWorldView.
// Attention: If the 3x3 part of your matWorldView is not othogonal, you must input the transpose of the inverse of
// matWorldView.
// Also read: http://www.gamedev.net/community/forums/topic.asp?topic_id=430330 to know why we need
// "transpose of the inverse "
float4x4 matWorldView;

// Lighting constant
float4 globalAmbient = {0.0f, 0.0f, 0.0f, 0.0f}; // Global ambient setting by D3DRS_AMBIENT//light direction in camera space, I use the .w part to store the power of specular
float4 lightDirection = {0.0f, 0.0f, 0.0f, 0.0f};
float4 combinedDiffuse = {0.0f, 0.0f, 0.0f, 0.0f}; // Combined Light & Material Diffuse
float4 combinedSpecular = {0.0f, 0.0f, 0.0f, 0.0f}; // Combined Light & Material Specular

// fogParameter.x > 0.0 means do fog blending, fogParameter.y = start - end, fogParameter.z = end,
float4 fogParameter = {0.0f, 0.0f, 0.0f, 0.0f};

// Matrix Pallette
static const int MAX_MATRICES = 50;  // Check the d3dcaps.MaxVertexShaderConst on your PC to decide the size

float4x3 mWorldMatrixArray[MAX_MATRICES]:WORLDMATRIXARRAY1;

float4x4 mGlobalWorldViewProjMatrix : COMBINEDMATRIX;

///////////////////////////////////////////////////////////
/// Vertex Shader for normal vertex
///////////////////////////////////////////////////////////
struct VS_INPUT
{
    float4 Pos        : POSITION;
    float4 BlendWeights    : BLENDWEIGHT;
    float4 BlendIndices    : BLENDINDICES;
    float3 Normal        : NORMAL;
    float3 Tex0        : TEXCOORD0;
};

struct VS_OUTPUT
{
    float4    Pos    : POSITION;
    float4  Diffuse : COLOR0;
    float4  Specular: COLOR1;
    float2  Tex0    : TEXCOORD0;
    float   fogWeight : FOG; // For vertex fog
};

VS_OUTPUT VShade(VS_INPUT i, uniform int NumBones)
{
    VS_OUTPUT o;
    float3 Pos = 0.0f;
    float3 Normal = 0.0f;
    float LastWeight = 0.0f;

    // Compensate for lack of UBYTE4 on Geforce3
    int4 IndexVector = D3DCOLORtoUBYTE4(i.BlendIndices);

    // case the vectors to arrays for use in the for loop below
    float BlendWeightsArray[4] = (float[4])i.BlendWeights;
    int IndexArray[4] = (int[4])IndexVector;

    // caculate the pos/normal using the "normal" weights
    for (int iBone=0; iBone<NumBones-1; iBone++)
    {
        LastWeight = LastWeight + BlendWeightsArray[iBone];

       
        // Attention: i.Pos is a 4 flog vector with .w = 1.0f as a "Point"
        Pos += mul(i.Pos, mWorldMatrixArray[IndexArray[iBone]]) * BlendWeightsArray[iBone];

        // For 3x3 part of mWorldMatrixArray[i], mWorldMatrixArray[i] = Transpose(Inverse(mWorldMatrixArray[i])),
        // So, we can use mWorldMatrixArray[i] to caculate normal transform
       //  You can also use just Inverse(mWorldMatrixArray[i]), because :
       //  dstVector = mul(srcVector, transpose(inverse(mat))) = mul(inverse(mat), srcVector)
        Normal += mul(i.Normal, (float3x3)mWorldMatrixArray[IndexArray[iBone]]) * BlendWeightsArray[iBone];       
    }
    LastWeight = 1.0 - LastWeight;

    // Now that we have the calculated weight, add in the final influence
    Pos += (mul(i.Pos, mWorldMatrixArray[IndexArray[NumBones-1]]) * LastWeight);
    Normal += (mul(i.Normal, (float3x3)mWorldMatrixArray[IndexArray[NumBones-1]]) * LastWeight);

    // transform position from world space into view and then projection space
    // Becuase Pos is a 3 float vector, we need to add .w part to make it be a "Point"
    o.Pos = mul(float4(Pos.xyz, 1.0f),  mGlobalWorldViewProjMatrix);   
   
     // Compute lighting
    // Also read: http://msdn.microsoft.com/en-us/library/bb172390(VS.85).aspx 
    //  There is a mistake in this article:  "Ldir = -norm(Ldir * wvMatrix)" should be "Ldir = -norm(Ldir * vMatrix)"
    // http://msdn.microsoft.com/en-us/library/bb219656(VS.85).aspx for diffuse
   //  http://msdn.microsoft.com/en-us/library/bb219656(VS.85).aspx for specular
   //  http://msdn.microsoft.com/en-us/library/bb219656(VS.85).aspx for fog
    float specularPower = lightDirection.w;
    lightDirection.w = 0;

    // Compiler don't know Pos is a position, so, we need to add .w item by hand
    float3 PosInCameraSapce = mul(float4(Pos, 1.0f), matWorldView);

    // For 3x3 part of matWorldView, matWorldView = Transpose(Inverse(matWorldView)),
    // So, we can use matWorldView to caculate normal transform
    float3 NormalInpCameraSpace = normalize(mul(Normal.xyz, (float3x3)matWorldView));

    float NLDot = max(0, dot(NormalInpCameraSpace, lightDirection.xyz));
   
    // ViewDir = EyePosInCameraSpace - -PosInCameraSapce, because EyePosInCameraSpace is always zero, so
    // we can just use "-PosInCameraSapce"
    float3 ViewDir = normalize(-PosInCameraSapce);
    float3 HalfWayVec = normalize(ViewDir + lightDirection);
    float4 specular = pow(saturate(dot(NormalInpCameraSpace, HalfWayVec)), specularPower); // R.V^n

    o.Diffuse = globalAmbient + combinedDiffuse * NLDot;
    o.Specular = combinedSpecular * specular;

    if (fogParameter.x > 0.0f)
    {
         o.fogWeight = clamp((fogParameter.z - abs(PosInCameraSapce.z)) / fogParameter.y, 0.0f, 1.0f);
    }

    // Copy the input texture coordinate through
    o.Tex0 = i.Tex0.xy;
    return o;
}

//////////////////////////////////////
// Techniques specs follow
//////////////////////////////////////
int CurNumBones = 2;
VertexShader vsArray[4] = { compile vs_2_0 VShade(1),
                            compile vs_2_0 VShade(2),
                            compile vs_2_0 VShade(3),
                            compile vs_2_0 VShade(4)
                          };
technique DrawObjectHLSL
{
    pass p0
    {
        VertexShader = (vsArray[CurNumBones]);
       }
}

///// C++ Part ////

D3DXMATRIXA16 combinedMat;
D3DXMatrixMultiply(&combinedMat, &m_WorldMatrix, &m_ViewMatrix);
m_pSkinEffect->SetMatrix("matWorldView", &combinedMat);   

// Set Lighting Parameters
DWORD dwGloablAmbient = 0;                       
pDevice->GetRenderState(D3DRS_AMBIENT, &dwGloablAmbient);
D3DXCOLOR globalAmbient(dwGloablAmbient);                       
m_pSkinEffect->SetVector("globalAmbient", (D3DXVECTOR4*)&globalAmbient);

D3DLIGHT9 light;
pDevice->GetLight(0, &light);

D3DXVECTOR4 lightDirection(light.Direction.x, light.Direction.y, light.Direction.z, 0.0f);
D3DXVec4Transform(&lightDirection, &lightDirection, &m_ViewMatrix);                       
D3DXVec4Normalize(&lightDirection, &lightDirection);
lightDirection = -lightDirection;

// Set light and use the .w to set the power for specular
lightDirection.w = m_Material.Power;

m_pSkinEffect->SetVector("lightDirection", &lightDirection);

D3DXCOLOR combinedDiffuse;                                       
D3DXCOLOR diff1(light.Diffuse);
D3DXCOLOR diff2(m_Material.Diffuse.c);
D3DXColorModulate(&combinedDiffuse, &diff1, &diff2);
m_pSkinEffect->SetVector("combinedDiffuse", (D3DXVECTOR4*)&combinedDiffuse);

D3DXCOLOR combinedSpecular;
D3DXCOLOR spec1(light.Specular);
D3DXCOLOR spec2(m_Material.Specular.c);
D3DXColorModulate(&combinedSpecular, &spec1, &spec2);
m_pSkinEffect->SetVector("combinedSpecular", (D3DXVECTOR4*)&combinedSpecular);

DWORD dwFlogFlag = 0;                   
pDevice->GetRenderState(D3DRS_FOGENABLE, &dwFlogFlag);
// Set Fog parameter to shader, we implement fog effect by ourselves
if (dwFlogFlag)
{   
    FLOAT fStart = 0, fEnd = 0;
    pDevice->GetRenderState(D3DRS_FOGSTART, (DWORD *)&fStart);
    pDevice->GetRenderState(D3DRS_FOGEND, (DWORD *)&fEnd);
    if (fEnd - fStart > 1e-6f)
    {
        D3DXVECTOR4 fogParameter(1.0f, fEnd-fStart, fEnd, 0.0f); // 1.0 means use fog blending
        m_pSkinEffect->SetVector("fogParameter", &fogParameter);                           
    }                   
}

D3DXMatrixMultiply(&combinedMat, &combinedMat, &m_ProjMatrix);               
hr = pDevice->SetVertexDeclaration(pAnimationData->m_pDecl);

DWORD dwDrawnFaceCount = 0;
for (uint32 uFaceGroup=0; uFaceGroup<m_dwFaceGroupCount;uFaceGroup++)
{
    D3DXBONECOMBINATION &faceGroup = m_pFaceGroupTable[uFaceGroup];
    for (uint32 uPalleteEntry=0; uPalleteEntry < m_paletteSize; uPalleteEntry++)
    {
        uint32 uMatrixIndex = faceGroup.BoneId[uPalleteEntry];
        if (uMatrixIndex != MAX_UINT32)
        {

            if (m_MatrixPalette[uPalleteEntry] != m_boneMatrix[uMatrixIndex])
            {
                m_MatrixPalette[uPalleteEntry] = pAnimationData->m_boneMatr[uMatrixIndex];   
            }       
        }
    }

    hr = m_pSkinEffect->SetMatrixArray("mWorldMatrixArray", m_MatrixPalette, pAnimationData->m_paletteSize);

    hr = m_pSkinEffect->SetMatrix("mGlobalWorldViewProjMatrix", &combinedMat);

    hr = m_pSkinEffect->SetInt("CurNumBones", pAnimationData->m_dwMaxVertInfl-1);

    UINT numPasses;
    m_pSkinEffect->Begin(&numPasses, D3DXFX_DONOTSAVESTATE);                       

    for (UINT iPass = 0; iPass < numPasses; iPass++)
    {                           
        m_pSkinEffect->BeginPass(iPass);                                                   

        pDevice->DrawIndexedPrimitive( ... );

        m_pSkinEffect->EndPass();
    }

    m_pSkinEffect->End();
    pDevice->SetVertexShader(NULL);
    pDevice->SetPixelShader(NULL);   

    dwDrawnFaceCount += faceGroup.FaceCount;
}

Becuase the matrix palette is usually too small for a whole model, we need to use ID3DXSkinInfo::ConvertToIndexedBlendedMesh to devide the whole model into sub-model to render seperatelly. I implemented the same function by myself, not very difficult. If you don't want to use .x format mesh, try to implement the function by yourself.

April 30

谈论 What's the matter with Tibet? – by i.elephant

Written by my friend bill. 

引用

What's the matter with Tibet? – by i.elephant

 

After seeing Mr. Smith' Free Tibet MSN name, after talking to buddies in Austin and read some articles in US, I begun to realized how critical it is for the so called main stream media in US is making anti-China propaganda with the recent Tibet thing, and how successful they are in making our US friends (they are all nice and honest people) to believe what they saw on TV and other type of media…

 

As a "this generation Chinese" and as a honest person speak about the truth, I think I need to compose this message and have as many as people read it, to know what exactly the Tibet thing is.

 

First of all, I'd like to quote an article which is published on China Daily today by By Lisa Carducci, a Canadian writer, sharing her experience talking to Tibetans (Zang) people in China and in Nepal and how surprised she was. http://www.chinadaily.com.cn/cndy/2008-04/22/content_6633878.htm

 

The paragraph I am going to quote from her article is "Finally, I realized that the Tibetans outside Tibet are the victims not only of ignorance but of a well-organized campaign of misinformation. And it struck me that it may be the same for the Dalai Lama." Honestly, it is the first time for me to understand what non-Chinese Tibetans think and believe. As Lisa mentioned in the article, too bad, the information they believe to be true is from "a well-organized campaign of misinformation". Then who is the organizer of this never-ending campaign of misinformation? There is only one on the planet could be the "god father" of this - Dalai Lama.

 

Why? You may wonder. Is it because that he was "forced to flee the country"? Right, partially. To make the judgment, you have to understand why he was fled and why he wants to turn things over so badly even fifty years has gone.

 

Let me quote another line from Lisa's article "I told her that all the Tibetans I had met earlier knew very well what the central government of China had done for them and appreciated it." Yeah, appreciate, that's the word. Ask yourself, when is the last time you truly appreciate something from the bottom of your heart? That's the time your heart was truly touched and that's about something that really matters to you. Okay, back to the question, why Dalai Lama was forced to flee and why Tibetans in China appreciate what the central government has done?

 

It is a long long story, and story always could be told differently. In Dalai Lama's wording, when he was forced to leave, the so called traditional Tibet culture was destroyed. But he never mentions what exactly the so called traditional Tibet culture was. That's how liars speak about things. Let me give you the word – serfdom. If you don't know exactly what it means, google it. , And of course, Dalai Lama was the king and that explains why he wants the old time back so badly. There are some sites you can go for reference about the serfdom age and the development of Tibet in the new China age.

       http://www.chinaembassy.org.il/eng/zt/xzwt/t159564.htm

       http://english.people.com.cn/features/tibetpaper/tibet.html

       http://www.tibet.cn/english/zt/whitebook/index.html

       http://www.dalai-liar.com/

 

Now you understand what's the real matter of Tibet, the history and the motive. Surprisingly, Dalai Lama has worked so desperately in making his propaganda, and this time he even made some of the main stream media buy in his value, and so come the news you saw on TV about the so called March Tibet riot in China.

 

Yes, there was a riot, bad people were organized to destroy the shops on street, etc., the standard riot things in a violent protest (and more than that this time, definitely), to make everything looks true to Dalai Lama's story. The police did their best to protect the residents. However, there were still victims. Please refer to the photos here: http://www.anti-cnn.com/forum/en/thread-649-1-1.html. It is touching, especially the photo at the bottom which is the five shop girls were torched ALIVE by rioters, oldest 24 (Yang Dongmei, right ), yongest 19 (Chen Jia, left). Totally there wer 13 residents were killed by the rioters. For more stories about "the five young women who burned to death", see here: http://www.iht.com/articles/2008/03/28/asia/tibet.php

 

But what the media in US reported? They refuse to acknowledge the victims of Lhasa riot, they five shop girls lost their lives to the rioters either hired by or motivated by the propaganda from Dalai Lama. Instead, they fabricated the stories that the Chinese police pressing peaceful protesters. Yes, fabricated! Surprise, ahha? Yeah, me too, but that's the truth. Actually, you will laugh about how stupid it is. Basically, what CNN did is just copied and pasted its own video tape of the Tibet Protest movement in India and has fabricated it as in Gansu Province/ Lhasa, China "peaceful" protest movement with Chinese cops in khaki British colonial style uniforms. That's really funny a low IQ. For details, check it out here: http://www.globalresearch.ca/index.php?context=va&aid=8697. And if you do a research, you will find other medias, including Washington Post, did same IQ level stupid "imaginary story telling" reporting.

 

The photo of the five victim girls is still vivid in my mind…for those reporters, don't you feel any level of SHAME??? I have no right wording to express my feeling now. The feeling is very complex. I like the democracy in US and the people there. 99.99%+ of the people there are nice an honest, but this time, the 0.01%- bad people manipulated good people's feeling and trust, and made them believe in the pressing of peaceful protest in Tibet story and made them believe the so called Free Tibet is meaningful thing. I felt so bad when I saw my best friend in US mentally joined the so called Free Tibet thing. That motivates me to write this message, to let more nice and honest US people know that it is the so called Free Tibet people torched five shop girls alive in Tibet, and the god father who won Nobel prize of peace was the biggest slave owner in the serfdom age…

 

Last and least question, why US media do so? I think you already have your idea. No matter it is "All western journalists need to sell news and stories. Their livelihood depends on the stories. Sometimes they have to exaggerate" (2008 Olympics, China, Tibet, by ciga), or they are also nice and honest people just stupidly believed what they thought to be true from Dalai Lama, or there is higher priority agenda such as national interest…who knows, who cares. What happened is what happened, let's face it, in an honest manner.

 

Looking forward, be honest like a real man, don't fabricate, don't ruin beautiful things, especially the Olympic, the thing supposed to be the purest, don't ever think about ruining it. Come one, don't tell me you haven't got the idea that the whole Tibet thing is part of the plot of ruining the Beijing Olympic. Anyway, you are adult, you have your judgment. Like them, they have their judgement:

    http://youtube.com/watch?v=Xsoc4-QnplY

    http://www.youtube.com/watch?v=siBqFgwL-lA


 

There is an old saying that for all the bad things you did, you will be punished, sooner or later. Let's just wait and see

 

 

 

======================================================================================

FBEE89F8668090F78397AFB6146564970318_343888

0318_34388604659a184967c08a780dc6e1acb922d2161dd76223bcb825a81d01a7ec1d97574b62621f2d0cdadf708e1d7d0b2e6cfecdb4e18df1eaf3409283e9970817c74a2ab8f14c3f0def80c3d09e62ccc1c8321b21fc2913d2b4b1708ca13a3cbd36319f98b498a99d59314cea06e48105090d8380

 

 

 

March 03

梅花,新天下贰

 

灵峰、孤山和西溪自古以来就是杭州赏梅的三大胜地。说起来,最为所人知的便是孤山,那个“梅妻鹤子”的林逋和那句“疏影横斜水清浅,暗香浮动月黄昏”虽时隔千年,尤让人心向往之。中国文人向来对梅花青睐有加,说到底是孤芳自赏的心里在作怪,“零落成泥碾做尘,只有香如故”,大概就是文人仕途失意,处江湖之远后的自我安慰。所以文士们赏梅,讲究的是意境:或是在清冷的冬晨,朔风凛冽,天地肃杀;或是在幽冷的晴夜,月色朦朦,文士们踩着厚厚的积雪在小道上踽踽独行,忽一抬头,正看见一朵怒放的梅花在枝头怒放,那便是有意境了。我们老百姓看梅花就没那么多讲究,踏雪寻梅固然别有乐趣,但与其顶风冒雪,还不如等到明媚的春日,去梅园看一看满树盛开的各色梅花:在花丛中拍几张照片,拈过花来嗅一嗅阵阵幽香,即便是和他人摩肩接踵,也是件开心的事。上周末就是这样的天气,所以一大早便去了植物园,一路径直来到灵峰,在梅花的海洋里徜徉了一番。

公司的3D大型网游天下贰再次内测了,从老天下贰回炉到今天重新内测,只有10个月时间,游戏内容,美术风格,收费模式,全都改了,且不说改得是否成功,效率的确够高。老天下贰我玩得不多,只到10多级,印象最深的就是从新手村出来,一不小心掉到山下小河里,游了半天才找到上岸的地方,灰头土脸跑回去,结果没过多久,再次掉到河里......。新天下贰里选了魍魉,也玩到10多级了,渐入佳境。就画面来说,比以前精致了不少,个人还是很喜欢;任务系统做得也不错,新手的上手难度明显降低。从程序上来说,bigworld引擎经过一年多的优化,无论是效率还是表现力,应该都有提高。之前在悉尼的时候到bigworld总部去访问过,其间谈到了地表渲染部分的优化,差不多就是progressive mesh的概念,看起来也很好的运用到新的游戏场景中了。

February 05

今天出来的两则道歉申明

 

陈冠希就艳照门道歉: http://ent.163.com/special/00032I5C/ps_stars.html 

这说明: 真的假不了

陕西林业厅就老虎门道歉: http://news.163.com/08/0205/00/43T82GN00001124J.html

这说明:假的也真不了

February 03

断桥,白堤,楼外楼,西泠印社,雪后

 

早上醒来,终于见到了久违的阳光。匆匆赶到断桥的时候,桥面上的雪已经快化完了。白堤上的雪已经凝结成冰,外西湖还是水光滢滢,岳湖上却结了一层薄冰。

顺着白堤,一路小心翼翼的走过来,感受了一下雪后的西湖。没带相机,只是用随身的手机拍了几张:

                  

 

 

 

 

 

 

 

                               断桥,外湖                                                                      宝石山,内湖

                                             白堤                                                                           湖上的冰

 

 

 

 

 

 

 

 

                                             楼外楼                                                               楼外楼前的雪人

 

                                              西泠印社

February 02

几张杭州雪景

前些天写blog, 还在说杭州的雪不容易积起来。这两天,老天爷就"Give me color see see" 了^_^

092259 20080202 092642 20080202  131036 20080202 092248 20080202

Microsoft’s Letter to Yahoo

http://dealbook.blogs.nytimes.com/2008/02/01/microsofts-letter-to-yahoo/

really a big news. Microsoft leaks this letter purposely in order to give pressure to Yahoo. From the perspective of shareholders and employees of Yahoo, it's really hard to refuse the offer.

If the acquisition transaction is successful, I just wonder how to combine to 2 bands: Yahoo and Live.

January 27

下雪了

 

雪断断续续,下了两天了,据说未来一周内都会是这样的雨雪天气。

杭州的雪含水分多,不似北方的雪那样容易堆积,所以,尽管下了两天,地上也只是湿漉漉的,少见积雪。

还是更喜欢北方下雪的感觉,呆在有暖气的屋子里,浑然不觉屋外的风雪交加。有时候一觉醒来,才发现窗外已是白茫茫一片。由于含水量少,蓬松的雪很容易就堆积来,踩上去"吱吱嘎嘎"作响,脚陷得虽深,鞋却不太容易湿。有次在京西草原骑马,正赶上大雪之后,天苍苍,野茫茫,在一望无尽的白色原野上纵马奔跑,便是有马蹄打滑的危险,也惬意得很。

刚来杭州的时候,见到没有雪的断桥,总有些不干,盼着哪天下雪时去看看真正的断桥残雪。转眼到了冬天,一天下午坐在教室里上课,忽见窗外飘雪,连忙逃课跑去断桥。赶到时,雪已融化,终究没有见到心里的那副画面。

十年过去了,当年的踏雪寻景的少年心境早已一去不返,终究是一介凡夫。昨天是同窗好友Parkey的30岁生日,发消息过去说:"而立之年了哦"。日子过还得真快。

January 24

2008年1月24日

很开心,愿朋友们都有个美好的未来。

January 06

西溪湿地,岳庙,新书

好就没上来,记点流水账吧。

元旦放假第一天,去了一趟久闻其名的西溪湿地。到的时候已是下午3点过,快要关园子了。园子很大,顺着石子路一路前行,还能见到冬季里残留的芦苇。几乎不见游人, 四周空荡而清冷,算是闹市中难得的清净之地。在园子里逛了一会儿,想去小岛上的秋雪庵,却无舟可渡。西边,一轮金黄的落日正渐渐隐没在远方的茅舍和芦苇当中,有种萧瑟的美。

第二天去参加了小马的婚礼答谢宴,满座高朋皆不认识,还好小圈子两口子和Xjing在。我照例很专业的给小马的老公调了一份百味汤,在大伙儿的鼓噪中,张同志一饮而尽,那是非常彪悍。 唉, 婚宴上结的仇家有多了一个,哪天我要办酒席,不知会不会被报复,呵呵。

被老大叫去南山路喝咖啡,顺便去儿童公园办了一张杭州公园年卡。之后骑车穿过苏堤,用新办的年卡进了一趟岳庙。 岳庙其实已经去过很多次了,这次静下心来仔细看了一下各个门槛上的楹联。有一副是蔡元培做的,挺有意思,上联记不清了,大致是说此地湖光山色,埋忠臣傲骨,相得益彰,下联是“民族主义,自元清鼎革,始成一体,英灵有知,应补生前遗憾”。换句话说,就是告诉岳飞,你看你瞎忙活个啥劲啊,最后大家都成一家人了。

这周的一大收获是书,木儿帮我在99Read上订了几本打折书,绝对物有所值。《图解本草纲目》,《山海经绘图本》、《中国人的闲情逸致》都非常精美,有时间慢慢看过来。

博文的编辑寄过来一本《美丽的京剧》,翻了一下,当真可以用“惊艳”来形容。全彩图的厚厚一本, 装桢非常精美。全书以生旦净丑分类,包含了大量的剧照和经典段子介绍,即便你之前对京剧知之甚少,也能去欣赏这本书。 已经打定主意把这本书带给老爸做新年礼物了,他绝对喜欢,哈哈。在给老头子之前,我得好好看一遍。

December 23

冬至

去年的这个时候,无论如何也想不到我的29岁生日居然是在杭州到合肥的火车上渡过。

也算是吃了一碗长寿面,虽然只是一碗“统一”方便面,但也算是给自己的生日一个交代。

嘎子去了之后,和几个同学一直想着找个时间去合肥祭拜一下,这次总算能成行。到了合肥安顿下来,已经是夜里1点。第二天早晨,冬雨蒙蒙,大家在旅店前等了很久才打到车,前往小蜀山公墓。

合肥到处都在修路,泥泞不堪。去小蜀山的路很不好走,30公里左右的路程,一路上走走停停,竟然花了近两个小时。时值冬至,小蜀山有不少来扫墓的人,步行进入园区,一路向西,在一片新坟里找到了嘎子的墓碑。"爱妻葛云芳之墓,夫许威威携子健行泣立"。金叶,Gyy他们先到,已在碑前献上了几束菊花。山间的空气在雨后越发显得清冷,大家在坟前伫立,默然无语,毕业那年越好重聚,怎么会想到是在此时,此地,这般光景。

生命无常,脆弱得令人心惊,愿嘎子安息。

December 09

老和山

从浙大玉泉教七那边往上走,出了校门,就是上老和山的路。

几年前,小别杭州的时,这条山路还只是被爬山的人踩出来的一条土路,基本上是直上直下,颇为陡峭。如今再来,通往山顶的石板路已经铺好,登山的安全系数提高了不少,却也少了些味道。

在浙大读书的人,很少有没爬过老和山的。周末午后若是无聊,便一口气爬到山顶,只要赶上个好天气,就可以遥望到西湖和横跨湖上的苏堤。沿着山脊一路西行,可以一直走到北高峰。北高峰上有个财神庙,一年四季香火不断,据说是挺灵的。

从北高峰下去,就是灵隐寺。从热闹的灵隐一直往上走,可以到冷清的上天竺。在哪里吃顿斋饭,听和尚做晚课,一天也就过去了。

杭州多山,但大多和老和山相似,并不算高。难得的是山与山之间,脉脉想通,看似分散,却连为一体。浙大每年会搞几次毅行,就是从老和山出发,顺着山路,经过龙井,云溪竹径,九溪,一路暴走到钱塘江畔的之江学院。

山中景色并无特别的地方。据说林间常有野猪出没,猎人们便在林中安放了野猪夹子,等着可怜的野猪们自投罗网。不过,这些夹子实在太隐秘,有时候也会误伤路人,所以带朋友上山之前,从会叮嘱他们别去走林间小路。

山中还有做坟茔,外行普普通通,据说葬着一位青年男子。几十年来,爬山的人来来去去,换了一茬又一茬,却总能看见坟前放着的白玫瑰,那因该是他的爱人带给他的吧。我爬山的时候也曾看见过那些花,清冷而凄艳。

December 01

CSDN 软件开发2.0大会第二日

 

早上第一堂课选了雷鸣的“Linux系统下的高性能系统设计”。雷鸣是百度的创始人之一,后来自己出来搞了KooWo网,一个很八卦的网站。讲座的内容没有太多新意。其中举了个性能优化的例子,大致是把系统分为几块, 打时间戳,找出瓶颈再重点调优。这当然是个不错的方法,只是不明白为啥不用线程的查性能瓶颈的工具。

第二讲的主讲人是思想家陈榕,有不少有意思的语言,摘录之:

1. 程序员编程的平台就是操作系统,但为什么不把Java叫做操作系统?因为程序员总希望追求系统性能的极值。

2. 批评微软Evil的人是很短视的,严重误导大家。这就好比雷锋是好人,扶老太太过街是好事,但不能天天呆在路边等着扶老太太过街。没有追求利润最大化的人,就没有今天的社会。

3. 微软有做产业的感觉,但Google有做商业的感觉。而这就是Microsoft以前猛,但Google目前势头更猛的原因。

4. 做操作系统最根本的要点是要做一个编程环境,把之上的各个应用软件伺候得舒舒服服。

5. 99年我们就在策划.Net了,因为我们知道如果没有对Metadata的支持, 微软就死定了。

6. 每个人都觉得自己聪明,如果你是CTO,你就觉得自己的每个员工都傻。97, 98年VB是世界上最流行的语言,可很多程序员都不愿意被别人叫做用VB的, 认为是对自己智商的侮辱。

6. 太多的人学C++是为了技巧而技巧,所以云风在blog上宣称要全部用C, 孟岩也跟着忽悠这事儿^_^(我们狂笑)。

7. 只要能保证用户界面响应在0.2秒内完成,无所谓底层用啥语言。

8. Java想一统江山?微软99年过高的估计了敌人,结果放走了GOOGLE。何必呢,要和谐。

9. 中国将从体力密集型产业过度到脑力密集型产业。(换句话说,大家肯定将成为IT民工)。

下午第一场的时间里,随便选了一场,是李涛讲《Ajax Web2.0开发》,首先讲Ajax原理,还算清晰。但之后讲的东西太detail, 介绍DoJo的时候想现场做个演示,可调了几次都搞不定。我一看没戏,就退出来了。之后去听了一下周伟民老师讲的《多核计算中分布式数据结构》,讲分布式系统中如何提高查询效率,其间重点讲了一些加锁算法,同样感觉过于detail。最后时间抽空去看了一下Yahoo美女Technical Evangelist Tenni讲的《大型网站》调优。美女推荐了Yahoo出的一个开源工具“YSlow”.这是一个对网站Performance表现打分的工具(可以在Yahoo Developer上下载),用这个工具去评测网站,可以将它们分为A-F六等,其中Yahoo和Google是第一等,Microsoft Msn是F等,唉,可怜的微软,总是成为软件大会的负面教材。

随后回到《分布式数据结构》的演讲现场,似乎有人在砸场子,争论得挺热闹的。之后,超级人气偶像云风终于上场,题目是“大世界网络游戏服务器的构架”。现场气氛非常热烈,光是站着听的就不下50人。帅哥再次强调目前做的引擎"Deep Code"是全C语言开发的,跨平台,逻辑层语言无关。云风有句话很有意思:“解决一个问题,最好的办法就是不做它”。这里的不做,并非是“不作为”,而是想办法花小代价去绕过它,但达到同样的目标。云风的确是人气王啊,现场有人往大屏幕上发消息:“102的老师帅呆了,酷毕了,简直无法形容”。

最后一堂课是大牛Andrie讲“无锁数据结构”。简单的说,就是用不加锁的算法(CAS)来解决多线程编程中的资源竞争问题。大牛深入浅出,讲得挺风趣的,听了两天的课,这堂课是最实际的。

总结一下。听说今年是CSDN第一次举办软件开发者会议,总体上组织得不错,问题也不少。首先是地点,选在九华山庄,周围一片荒凉,晚上宵夜的地方都没有,想找朋友把盏叙旧都没地方;其次是讲师的水平参差不齐,内容安排还是不错,但感觉都讲得浅显些。

最快乐的事情是见到了几位老朋友,周大姐,孟岩大大,铁锋,可惜没有机会多聊聊,在此再向他们问好。

November 29

CSDN 软件开发2.0大会第一日

 

第一次参加国内的技术大会,人比想象的多。大家见面,往往互通公司姓名,接下来互换名片,寒暄几句,说不定就能扯上联系,如某某的同事是某某的同学, 某某的现任老板是某某前任老板,如此种种。毕竟都是程序员圈子里的,很容易找到共同语言。

早上的KeyNotes放在一个大展厅。现场开通了手机短信平台,听众们可以随意发短信到指定号码,发表自己的感想,这些短信随后会被投影到现场的两个大屏幕上,让现场所有的人都看到。这是个不错的创意,不过很快就沦为枪手们发广告的平台,比如:“***公司恭祝大会成功”,"***公司期望技术强人的加入"等等。

早上一共安排了7个主题演讲,每个限时20分钟,时间安排上非常紧张。

首先是孟岩对DDJ杂志主编Jon Erickson的访问,主题是“什么是软件开发2.0”,聊了半天,Jon的核心观点是“语言是次要的事情,基本的数据结构,算法才是软件开发的核心”。Jon举了育碧开发刺客信条的例子,这款游戏的底层用c++, 工具用C#, 游戏逻辑用脚本语言。由此可见,语言的选择只不过是服务于功能的实现。虽然不知道Jon谈的东西到底跟软件2.0有什么联系,但的确是真理。

接下来演讲的是UML的发明者Ivar Jacobosn,没有什么新颖的东西。

之后上台的是我的前老板林斌,演讲内容是介绍Google的Andriod开放式手机软件开放平台. 这套Solution还是很完善的,但如果得不到手机生产大鳄(比如Norkia)的支持,前途堪忧。然而,Norkia既然花了那么大的力气去做Symbian, 就很难让别人跑来分一杯羹。

茶歇之后商场的是CodeGear公司的CEO Jim. Jim扯了半天,大致是说他们公司可以组织世界上的软件高手,成立virtual team, 在virtual 的 office做virtual 的项目。

之后是大牛陈榕, 82年进入UIUC学习,之后在微软参加了第一代IE的开发,现任北京科泰的首席科学家。他的演讲题目是“迎接软件编程的新浪潮--用软件耦合诠释长尾理论”。老哥讲的内容虽然比较忽悠,但算是早上所有的演讲中最有思想性的。他的核心论点是把软件届分为三角,微软,Google各守一角,并企图通过Windows Live和Andriod来相互渗透。而其他程序员,可以占据第三角,利用微软和Google的技术提供大量方便可用的软件。程序和新闻,图片,视频都是数据,没什么不同,今后的平台可以不用装任何软件,只要访问不同的服务,平台就会自动下载相适应