Moving to oz

[nggallery id=3]

Moving countries is not an easy job to do, especially when the great Air China only allows their passengers in economic class to take the maximum of 20kg luggage. So basically I got rid of a lot of stuff in Beijing and posted books and files here to Sydney, which is also prohibitively expensive. The thing is that you never know what you will need when you go to another country no matter what other migrants tell you. But here we go, I pulled it off and landed in oz two weeks ago.

The weather was a bit disappointing when I landed in sydney airport and saw the rain outside. Oh come on, that’s not what I come here for. However, it’s getting better and better. Friendly people, fresh air, clean streets, I felt all refreshing. Oh btw, big thanks to Karen Deng, a girl that I got to know a few years ago in chongqing, who helped me a lot with settlling down.

Living in hostel can be fun if you live with the right roommates, and Elliott is one of them, who is a new migrant from Britain and tries to get a music teaching job here in oz. He is a very talented jazz guitar player, and we even jammed a little bit for fun with me singing some standard jazz songs. Our daily routine is going to a place called “incafe” for its free wifi service because hostel charges you 7 dollars for using 3-hour wifi, and then head to either pepper lunch or hungry jack’s for food. In the afternoon, we went to inspectthe room that we intended to rent.

We saw some of the worst accommodations ever and I couldn’t imagine the accomodation here can be that bad. In one instance, it is only a mattress behind sofa with a curtain drawing over and seperating the space in a big living room and the landlord claims it as a self-contained space, while the another one is just like a temporary shed without any foundation built in a backyard. It takes me almost two weeks to find this apartment and Elliott is still searching. Good luck!

Funny people are everywhere, arent they. Crazy Lauren, a girl who tried to accost my roommate on the train and gave him her number when we were about to get off, “Ursulla”, a friend of Crazy Lauren who looks just like Ursulla in “Little Mermaid” and whom my roommate and I dislike, the aussie guy, who snores like thunderstorm back in our hostel and who even woke himself up by his own snoring.

Bla bla bla…. but important thing is “hey, I am in oz now!”

Come on George

George went to Aus! 

And it seems he gradually gets use to the life there. It’s easy to accept the new things there.The sky is bule and the beach looks clean and beautiful. I can even smell the fresh air from the other side of the earth,

Come on G! You will find your new career there :)

[Solved]Can’t resume from Sleep on Nexus S with Libgdx

When I test my game on my Nexus S, strange things happened. I pressed power button in my game, the phone fall asleep and my game paused. After touched the power button again, the screen is black and nothing showed up.

After check the forum of Libgdx, I found the method to solve this problem.

by mzechner » Mon Feb 21, 2011 8:05 pm

Ay. Could you do me a favor and add

<activity android:configChanges=”orientation|keyboard|keyboardHidden” … >

to your activity tag?

I’ll try to reproduce this locally with the phones i got.

After add the android:configChanges parameter in my AndroidManifest.xml, everything is OK.

Real life and dream

I think i have make a very difficult decision and tell matrix that i really not like what he ask me to do. I feel angry when he said ” oh~ no, this is not what i want”. Sometimes i feel shame as i have already promise him. And whenever i stay in chair to draw, i just can’t calm down.

Recently, i dye my hair to red, and yes, that night, i haven’t done anything. Such kind of things always let matrix feel disappointed. i know it’s no excuse and yes, I’m a lazy guy. The most important thing is i can’t keep my words., this do real make me feel bad. If  I keep on working like this , i will ruin my relationship with matrix and this do influence my real life.

I always think i’m a nice person and can do nearly everything. But this time, i was failed and i feel like a bad guy and keep on crashing the dream of matrix.

I need to work, and also should hold the dream. So i think i need to push myself and adjust the mode to working at home. I need keeping on working working working and then finally i may feel happy,who knows. Although I don’t want to live in the other people’s dream,  i don’t have my dream anyway. 

Most Chinese people’s dream money, so it’s so hard to make me feel right  on the way to pursue other things. I hate my flexibility.

 To make clear about real life and dream is hard, and life is hard, isn’t it?

Wildlife~what a good idea

Recently, i got the email form a UK company Chameleon Worldwide. it provides the wildlife tour for their guests.

