Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about Games in Andorid

 
Stole Perov
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, Im trying to create my "skeleton" code for a gaming application.

I have understood the meaning of a thread leading the process through the game. However, I have no idea how to combine all classes and activity's into a single package.

What i would like is a guide in the following:

- I would like to have a class that will extend the View class in which the drawing will be taking place
- I would like to use the class above as display class (setContentView())
- Where do i create a class that implements the runnable class, where do I start the threads, how do I connect all these.

Thanks for your time in advance.
 
Ankit Garg
Sheriff
Posts: 9521
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The android distribution comes with a sample game application "LunarLander". You can view its source code to get the info you need...
 
Stole Perov
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replay. However, i found the lunar lander and found it a bit messy.

If you understand it, can you please translate it for me?
 
Stole Perov
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, I have managed to find the perfect algorithm for GAMES.



So, my question is something like this:

1. In which class do i put all of these functions?
2. In which class do i implement the runnable class?
3. In which class do i put the View class?

Final and most important

4. HOW do i connect all of these together.

Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic