VC++µÄ̹¿Ë´óÕ½ÓÎÏ·_¼ÆËã»úרҵÂÛÎÄ·¶ÎÄ
·¢²¼Ê±¼ä£º
2015-01-16
À´Ô´£º
ÈË´ó¾¼ÃÂÛ̳
¼ÆËã»úרҵÂÛÎÄ·¶ÎÄ
ÕªÒª
̹¿Ë´óÕ½ÊÇÒ»¿î·Ç³£¾µäÓÎÏ·£¬·çÃÒÈ«Çò£¬¾¾Ã²»Ë¥£¬ÊÇѧϰÃæÏò¶ÔÏóµÄ±à³Ì˼ÏëµÄÀíÏëʵÀý¡£ÏÖÔÚÃæÏò¶ÔÏóµÄ¼ÆËã»ú±à³ÌÓïÑԺܶ࣬¶¼¿ÉÒÔ±à³ÌÀ´ÊµÏÖ¡£
±¾ÎĵÄ̹¿Ë´óÕ½ÓÐÍêÕûµÄ½çÃæ,Äܹ»ÊµÏÖÈË»ú´óÕ½. ¶øÇÒ̹¿Ë´óÕ½ÓÎÏ·¾çÇé·Ç³£¼òµ¥,ÓÎÏ·µÄÖ÷½ÇÔÚ±£»¤ºÃ³Ç±¤µÄÇ°ÌáÏ£¬ÏûÃðËùÓеĵÐÈË£¬ËùÒԷdz£ÈÝÒ×ÉÏÊÖ.µ«¾çÇé¼òµ¥²¢²»´ú±í¹ý¹Ø¼òµ¥.ÓмøÓÚÒÔÇ°³öÏÖµÄ̹¿Ë´óÕ½ÓÎÏ·¹ýÓÚ¼òµ¥,ʹÍæ¼ÒÓÐË÷È»ÎÞζµÄ¸Ð¾õ.Õâ´ÎÔÚÓÎÏ·ÀïÌرð¼ÓÇ¿ÁËÄѶÈ,µÐÈË̹¿ËµÄ³öÉúµØ±ä³ÉÁË5¸ö£¬²¢ÇÒµÐÈËÒ²Äܹ»È¡µÃ±¦Îµ±ÔÚË«ÈËģʽÏ£¬ÈçÍæ¼Ò̹¿Ë±»¼º·½Ì¹¿Ë´òµ½Ê±£¬»áÍ£ÔÚÄÇÀïһЩʱ¼ä¡£±¾ÎÄÓõ½ÁËÅöײËã·¨£¬ÒÔ¼°µÐÈË̹¿ËµÄÖÇÄÜ¿ØÖÆ¡£
²»Í¬ÓÚÍøÂçÉÏÒѾ³öÏÖµÄ̹¿Ë´óÕ½,±¾³ÌÐòÊÇÓÃVC++±àдµÄ,ÓµÓÐƯÁÁµÄÈË»ú½»»¥½çÃæ. ±¾ÂÛÎÄ´ÓÒÔ϶þ¸ö·½ÃæÀ´²ûÊö:1.ÓÎÏ·µÄ±³¾°2.ÓÎÏ·µÄ¿ª·¢¹ý³Ì
¹Ø¼ü´Ê£º Ëã·¨ , VC++ , ̹¿Ë´óÕ½
ABSTRACT
A Battle City is very classic games, swept the globe and lasting, learning object-oriented programming thinking of the ideal example. Now a lot of the object-oriented computer programming language can be actualized. This paper Battle City complete interface to achieve human-machine war. The plot of the Battle City game is very simple. The protagonist in the game to protect the castle, under the premise of eliminating all enemies, it is easier to get started. But the plot does not mean a simple clearance simple. In view of the previous game too simple Battle City alone, the player is dull anyway. This game in particular to strengthen the degree of difficulty, enemy tanks into the birthplace of five, and the enemy could also be achieved in the collection, the double model, Players such as tanks hit by its own tanks, will stop there for some time. This paper uses a collision algorithm, the enemy tanks and intelligent control.
Different from the network that have appeared Battle City, this procedure is programming by the Visual C + +, having beautiful man-machine interface. This paper from the following two aspects to elaborate : 1. Background 2. Games development process
Keywords£ºarithmetic £¬VC++ £¬ Battle City
Ŀ¼
ÕªÒªI
ABSTRACTII
µÚ1Õ Ð÷ÂÛ1
1.1 ±³¾°1
1.2 ÈÎÌìÌúÍBattle City±³¾°½éÉÜ2
1.3 Ñо¿ÄÚÈÝ3
µÚ2Õ ¿ª·¢»·¾³¼°Ïà¹Ø¼¼ÊõµÄ½éÉÜ4
2.1 ¿ª·¢»·¾³4
2.2 C++Ìصã4
2.3 DirectXµÄÌØÉ«5
2.4 ±¾ÕÂС½á8
µÚ3Õ ¹¹½¨ÓÎÏ·´°¿Ú×¼±¸9
3.1 ÉèÖÃVisual C++Ó¦ÓóÌÐòÖеÄÍ·Îļþ9
3.2 ½¨Á¢³ÌÐòÏîÄ¿10
3.3 ±¾ÕÂС½á13
µÚ4Õ ³ÌÐò½á¹¹Ë¼ÏëºÍÏà¹Ø¼¼Êõ14
4.1³ÌÐòÁ÷³Ì14
4.2ϵͳ¿ò¼ÜÉè¼Æ14
4.3³ÌÐò·ÖÎöºÍ¾ßÌåʵÏÖ15
4.3.1 ÓÎÏ·½øÈëÇ°µÄÑ¡Ôñ15
4.3.2 Ö÷ÓÎÏ·Âß¼¼°ÆäÉæ¼°µ½µÄÈô¸ÉÀà16
4.3.3 ±¦ÎïµÄÖÖÀà18
4.3.4 ̹¿ËµÄ¹²Í¬ÐÐΪ19
4.3.5 Íæ¼Ò̹¿ËµÄ¹¦ÄÜÊôÐÔ20
4.3.6 µÐÈË̹¿ËµÄ¹¦ÄÜÊôÐÔ22
4.3.7 ×Óµ¯µÄÔËÐкͿØÖÆ25
4.3.8 µÃ·ÖÓë¹Ø¿¨µÄÏÔʾ27
4.3.9 DirectInput¼üÅÌ27
4.4 ±¾ÕÂС½á32
µÚ5Õ ½áÂÛ33
5.1 ±¾³ÌÐòµÄ×ܽáºÍÕ¹Íû33
5.2 ¾ÑéºÍ¸ÐÏë33
ÖÂл34
²Î¿¼ÎÄÏ×35