The designed this itinerary to take in the best of the Qinling Mountain reserves where giant pandas live, thus increasing  chances of sightings. There is a high chance of seeing giant panda at Foping Nature Reserve. And also have the opportunity to see other Chinese wildlife such as crested ibis and golden monkey.

It’s exciting, isn’t?  My childhood is in Chongqing along the Yangtse river, and once there were various species. Now, it seems the city process lick up everything. We can only see the beautiful creature in the video or the book.

I have never thought about the nature reserve center can be a good place to go,I totally foget this. Why? I don’t know, but thanks to that company that makes me overlook the place again. And now i have aim and it’s encouge me to do something i really like.

life is hard, isn’t it?

It’s very ridiculous that as a Chinese that I need use the VPN, cross the ” Wall”  and then i can visit my own blog. So life is hard, and so freedom is so prciou.

On wednesday night, the luck draw was picked up by my boy friend and we got a free night in Songtsam Lodges besides Mt. Meili, it’s a 5 star hotel and each night cost 1600 RMB. What a surprise and we begin to thinking about how to spend a night there. So first, we need take plan to Shangrila and then take the local bus to Deqin and then about 10 km we can arrive at that fabulous hotel. For the airticket and tranport cost, it’s far more than 2000 RMB and just one night there, oh~my~ god!

life is hard, even you win a lucky draw~

ClassCastException when use TexturePacker of Libgdx

The weekly report of Android Game Untitled is paused, the game is still in  progress.

TexturePacker is useful extension class of Libgdx, it packed all images in one folder to one image with power of 2 width and height and create a pack file record the coordinate info of each sub image. With TextureAtlas you can  load subimage from the assembled one easily. Why we use this not directly use several images. That’s because

1.The width and height of Texture should be pow of 2, that’s not convenient when you want use other width and length.

2.Loading several images is slower than loading one.

When I use the TexturePacker I get an exception

Exception in thread “main” java.lang.ClassCastException: [B cannot be cast to [S
at sun.awt.image.ShortInterleavedRaster.getDataElements(ShortInterleavedRaster.java:245)
at com.matrix.libgdx.util.TexturePacker.squeeze(TexturePacker.java:362)
at com.matrix.libgdx.util.TexturePacker.addImage(TexturePacker.java:98)
at com.matrix.libgdx.util.TexturePacker.<init>(TexturePacker.java:78)
at com.matrix.libgdx.util.TexturePacker.process(TexturePacker.java:748)
at com.matrix.libgdx.util.TexturePacker.process(TexturePacker.java:837)
at com.matrix.libgdx.util.MyPacker.main(TexPacker.java:12)

Because I don’t find any others who confronted the same problem, I think it’s maybe my fault. After digging a while, using debug I found the reason, Every time when squeeze a special file the source.getAlphaRaster() return a ShortInterleavedRaster and that lead to the exception.

I have no idea of this png file, it’s same as others to me. And the only difference between them maybe the special one made by Photoshop and others by GIMP. It seems like the alpha raster of image made by Photoshop is short not byte. It’s just my guess, not sure about that. After removed it, everything is OK. :lol:

Android Game Untitled Week Six

Alpha 1 released, hurrah!

The whole game is nasty right now, I should add real graphic stuff, animation, sound, music, better UI and more funny gameplay. Although there is a lot of things to do and at the same time I learned a lot of things.

The art style in this game is cartoon like, I found a great vector design tool Inkscape. It’s easy to use and have a lot of tutorial, and it’s free and open source, great tool for indie game group with limited budget like us.

In this game, I want some sprites always on the top. However, libgdx can not create multi-layer or set the z-order directly with the Stage class. Update: Different from AndEngine, the multi-layer is implement with groups in libgdx(thx the heroes  behind libgdx, I’ll think twice before post :-) ). All actor in stage drew in the order of adding in stage. Later added actor on the top of before ones. There’s a easier way to implement multi-layer in stage. Create some Groups, each group behalf of one layer, the later added group has bigger z-order, the last group is always on the top. Then just add actors to the  group  instead of adding them to the stage directly. The basic multi-layer function has done.

In this week, I’ll concentrate on the graphic and gameplay.