没有合适的资源?快使用搜索试试~ 我知道了~
首页C#游戏编程入门指南:英文版详解
C#游戏编程入门指南:英文版详解
需积分: 50 1 下载量 24 浏览量
更新于2024-07-23
收藏 4.64MB PDF 举报
"C#游戏编程入门"是一本针对初学者设计的详尽教程,特别强调了英文原版的内容,非影印版,保证了高质量的阅读体验。这本书由Thomson Course Technology PTR出版,享有严格的版权保护,禁止任何形式的复制或传播,除非在书评引用时遵循相关规定。 书中详细介绍了C#编程语言在游戏开发领域的应用,特别是利用Microsoft的Windows平台和DirectX技术。C#作为一种面向对象的编程语言,因其易学性和强大的功能,深受游戏开发者喜爱。作者通过深入浅出的方式,引导读者逐步掌握C#的基础知识,如类、对象、继承、多态等,以及如何运用C#进行游戏逻辑设计、图形渲染和用户交互。 TEAMLinG可能是本书的一部分,它可能是某个教学工具或者项目示例,用于帮助读者实践所学知识。书中还特别提到了几个重要的商标,包括Microsoft和DirectX,这些都是微软公司在美国和其他国家的注册商标,体现了它们在游戏开发领域的核心地位。 然而,需要明确的是,由于版权问题,Thomson Course Technology PTR并不提供软件支持,遇到技术问题时,建议读者直接联系相关软件制造商的技术支持团队或访问其官方网站寻求帮助。 "C#游戏编程入门"是一本非常适合想要进入游戏开发领域的C#新手的教材,不仅包含了理论知识,还有实用的项目案例,能够帮助学习者扎实地建立起C#游戏开发的基础,并了解如何与微软技术栈无缝集成。对于有一定英语基础的读者来说,这将是一次高效且富有成果的学习之旅。
资源详情
资源推荐
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280
What You Learned. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283
Part III: Appendixes 285
Appendix A Answers to Review Questions . . . . . . . . . . . . . . . . . . . . . . .287
Chapter 1: The History of C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287
Chapter 2: The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288
Chapter 3: A Brief Introduction to Classes . . . . . . . . . . . . . . . . . . . . .291
Chapter 4: Advanced C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
Chapter 5: One More C# Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
Chapter 6: Setting Up a Framework . . . . . . . . . . . . . . . . . . . . . . . . . .298
Chapter 7: Direct3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
Chapter 8: DirectInput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300
Chapter 9: DirectSound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301
Chapter 10: Putting Together a Game . . . . . . . . . . . . . . . . . . . . . . . .301
Appendix B Setting Up DirectX and .NET . . . . . . . . . . . . . . . . . . . . . . . .303
The .NET Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303
The .NET SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303
Integrated Development Environments . . . . . . . . . . . . . . . . . . . . . . .304
Managed DirectX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304
Setting Up References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307
Contents xv
Only a few short years ago, everyone programmed games in C. There was no question
about it—if you wanted to program cutting-edge games, you did so in C. Sure, C++ was
around, but it was too “slow.” The advanced features that C++ offered took off too much
processing power, and that was simply unacceptable to a game programmer.
Over time, computers got faster and faster and video games got bigger and bigger. Soon,
people realized that games were just getting too big to write in C. When programs were
small, C was a great language to use because there was no real need for a lot of management
in your code. One person could write a program and easily understand what everything
did. But C becomes a problem when programs get bigger; it’s just too hard to manage a
large program written in C. I’m not going to get into why here—if you’ve ever used C,
then you know why.
C++ fixed a lot of problems with C, but maintaining backwards-compatibility was a major
problem, and as a result, C++ ended up being one of the biggest language mutations in
existence. It’s also a great language, but it has a mighty long list of flaws associated with it.
It used to be that your computer was outdated almost the minute you walked out the
computer-store door with it. I found myself upgrading my video card once a year, easily;
true die-hard gamers would upgrade twice or even three times a year! Things aren’t like
that anymore. My computer has been sitting here for a year and a half, and I haven’t
touched the inside of it except to add a new hard drive.
Computers have gotten to a point where they are fast enough to handle most of what you
need them to in a reasonable amount of time, and there’s really no huge benefit to upgrading
your computer to run the newest games because the newest games are so close to reaching
photorealistic quality that huge advances just aren’t being made anymore.
xvi
Introduction
It’s no wonder that “slow” languages like C# and everything else that’s part of .NET are
now becoming popular again. Managed languages like C# take a lot more overhead than
older languages, but they offer so much more in terms of protection that statistically,
you’re much less likely to make bugs in your programs, just because of the way the lan-
guage is designed. Sure, these languages take more processing power to do more checking
for you, but people are realizing that it’s worth it in the end because they allow you to
make games in less time, without worrying about tiny little nuances.
Who This Book Is For
This book is for anyone who wants to learn how to program in C# and DirectX 9. You are
not required to have any knowledge of C# at all in order to read this book, but some pro-
gramming background (in any language) would be helpful.
Additionally, you don't have to go out and buy any tools in order to dig into C# pro-
gramming because everything you need to program in C# is available for free! Look into
Appendix B for more information on getting set up to program in C#.
This book will not be a complete comprehensive guide to C#, DirectX, or game program-
ming in general. It is simply intended to give you a jumpstart into the topic. It would be
impossible to offer a complete guide to any of those topics in a book of this size (and it
would be impossible to offer a complete guide to game programming in a book of any
size), so I’ve gone through C# and DirectX and picked out the fundamental topics to
cover, as well as other topics that are especially important to game programming.
Book Layout
This book is broken into three different parts. Each part and chapter is previewed in the
next sections.
Part I: Learning C#
This section of the book is intended to give you a good look at how to start programming
in C#.
Chapter 1: The History of C#
You can’t get a good grasp of any concept without understanding how it came to be, so
this chapter tells you why C# and .NET were created and how they work.
Chapter 2: The Basics
This chapter will give you a look at your very first C# program and will introduce you to
some basic language concepts, including data types, mathematical operators, variables,
constants, type conversions, conditional logic, and looping logic.
Introduction xvii
Introductionxviii
Chapter 3: A Brief Introduction to Classes
Classes are the basic building blocks of any object-oriented language. This chapter will go
over how to create classes, the differences between value and reference types, garbage col-
lection, structures, functions, constructors, inheritance, enumerated types, and properties.
Chapter 4: Advanced C#
Once you know all the basics of C# programming, this chapter will take you deeper into
the jungle, introducing you to the concepts of namespaces, polymorphism, abstraction,
and basic data structures.
Chapter 5: One More C# Chapter
This chapter goes over all the important topics that weren’t covered in the previous chap-
ters, such as interfaces, exceptions, delegates, file access, random numbers, and more
advanced data structures.
Part II: Game Programming in C#
Now that you’ve gotten all the basic C# stuff out of the way, this section of the book will
introduce you to the basics of accessing DirectX and making a computer game using the
various video, input, and sound components.
Chapter 6: Setting Up a Framework
There’s a lot of setup necessary when you’re initializing the various components of a game;
this chapter goes over how to create a basic framework with which to start your game
projects.
Chapter 7: Direct3D
Graphics programming is one of the most complex parts of games these days, so it’s no
surprise that this is one of the longest chapters in the book. It goes over what you need to
know in order to create a Direct3D device, back buffers, and display formats, as well as
how to handle multi-tasking and how to draw triangles. It also covers color shading,
blending, textures, sprites, and text.
Chapter 8: DirectInput
Getting user input is an essential part of game programming, and this chapter covers it
all, from keyboards to mice and every game device in between. This chapter also covers
force feedback programming.
Chapter 9: DirectSound
Sound is the final major media component of a game. In this chapter, you will learn how
to load and play sounds from disk, and you’ll get to play around with some of the neat
effects programming and 3D sound programming features that DirectSound offers as well.
Chapter 10: Putting Together a Game
In this final chapter, you will learn how to combine the knowledge you gained in all of the
previous chapters and program an actual game, Generic Space Shooter 3000.
Appendixes
There are two appendixes in this book.
Appendix A: Answers to Review Questions
Every chapter has review questions at the end of it, and this appendix contains the answers
to these questions.
Appendix B: Setting Up DirectX and .NET
This appendix goes over how to set up the various components you’ll need in order to
start programming your games in C#.
Here We Go!
You’re ready to start reading (and programming in C#!). If you have any questions I’d be
glad to answer them; just send me an e-mail at CSBook@ronpenton.net. Please be patient
when waiting for a reply—I have many e-mails to answer on a daily basis, and I don’t
always have time to get to them in a timely manner.
Are you ready? You’d better be! Here we go!
Introduction xix
剩余341页未读,继续阅读
就叫隔壁小王吧
- 粉丝: 27
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 构建Cadence PSpice仿真模型库教程
- VMware 10.0安装指南:步骤详解与网络、文件共享解决方案
- 中国互联网20周年必读:影响行业的100本经典书籍
- SQL Server 2000 Analysis Services的经典MDX查询示例
- VC6.0 MFC操作Excel教程:亲测Win7下的应用与保存技巧
- 使用Python NetworkX处理网络图
- 科技驱动:计算机控制技术的革新与应用
- MF-1型机器人硬件与robobasic编程详解
- ADC性能指标解析:超越位数、SNR和谐波
- 通用示波器改造为逻辑分析仪:0-1字符显示与电路设计
- C++实现TCP控制台客户端
- SOA架构下ESB在卷烟厂的信息整合与决策支持
- 三维人脸识别:技术进展与应用解析
- 单张人脸图像的眼镜边框自动去除方法
- C语言绘制图形:余弦曲线与正弦函数示例
- Matlab 文件操作入门:fopen、fclose、fprintf、fscanf 等函数使用详解
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功