Preface:I have been studying C # at school for a while, and it has reached the so-called simpleProgramIt is a little effort-consuming to compile a slightly complex program. A complicated program is a daunting level! At the cainiao level, I was thinking about writing a Nb program of my own, a software that could be used by countless people! However, I cannot eat hot tofu in a hurry. I 'd better lay the foundation and say no to being small or not. I cannot be impetuous in learning this field. It is still necessary to make one step at a time!
Question: idea of creating a brick game
I think everyone has played the brick-hitting game. It can be seen everywhere on mobile phones and flash websites, so I am no longer familiar with the features of this game. It mainly includes the following scenarios:
Objects in the game: bezel, ball, and Brick!
Scenario 1: The control bezel enables the ball to finish all the bricks, win, and increase points!
Scenario 2: The game is over because the bezel cannot hold the ball!
......
With a preliminary model, you can analyze the characteristic behavior of each object in detail. With the necessary logical relationship, a small game is born!
First, let's take a look at the basic characteristic behavior of objects in the game:
Baffle Plate: The baffle plate has long, short, and moving direction and speed;
Ball: Size, movement
Bricks: size and shape
(Set your own hobbies and ideas ......)
Basic logical relationship:
The direction key controls the baffle plate to the left to the right. The ball is blocked by the baffle plate and rebounded from the reflection angle. When the boundary rebounded from the reflection angle, the bricks rebounded from a random angle. The bricks disappear and the points increase; if all the bricks are knocked down, the game is over. If the ball is not caught by the baffle, the game is over!
Postscript:This game mainly involves some of my own ideas andCodeImplementation, not to mention a lot of underlying mechanisms for designing patterns and some classes, such as the operating principle of GDI + (the reason is that my theoretical knowledge is not very good, some classes may be used but do not have a clear running mechanism. This is also one of the shortcomings of my learning. Sorry !)
The level of language and C # is limited. It is inevitable that there are omissions or misinterpretations in the compiling area. I hope you can point it out! I am very grateful for the guidance from experts!