Full version of fire basketball game source code-standard game development documents and source code Game Development
Fire basketball, through simulating the reality of the shooting game machine, and the shooting game machine is originated from the street basketball, the street basketball originated from the United States, and now has become popular in the world of sports competitions, separate the shooting part into a shooting game machine. Become a specialized shooting game device. This game is to bring the shooting game machine to the mobile phone. You just need to move your finger to enjoy the fun of the shooting game machine.
With the help of a third-party physical engine Bullet, fireball uses OpenGL ES 2.0 for Image Rendering and uses the touch technology of smartphones to create a small mobile phone game. Players touch the screen, click the ball, and move their fingers. The program uses the player's moving direction and distance to convert the shooting direction and initial speed.
Source code download: http://code.662p.com/view/796.html
Next, we will give a brief introduction to the planning of this game. In actual game development, this step needs to be more detailed, more specific, and more comprehensive. The planning of this game is listed below.
Target Platform for running
Preparations before development the preparation of the game mainly involves non-code preparations before development, including the following two aspects.
Prepare image resources
Preparation of sound resources
Production of the basket Model
<Ignore_js_op> brief introduction of each class
There are many classes developed in this game. In order to allow readers to better understand the roles played by each category in the game, this section briefly introduces the functions of each class based on the previous framework categories.
Implementation of a class BasketBall_Shot_Activity
The BasketBall_Shot_Activity class is the controller of the entire game and is mainly responsible for game screen cutting and other operations. In the development of this game, you must first develop this class.
Implementation of helper interface-related classes
Next, we will introduce other interfaces of this game except the main game interface. The development steps are as follows.
Main menu interface CaiDanView class
Record interface JiLuView class
Implementation of game interface related classes
Next we will introduce the related categories of the main game interface.
Game interface drawing class GLGameView
Add a rigid body to the physical world class TianjiaBody
Add capsule Rigid Body to physical world class JiaoNangTianjiaBody
Basketball control class BasketBallForDraw
Texture rectangle painting class WenLiJuXing
In the next section, we will introduce the colorants used in this game. Only the texture coloring machine light coloring machine shadow coloring machine dashboard background coloring Machine
Optimization and improvement of games
Although the overall game scenario is already brilliant, readers and friends can make further improvements based on their hobbies and habits. The overall style can be redesigned based on their preferences.
This game is just a one-minute shooting game with only one ranking. Adding other tricks may make the game more playable and challenging, allowing more players to stay in the game.
This game uses a third-party Open-Source Physical engine. Because the physical engine uses JBullet, it still runs slowly and adds more objects to the physical world, or you may not be able to guarantee the speed to meet more functional requirements. If you change to CBullet, the speed will be faster.