Both LunarLander and JetBoy in the SDK demos have the bug that they
don't handle you pressing the home button in the app - when you
restart the application, it says "application stopped unexpectedly".
These both run render/update in a separate thread, which appears to
not be terminated.

Snake handles home and back buttons quite well. It has a different
structure, it is single threaded. I can simply change the
thread.sleep() to be zero, and use it to implement my game engine in a
single thread. But it actually draws the screen using a
View.invalidate() call, which I have heard is slow, and my app is real
time.

So:

1. Is View.Invalidate() as used by Snake slower than the approach of
locking the surface used by LunarLander and JetBoy, slower enough for
me to care?

2. Can anybody suggest any game samples which correctly implement
system events like the user hitting the home or back button? Many on
the web are obviously derived from LunarLander or JetBoy and have the
same problem.

Peter Webb


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to