我想学习如何用 C# 编写 3D/2D 应用程序(游戏)。我应该读什么?

发布于 2024-12-25 16:17:00 字数 599 浏览 1 评论 0原文

我想在屏幕上显示我的游戏。
我开始编写一些 C# 代码,现在尝试将其中一些代码显示在屏幕上。

我尝试使用System.Windows.Forms / System.Drawing,但我感觉它不适合在这种应用程序中使用。一切都随时从工作线程更新。我必须使用 System.Reflection 并始终调用每个更新。 (方法、属性、添加/删除控件)。我宁愿让我的数据库线程控制信息并让 UI 轮询它需要的部分,而无需反映其自身。

出于可移植性和培训原因,我想留在 .Net 框架内。
我希望我的显示类做的是

  • 在全屏模式下
  • 短时间显示图像,因为全屏缩放模式(加载屏幕)
  • 以全屏缩放模式显示视频(间歇视频)
  • 具有带有按钮和滑块的菜单(菜单、选项、任务选择) )
  • 拥有一个基于立方体的 3D 世界,其中包含移动生物和静态元素,同时显示 2D 叠加层。

为了充实您的想象力 - 想想《地下城守护者 1》这款游戏。

我需要了解哪些软件包? (请包含软件包的链接)
我可以/应该读哪些书? (请包含亚马逊链接)

I want to display my game on the screen.

I started to write a little bit of c# code and I am now trying to get some of it displayed on the screen.

I tried to use System.Windows.Forms / System.Drawing but I have the feeling that it is not meant to be used in this kind of application. Everything gets updated from workerthreads all the time. I would have to use System.Reflection and invoke every update all the time. (methods, properties, add/remove controls). I would rather have my database thread control the information and let the UI poll the portions it needs without anything having to reflect about itself.

I want to stay within the .Net framework for portability and training reasons.

What I want my displayclasses to do is

  • be in fullscreen mode
  • display images for short durations as fullscreen zoom-mode (loadingscreens)
  • display videos in fullscreen zoom-mode (intermission videos)
  • have menues with buttons and sliders (menu, option, mission-selection)
  • have a 3D world based on cubes with moving creatures and static elements while displaying a 2d overlay.

To flesh out your imagination - think about the game Dungeon Keeper 1.

What packages do I need to know about? (please include links to the packages)

Which books can / should I read? (please include links to amazon)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

想你只要分分秒秒 2025-01-01 16:17:00

我真的建议您从 Microsoft 的 XNA 开始,因为他们在使2D/3D 开发变得容易方面做得非常出色,并且您可以在您习惯的环境中工作使用一种美妙的编程语言(C#)编写代码。

一年前,我在 XNA 迈出了第一步。因为我对计算机游戏领域,尤其是 3D 编程领域完全是新手,所以我一直在寻找优秀的文献。

我找到了很多属于这些主题的书。下面我列出了对我入门有很大帮助的书籍,以及在编程过程中参考的参考

  • 亚伦·里德. 学习 XNA 3.0。 O'REILLY 2009(ISBN:978-0-596-52195-0)
  • Riemer Grootjans。 XNA 3.0 游戏编程秘诀 - 问题解决方法。 aPress 2009 (ISBN: 978-1-4302-1855-5)

Rimer Grootjans 有一个非常有用的网站,主题为 XNA游戏开发(至少他一年前就有了;)) - 我详尽地使用他的网站来解决问题和学习 XNA 概念。

  • 迈克尔·C·尼尔. XNA 3D Primer。 WILEY (WROX BLOX)
  • Alexandre Santos Lobao 等。等人。 入门 XNA 3.0 游戏编程 - 从新手到专业人士。 aPress 2009(ISBN:978-1-4302-1817-3)
  • Sean James。 使用 XNA Game Studio 4.0 进行 3D 图形。PACKT 2010(ISBN:978-1-849690-04-1)
  • Rob Miles。 使用 Miscrosoft XNA Game Studio 通过游戏开发进行编程简介。 Microsoft Press 2010

看一下这些书籍,它们特别介绍了 XNA 游戏开发的介绍以及进一步的概念以及一般的 3D 编程。

希望这有帮助:)

I would really suggest you to start with Microsofts XNA because they have done a great job to make 2D/3D development easily accessable and you can work in an environment your are used to writing code in an wonderful programming language (C#).

I've made my first steps in XNA one year ago. Because I was a complete newbe to the field of computer games and especially the field of 3D programming i've been looking some time for good literature.

I found many books that belong to these topics. In the following I list the books that helped me a lot getting started as well as a reference to refer during programming.

  • Aaron Reed. Learning XNA 3.0. O'REILLY 2009 (ISBN: 978-0-596-52195-0)
  • Riemer Grootjans. XNA 3.0 Game Programming Recipes - Problem-Solution Approach. aPress 2009 (ISBN: 978-1-4302-1855-5)

Rimer Grootjans has a very usefull website with topic XNA Game Development (At least he had it one year ago ;)) - I used his site exhaustively for problem solving and learing XNA concepts.

  • Michael C. Neel. XNA 3D Primer. WILEY (WROX BLOX)
  • Alexandre Santos Lobao et. al. Beginning XNA 3.0 Game Programming - From Novice to Professional. aPress 2009 (ISBN: 978-1-4302-1817-3)
  • Sean James. 3D Graphics with XNA Game Studio 4.0. PACKT 2010 (ISBN: 978-1-849690-04-1)
  • Rob Miles. Introduction to Programming Through Game Developmnt Using Miscrosoft XNA Game Studio. Microsoft Press 2010

Take a look in these books they cover introductions as well as further concepts for both XNA Game Development in particular and 3D programming in general.

Hope this helps :)

青衫负雪 2025-01-01 16:17:00

如果您使用 C#,则应该查看 XNA Game Studio。这支持游戏开发的各个方面,包括 2D、3D、输入设备和音频。

它带有大量示例,将是一个非常好的起点。

If you're using C#, you should look into XNA Game Studio. This supports all aspects of game development, including 2D, 3D, input devices and audio.

It comes with lots of samples and would be a really good starting point.

¢好甜 2025-01-01 16:17:00

使用实际上为 C# 游戏编程而制作的包 - XNA应用中心提供了大量入门教程。此链接适用于 2D 游戏。

对于一本书,我发现学习 XNA 4.0 对于任何学习游戏的人来说都是一个很好的资源使用 XNA 进行开发。另外,还有另一本书 - XNA 4.0 游戏开发。我还没读过,但评论说它适合初学者。所以您可能也想尝试一下。

Use a package that is actually made for programming games in C# - XNA. The App Hub has a bunch of tutorials to get you started. This link is for a 2D game.

For a book, I find Learning XNA 4.0 a good resource for anyone learning game development using XNA. Also, there's this other book - XNA 4.0 Game Development. I haven't read it but the reviews say that it's beginner-friendly. So you may want to give that a try as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文