GoalTime For Soccer fan

After submitting in OVI store for QA for 4 weeks.GoalTime is finally on the market. (mobile device based on symbian^3 and symbian v5 are still not available due to the sharing functionality failed,but for N950 and N900 work fine anyway).So if you are sports fan,check it out at OVI store link for this app http://store.ovi.com/content/213368 enjoy...........

About GoalTime

"GoalTime is Qt based App that help user to view latest  match score( Football, Italian Serie A, Barclays Premiership, Spanish Primera Division, Italian Serie A, German undesliga, French Series 1 League, basketball, Tennis...) in real-time. Besides scoring tips,user can check ongoing match score, goals, red and yellow card. And also choose matches you are interested in and strip the leagues out which you don't wanna pay attention to as well as sharing match info with your friends on social
network like facebook, twitter, weibo.... of course it will consumes a small amount of network traffic."


Different people with different life

Best wish to you  Shawn.
I will miss you.


3DHappyFrog is coming

 It takes me some time to record a video and upload it to Youtube(What a bloody GFW).hum..............

As the description I post on Youtube channel.
This app is developed by using Qt3D/QML integrated with Bullet 3D physics engine.Due to this game is 3D-game,There are 2 types of play,one is controlled by user(you can regard N950/N9 as game controller) ,another is based on sensor.More details,pls watch recorded video.The explosion effect looks like not bad.As you see,I deploy this game on N950,Basically,The performance and some details are not as good as expected.Still Some bugs are needed to be fixed and lots of room to improve,such as better 3D model, effect,audio,optimization on painting to boost FPS.On the other hand,This app is being built on Qt3D-1.0-tp1.which is not blown release(Qt3D is still in-progress).That's why I've not released the debian package and source code yet.So stay tuned.

In one word,It's far from being stable,playable and complete from my perspective. 
Keep going.Hopefully you'll like it when released. :)


Call your ideas:level design For 3D-HappyFrog

3D-HappyFrog is on the way,90 percent has been done.I suppose that it will be going to be released next week or the week after next.Be patient and it will take a while.I am working hard on the rest of it.One problem encounters besides coding,I've been racking my brain to design brand-new levels and no good idea about this though by far.Evidently I find that level design is much more difficult than programming.
So if you were me,how do you to design there levels?
One snapshot as following.

