摘要:随着社会的发展,人们生活的步调日益加快,越来越多的人加入了全球化的世界。人们不再拘泥于一小块天地,加班,出差成了现代人不可避免的公务。而此时一款可以随时随地娱乐的游戏成了必需品。贪吃蛇这一游戏简单易行,操作方便,娱乐性较强,吸引了不少人。这一款游戏紧紧地抓住了人们的心理,虽然简单,却其乐无穷,在人们不断追求更多的欲望下,该游戏给人们带来了追逐的快感,以及成功后的满足感。
当前科学技术飞速发展,特别是微电子技术,计算机软件与应用技术的发展,使得人们的日常生活丰富多彩。单片微型计算机(简称单片机)作为微型计算机家族的一员,以其独特的结构,良好的稳定性,便宜的价格在嵌入式领域广泛应用。与传统的PC上设计的贪吃蛇游戏不同,本次我们利用32X32点阵屏硬件,采用51单片机最小系统以及独立按键等搭建硬件平台,采用C语言编程,在51单片机上实现便携地贪吃蛇游戏。
关键词: 单片机;游戏;点阵屏;贪吃蛇
Abstract:With the development of society, people increasingly to speed up the pace of life, more and more people joined the globalization of the world. People no longer tied to a small piece of heaven and earth, overtime, travel became modern inevitable official. And right now a can at any time anywhere the game became entertainment necessities. Snake the game is very simple and convenient operation, is entertaining, attracted a lot of people. This game clutched the people's psychology, simple, but fun, in constant pursuit of more people desire, the game has brought people chase of pleasant sensation, and sense of success.
The current rapid development of science and technology, especially the microelectronics technology, computer software and application technology development makes the People's Daily life rich and colorful. Single chip computer (hereinafter referred to as SCM) as a miniature computer part of the family, with its unique structure, good stability, cheap price in embedded field widely used. And the traditional PC design snake game is different, the 32 X32 bitmap screen we use hardware, USES the 51 SCM system and minimum independent such as keys in building hardware platform, using C language program, in 51 SCM to achieve the portable snake game.
Key words:MCU; game; lattice screen; snake
贪食蛇游戏是一款非常经典的游戏,贪食蛇的设计比较复杂,它涉及的面广、牵涉方面多,如果不好好考虑和设计,将难以成功开发出这个游戏。本文的选题是以传统的贪食蛇游戏为出发点,基于51单片机点阵屏的贪食蛇游戏,以结构化语言C语言为基础,实现单人玩的智能贪食蛇动画游戏。首先,论述了选题的目的和意义,然后选择了自己熟悉的C语言作为开发语言,紧接着分析了此游戏软件要实现的功能,最后如何设计和实现这些功能。
贪食蛇之所以取这样的名字,其用意还是很明显的,贪食蛇其实并不贪,它是人不断地追求的象征,就像现代的人只有不断努力向前才能得到自己想要的。而食物也是随机出现的,就像现在社会存在的机会,而我们只有找好自己的目标才能成功。