[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.

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.

Android Game Untitled Week Two

Well, another week passed, how fast the time is. The LibGdx engine has another awesome feature I forgot on last post, and this is most important feature besides  the speed. LibGdx allows you programs on desktop and debug it, and later run it on Android only need change several lines of code. That’s really speed up my development.

This week I add sprite animation function which LibGdx not support it. And some physic manager class to associate Box2D body with my sprite, and because Box2D not support radial gravity so I made my own with apply force to body.

Beside the programming stuff, Karen is watching the Painter tutorial video, beginning pain with her. I made a draft of  the game play and some basic idea of the background music. A lot of stuff need to do, fortunately I enjoy it.

Android Game Untitled Week One

As my plan for my first Android game is first three month in  2011, the past week surely be my first week on it. I’ll write weekly report of the development.

For the game engine, I have three candidate Rokon, Andengine and LibGdx. Rokon is suck of course, I even can’t run the example Hello World. That’s not my fault, at first I thought I messed it up and after check the Google I found a lot of guys confront the same problem, so Rokon is out. and I glad to see this project is canceled, that’s good for the world. Am I so mean?:-)

I developed with Andengine three weeks for a prototype, and I have to say it’s a good game engine. The reason why I transfer from it to LibGdx only because the later one is better for me. The guys in Badlogic Games is so hard working, I like the updating speed of their blog and the code trunk and I got a lot of useful knowledge from them. The running speed on device is another reason I choose LibGdx. Actually the profiling post let me know this awesome engine, and my own profiling test finally let me make the decision.

In the past week, I wrote a XML parser with SAX and implemented some visual related class based on Stage and Actor. Right now, I can load a XML file and create the game scene. Not too much work I have done in this week, I should hard working.

The logo of our studio is done, but I think it need polish. I will show it at the right time.

Best Time for Indie Game?

FREE? FREE. FREE!

What’s the fashion in game industry right now? Yes, free things for indie gamers.

Few days ago, I heared the Unity 2.6 is totally free for personal and commercial use (the pro version still need some charge) . It’s really good news for pool developers, like me. Oh, wait, good things come in pairs. Epic game announced the free Unreal Development Kit.

In my opinion, I will choose UDK, I can find tons of books tutorial and a big community about it. Beside above, the UDK skill is more helpful for finding a job.