This is my humble design.If there is no any other level easier than this one,I decide to mark it as level one.If you lost more than 1 life here...(*(JHIY*T&T*&*^(H
What you have still now? fixtures?

Of course, All fixture support local transformation.

That's it,If you have good ideas,pls contact me via e-mails,expecting your wonderful work.


Keep calm and Hack on

Clearly I remember that this is my secound time recerving a gift bag from Oslo,which is as a award of Qtest Mobile App Port Contest 
It is on hand now.

Although failed to be the top 5 in the final(which means no chance to get my favorate mobile device N900 before N9/N950 was officially announced by NOKIA at Singapore),Nothing regret.My app HappyFrog attracts lots of attention.Besides gift,it's really good feeling for me to see people get something pretty enjoyable out of it.That's why I keeping working on that project.
Btw,I almost forgot the PDF ebook is still on my KDE desktop but for this gift.

Keep calm and Hack on.


HappyFrog for Harmattan

Can't wait to say finally...finally I got my N950 throught Qt-Ambassador Program.I was waiting impatiently for a long time (two suffering weeks :)) to got it on hand.Unboxing it.........very very fantastic and beautiful design and very 'soft' and fabulous to the touch.The brand-new user interface-Swipe.I feel like the whole view is completely undisciplined unbounded,yet full of the magic and power of the artist view(a image cross my mind,it reminds me of "Steve jobs" in the film "Pirates of Silicon Valley".He was yelling "I need artist!!" and speak to bill "we're artist"..........*(^*&%&^$&^%)Dreams will not remains as a dream.The Next Billion.So Come on,nokia don't let me down : ).
Well,I am prepared to deploy two games on N9.
One is HappyFrog(someone has played it),another....keep you guessing.
So first priority is to make some improvment on Happy Frog. three features on HappyFrog 0.0.3. details as follows
1.parallax scrolling(see the hills) and re-design some levels
2.add tyre fixture(enable Motor in Box2D)
3.add windmill fixture(disanble Motor in Box2D)

you can download HappyFrog for different platform here
2.HappyFrog 0.0.3 For Symbian^1(5800,n97,c6,5230..)

source code is here Happyfrog-Src-0.0.3.tar.bz2 ,you can checkout it also at here 
Next game is in-progress,stay tuned.



Making HMAC-SHA1 scriptable in apps

Long time no blog due to busy on project.
It's a funny coincident that I need to do some work based on OAUTH open protocol again.But according to the qoauth libs implementation and the previous blog I mentioned,there is a  need for me to make it with little code change for different platform(on Desktop I need to compile and import QCA libraries in addition to qca-ossl-plugin see below on that page,on Symbian I need to import hash.lib by using related class CSHA1,CMAC).Hum,is there a better solution for me to utilize to make it easier?
So I think it's time to play a small trick.My proposal is that do HMAC-SHA1 in app without any change to fit all platform with Qt(Desktop,embed,mobile device).The main idea is that making HMAC-SHA1 scriptable in apps.
The step as following.
1.Please check http://pajhome.org.uk/crypt/md5/sha1.html and import sha1.js in your project.
2.QtScript module provides powerful embedded scripting environment through the QtScript classes.So we can call a Qt script function from C++ like this.
QFile file("./sha1.js");
QString jsContent = QString::append(file.readAll());
QScriptEngine engine;
engine.evaluate(jsContent);// very similar with function QWebFrame::evaluateJavaScript ()
QScriptValue value = engine.globalObject();
QScriptValueList paramList;
QString result = value.property("b64_hmac_sha1").call(QStringValue(),valueList).toString()
//call js function b64_hmac_sha1 from C++ and result is what you want. ;) 

special present from Finland before my birthday.
can't wait to test it.
I will be waiting impatiently for the time when I get it.


HappyFrog........just for fun

In the wake of angry bird become more and more popular,so I just wonder how to implement it with Qt.Below are some hint.
1.GraphicsView Framework(or Declarative UI) interagted with Box2D physics engine.
2.Explosion effect can be done with function drawPixmapFragment(which is introduced in Qt 4.7,make an optimize on state changes for QPainter,so it's faster than multiple calls to drawPixmap())
3.In order to boost my development,I wanna use some Element from Qml,such as flickAble or ListView,etc..

The first two are not difficult to implement it.
basically,lots of people want to know how to integrated qml with c++ in this demo,in particularly how to add item in the flickAble element (you konw,I am a lazy and humble guy and on the flip side,I guest not everyone konws that how to make kinetic animation,In fact it's not difficult).
(more detaileds watch the video Below).
In order to dynamically add item in the flickable,we can write some code in qml
Flickable {
     id: myFlickable
     function addItem(file) {
         var component = Qt.createComponent(file)
Maybe someone just figure out an "easier" way

  id: myFlickable
  Loader { id: itemLoader }
  MouseArea {
          anchors.fill: parent
          onClicked: itemLoader.source = "items.qml"
In case code you wrote like above,unfortunately,item inserted dynamiclly can not be "flicked",so it didn't work out if you forget passing Flickable.contentItem for the item created,even thought it seems like itemLoader is a "child" of myFlickable.
In C++
consider about foregoing problem we met.There are two little things we need to care about.
1.How to get the pointer of "Flickable"
2.How to get the pointer of "myFlickable.contentItem"(a property of Flickable)
;) some related apis have been prepared by Qt,easy and convinient.
   1.create QtObject Element for Flickable element,as the qt document mentioned "It can also be useful for C++ integration, as it is just a plain QObject.This allows a C++ application to locate an item within a QML component using the QObject::findChild() method". 
   2.with QObject'property to fetch the pointer of Flickable.contentItem.
Flikable {
      objectName: "flickArea"
 QDeclarativeComponent component(&engine,QUrl("main.qml"));
 if(component.status() != QDeclarativeComponent::Ready){
     foreach(const QDeclarativeError &error,component.errors()){
 QDeclarativeItem *mainView = qobject_cast< QDeclarativeItem *>(component.create());
 QDeclarativeItem *flickArea = mainView->findChild< QDeclarativeItem * >("flickArea");
 QDeclarativeItem *contentItem = qvariant_cast< QDeclarativeItem * >(flickArea->property("contentItem"));

//pass contenItem as item's parent.
ItemInserted   *item = new (contentItem);

That's all.Btw.
If you are a qml enthusiast,qml-Box2d(http://gitorious.org/qml-box2d) plugins is on the
way,here,Maybe it's useful for you to write fantastic game or something related stuff.
of course,HappyFrog is an opensource project,you can find here
you can also checkout the latest source which is hosted on the my gitorious page.
git clone git://gitorious.org/happyfrog/happyfrog.git


Sth From Norway

This morning,I got sth which is sent from Norway,meanwhile I have been accepted as a Qt Ambassador.Maybe It's good news for me during these times(seems like the T-shirt isn't fit me,small size would be fine),
Btw,I am working on a qt-apps integrated with Box2d and Declarative UI,I call it "Happy Frog" and about to prepare to release these days,stay tuned.



Recent thoughts:my future

I suppose that everyone who gets involved with qt or focuses on Symbian, Maemo(Meego in the future) has been aware of the collaboration between Nokia and Microsoft.First time I heard of this, I feel shocked and then a lot of disappointment.You know,I am looking forward to the Meego platform for a long time.I am eager to get n900 mobile device still now.I stick to suppose that the Meego platform is still the first option for Nokia as mobile device operation system before this happened.But finally Nokia choose the Microsoft as parter and select window phone 7 as new platform.For my part,I have no idea if this is huge mistake for Nokia.For my part,I have no right to judge or criticize the collaboration or anyone involved with this,which should be on the agenda of those "Big man",not for nobody like me.Indeed,It's none of my business.I think I just an recent-undergraduate who get falling in love with qt programming from second year of college life and also a little "kid" in programming area.........
On the flip side,I really hope qt has a brilliant future,as well for nokia(without question,Qt never let us down).also hope Lots of people who love free and open (software) can continue concentrating on qt or any other (open source) related stuff instead of turning more attention on the wp7.I will guarantee that I will not get involved with wp7,so don't count me in.
Yeah,It's really tough time.at this point it reminds me of a famous blog post The fightback starts now.Comparision with burning platform,it's so obvious that "angry bird" is not the right person for that position.hum.Just let it go and see what happen next.Good luck to nokia.hope I am on the right way.


It's OK now

Happy Chinese New Year.

I am home now for spring festival.I suppose I've wasted two days on busy with getting together at home or restaurant to have dinner with families.There are also days when people get around the city ,go camp or travel.But for me,home is the cheeriest place in the world.I can get up late or do some stuff on my own Laptop,such as configuration meego environment.
To be frankly,It is very slow when I startup meego-simulator.I suppose my laptop is not bad.
Processor: Inter core2 Due T9600 @ 2.80GHz
Graphics card: Nvidia Quadro FX770M
Operating system: Kubuntu 10.04.2 LTS

And when I run my first meego app "Hello world",I get the info
"..........QGLContedxt::makeCurrent():Cannot make invalid context current..........".Obviously,something is wrong with my graphics card driver.And the desktop effect was failed as well when I launch it.Think think twice,I find that I forget updating the video card driver when I upgrade linux kernel.oh,My gosh.
Fortunately,Nvidia release new display drivers for linux recently.
It takes a little time to install the latest version.then I take snapshot on glxgears.Of cause,everything is OK again now.



A Simple Qml Game - Thumder

Yeah,I've not updated my blog entry for a long time.Last blog entry was five months ago. one reason is I am basically a lazy guy,the other is busy work Frankly.Look back upon the past three months(First Workday on 10.18 2010),many things happend to me: a good job looks like,great changes in my routine life,work on project I am good at,making some innovative work with one or two talent guys.totally, a new journey for me has come to the beginning and I am on my way.

  screenshot of  Thumder
Btw,I spend free time writing  a small pure qml game(Thumder) instead of complex qt-apps integrated with qml like qDou.I am sure someone has played it in their childhood.:-) this simple one is just a part of a another interesting project(What's it ? secret).And when that interesting project is done.It will be going to wonderful,people will barely be able to comprehend it.But actually it's very easy.Maybe in the next post, I will give some details on It.

get the source code
git clone git://gitorious.org/thumder/thumder.git

Be good all.