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.

Android Game Untitled Week Five

Gameplay is the most important thing in the game. I have played lots of games, from physic to mental, from paper to video. Finally, I will create my own game, so exciting. And then, so frustrating.

Designing a game is not as easy as playing it, I know that before, but it’s more difficult than I imagined. I spent some time to learn basic concepts about game design like game, play. I thought I had some ideas of game design.

Game is an interactive system, and also is a complicated system like the reality. The distinction between boring reality and funny game is game has clear rules and targets and always give feedback to player. A good game in my mind should be neat, don’t have too many factors lead to complexity nor few factors lead to boring.

Because my target platform is mobile phone with touch screen, the control system is also my focus.

Free DiskGenius

This is not a post about pirate software, just relax. DiskGenius is a great disk recovery software on Windows made by Chinese programmer Dahai Li. The English edition is not cheap, it would cost you $69.95. Of course it worth the money, data is priceless. However, there’s a free edition for Chinese customer, mainly because Chinese are not used to buy digital stuff. If you know Chinese, maybe you can try the Chinese edition to save your purse.

WARNING : IF YOU HAVE NO IDEA OF CHINESE, YOU SHOULD BOUGHT THE ENGLISH EDITION, OR YOUR VALUABLE DATA MAY LOST BY MISOPERATION.

Android Game Untitled Week Four

How fast the time is. Actually this week I only spend 2 or 3 days on the project.

I simplified the role creation module. Before that I should wrote a create method for every role class. These classes all inherited from a abstract class, they have different name, and I should call corresponding constructor. The classes I would constructed is saved in a XML file with their names. So I use reflection to construct them with their class name in runtime. Although it would affect the efficiency, considered the mess I wrote for the classes, I can sacrifice some efficiency.

Another work I did was making the main game loop, now we can call it a game not a prototype. Karen made some draft of graphic assets, seems like she is already on the way.

Some Background of Dream Home

Dream Home is a movie directed by Ho-Cheung Pang. This cult film told us a story of a normal woman did some crazy things for the apartment she dreamed of.

Actually the reality is crazier than the film. Since 1994, the system of dividing taxes lead most tax to the central government of China. Local government have more responsibilities but less money to spend. Some provinces found that they can lend the land to land agent for big profit. Because land in China belongs to Chinese people, so the government can not sell it but lend it. There are people live on the land would be lent. If some family don’t want to move to other place, it’s easy to solve it, as you can see in the movie. The officers and agents hire mobs to force the people move. Self-burning cases happened sometimes.

The Chinese housing price is very high. How high it is? For example, Google spent $1.9 billion bought new office in New York, it’s $6600 per square. And the housing price near second ring of Beijing is almost the same. The average annual salary of Beijing citizen is about $7000 and I think the number of New York is more than that.

There’s circle in Chinese society, government lent the people’s land to business men, business men built apartment and sold them to the people. People spent all the money their family have, from grandparents to parents, and also lent big money they should repay with their whole life from bank. The master of the land became the slave of it, the humble servant of the country stole everything of it. That’s the real story of the Chinese dream home.