A really good Android flying shooting game source code, Android shooting game

Source: Internet
Author: User

A really good Android flying shooting game source code, Android shooting game

 

A really good Android flying shooting game source code. If you like it, you can study it.
The game has three levels. Adaptive Screen

There are several notes about the game:
1. If you have just entered the game, an error is prompted and you quit. Change the following code in the LoadResource class:

// Load the exploded Image
For (int I = 1; I <= 77; I ++)
{
BitMap m = BitmapFactory. decodeStream (context. getAssets (). open ("explosion/e" + I + ". png "));
// Explosion_list.add (LoadActivity. ScreenWidth <= 320 & LoadActivity. ScreenHeight <= 480? Image. FitTheImage (m, 0.5f, 0.5f): m );
Explosion_list.add (m); // The above sentence is changed to this, because Image. the FitTheImage method constantly calls Bitmap. the built-in createBitmap () method causes OOM. at present, I do not know any good solutions. If not, scale the canvas .. (OOM may also appear in other methods, such as scaling a map)
Count ++;
If (count = 3)
{
Value ++;
Count = 0;
}
}

2. When the Boss launches a bullet, there will be a method to launch a 180 ° bullet. (As shown in the second figure) because I was just learning android, the technology was limited. Write the code to death. In fact, define an angle, and then let this angle increase continuously to achieve the effect of launching a 180 ° bullet.

3. An advertisement program is nested in the program,

4. The jar package used by the program. (GameApi. jar in libs) You can get the source code by decompiling the next decompiled java software on the Internet. I will not upload any more,

6. When the program plays the audio, I declare a SoundPool object for playing each audio. In fact, just declare one.

7, the game source project download: http://code.662p.com/view/4880.html


Demo diagram:
<Ignore_js_op>
 

 

Http://android.662p.com/thread-3247-1-1.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.