The second course is designed to test report

First, the pilot project name

            冷血的猎人

Second, the experimental project functional description

1, with w, s, a, d Hunter left down control, and can travel obliquely.
2, defeating the enemy, the enemy Bobby a wave of more than
3, enemies appear randomly, aggressive animals will move to the direction of the person, other enemies move randomly
4, there are boundaries, not out of bounds

Third, the project introduces a modular structure (text + overall model)

1, initialization module: Startup (); function: game interface specified aspect, IMAGE reads various images to each object, setting the initial states of the characters of their operation, the beginning number of enemies appear, the character and background display .
2, continuous operation module: updateWithoutInput (): the number of enemies is zero if the number of the enemy, the enemy regenerated, and once generated more than once, up to the maximum. Randomly generated enemy, the enemy of small low-probability, high probability of large enemies, generates a position on the game interface is also random. Part of the enemy generation of people will move to the direction, part random movement, and not out of bounds.
3, the display module: show (), display backgrounds, characters which direction to move, to change the image of a person into a picture of which direction. The enemy's blood is greater than zero, the output enemy picture, or picture is not output,
4, the data input operation of the module: updateWithInput (): custom mouse information, get mouse input, it is determined that the output images of people. Enter the characters move, if you do not reach the boundary, the output images of people when moving, if a boundary, not moving.
5, the end of the game module: gameover (): end of the game, for subsequent processing. (Currently not to this point)

Fourth, implement the interface display

V. code hosting links

https://gitee.com/xqldc/xqldx.git

Sixth, test summary (questions + + solution feelings)

遇到的问题,嗯嗯嗯,问题实在是太多了,就举几个比较有代表性的吧。
遇到的问题一:刚开始输出图片时是一个正方形的有白边的图片,然后很影响美感
解决的办法:在Eeayx中找到了putimage函数的使用方法,发现可以有八个参数,但还是不会,后来问了大佬何磊才会的。
遇到的问题二:输出的人物和敌人图片一直闪,不知道是为啥
解决的方法:用了一个函数FlushBatchDraw();,且必须用在show()函数的末尾,这样就不会闪了
感想:还有一大堆问题没有解决,太多了,难受,但是还是有不错的感觉的,现在的我们做的游戏底层已经建好了,慢慢改善吧。

Guess you like

Origin www.cnblogs.com/xqldc/p/10954751.html