jbox2d game demo, speed is so slowly...

by zhenng » Thu, 03 Sep 2009 02:30:29 GMT

Sponsored Links
 FPS < 18 on emulator .

Anybody who can show me any game demo ?

My game speed is so slowly.....:(

here is my apk file.



Other Threads

1. Canvas + Bitmap + ColorMatrixFilter is great. How to SAVE the bitmap?

So I have a Canvas which uses a bitmap to store the draw calls on.  I
have applied a ColorMatrixFilter to the underlying bitmap of the
canvas.  It looks awesome when on the phone and during the OnDraw
calls.  The ColorMatrixFilter is making the bitmap look exactly like I
want it when the Canvas is drawn.

Now how do I SAVE the Colormatrix effect?  I normally take the
underlying bitmap that is attached to the Canvas and Bitmap.Compress
save it.  But this method doesn't save the ColorMatrixFilter effect.
How can I get the ColorMatrixFilter to actually alter the Bitmap
itself so I can Bitmap.compress save the damn thing!!

Thanks Everyone,



2. AsyncTask calling onProgressUpdate()

I have a very simple task, which I can't seem to do...

The application runs a background thread to process some files.
As it goes, I thought it'd be nice to just show the progress as it

My first thought was to have a Thread, and call append() on a TextView
from the activity as each file was processed.

That didn't work because of this error:
CalledFromWrongThreadException: Only the original thread that created
a view hierarchy can touch its views.

Ok, so I saw this tutorial, but I can't make it work:

It looks like I should be able to do this:
private class updater extends AsyncTask {
        public TextView tv = null;
        protected Object doInBackground(Object[] args) {
                return((Object) this);
        protected void onProgressUpdate(Object[] msgs) {
                if (msgs != null) {
                        String msg = msgs[0].toString();
        private void trace(String msg) {
             if (tv != null)
                   tv.append(msg + "\n");

As it says in the tutorial:
    * You can specify the type, using generics, of the parameters, the
progress values and the final value of the task
    * The method doInBackground() executes automatically on a worker
    * onPreExecute(), onPostExecute() and onProgressUpdate() are all
invoked on the UI thread
    * The value returned by doInBackground() is sent to onPostExecute
    * You can call publishProgress() at anytime in doInBackground() to
execute onProgressUpdate() on the UI thread
    * You can cancel the task at any time, from any thread

So that should work... I guess.

Problem: Calling publishProgress() steps into a series of binary-only
files, and never invokes onProgressUpdate().

Help? Anyone got a working example of onProgressUpdate()?



3. Query

4. Writing Exif Data

5. Hello world help

6. Shortcomings with Native Gmail App

7. Can I set Exchange to automatically use the other APN (intranet)?