摘要Python语言是一种面向对象的解释型的计算机编程语言,同时也是一种功能强大而完善的通用型语言,在脚本语言中拥有最丰富和强大的类库,足以支持绝大多数的日常应用。本文主要介绍了Python语言的基础语法、使用技巧,并展示利用Phthon语言独立编制几种小游戏的过程。本文分为四个部分。第一部分简单介绍了Python的发展历史和优缺点,分析了Python在国内外的发展现状以及选题的意义与目的;第二部分介绍了Python语言的基本语法;第三部分介绍了Python语言的核心模块——函数部分;最后一部分是本文的重点,着重分析和介绍了Pygame模块,并展示完成2D游戏大鱼吃小鱼这一课题要求的过程。实现了玩家通过键盘控制小鱼的运动,躲避鲨鱼的追捕的游戏功能,而鲨鱼通过预先的设定,具备自动追踪小鱼的运动轨迹并进行拦截的人工智能。在研究过程中,掌握了Python的基本应用,学会了游戏开发的基本流程,完成了课题目标。64887
毕业论文关键词 编程语言 Python 游戏设计 人工智能
毕业设计说明书(论文)外文摘要
Title Python Language Game Design Application
Abstract
Python is an interpreted object-oriented computer programming language. It’s also a powerful and complete universal language. It has a most rich and powerful class library in scripting language, enough to support the vast majority of everyday applications. This paper describes the basic syntax and using skills of the Python language,shows the process of using Python writing several games independently. This paper is pided into four parts. The first part describes the history and the advantages and disadvantages of Python.Then it analysis Python’s development status at home and abroad ,meaning and purpose. The second part describes the basic syntax of the Python language. The third part introduces the core modules of Python—function. The last part is the focus of this paper. It analysis and introduces the Pygame module.Through programming to realize the process of 2D game Shark and Fish. It achieves the function that player can use keyboard to control the movement of fish. The shark through pre-set, can automatic tracks the trajectories of fish and intercepts the fish by AI. In the course of the study, I mastered the basic application of Python,learned the basic process of game development and achieved the goals.
Keywords Programming language , Python , Game design , AI
目 录
1 绪论 4
1.1 PYTHON概述 4
1.1.1 Python的概念与历史 4
1.1.2 设计哲学与定位 4
1.1.3 python的特点 5
1.1.4 Python的局限性 6
1.1.5 python国内外现状 6
1.2 选题的目的与意义 7
1.2.1 选择Python的理由 7
2 PYTHON基础 9
2.1 PYTHON语法 9
2.1.1 Python的变量和赋值 9
2.1.2 Python的数据结构 10
2.1.3 Python的序列 11
3 函数 17
3.1 内建函数 17 Python语言2D游戏大鱼吃小鱼游戏设计应用:http://www.751com.cn/jisuanji/lunwen_72284.html