• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What are the best practices to follow while developing a game in Android ?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to know what are the best practices to follow while developing a game in Android ? And I also wanted to know do I need knowledge about C++ also?




Amol L. Chavan

 
author
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me start with your second question: no, you don't need to know C++ to write games for Android! You can get along with Java just fine. For complex physics calculations you have to go native, but there exist JNI wrappers already so you can still stay in Java.

Answering your first question is a tough cookie. Let me try to cover at least some essential aspects:

- On Android you have to make sure to cooperate with the garbage collector. This means that you should avoid allocations of new obejcts in your main loop as good as possible.
- You should avoid draining the battery by only enabling sensors like the accelerometer if you really need them.
- Your game should respect the life cycle of an Android Activity: pausing and resuming have to be implemented so that users can get back to the game and pick up from where they left.

There are many more aspects you should give some thought, however, these mostly depend on the APIs you use for creating the game, such as OpenGL ES. Explaining them all in here would be a bit to much
 
reply
    Bookmark Topic Watch Topic
  • New Topic