建立一个C#和放大器; XNA“怪物短跑”般的游戏 [英] Creating A C# & XNA 'Monster Dash' Like Game

查看:167
本文介绍了建立一个C#和放大器; XNA“怪物短跑”般的游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我决定,我在去年的C#项目将是一个怪物短跑般的游戏,我想开发它使用C#和XNA,它会为个人电脑,我使用Microsoft Visual Studio 2010和XNA游戏工作室4.0为目标。本场比赛将是一个2D游戏,而不是3D。

I decided that my last year C# project would be a 'Monster Dash' like game, I would develop it using C# and XNA, and it would be targeted for PCs, I am using Microsoft Visual Studio 2010, and XNA Game Studio 4.0. The game would be a 2D game, not 3D.

这是发展过程中的思考,有几个问题上升:

Thinking on the development process, a few problems rise up:

第一,我需要建立一个'排序的,平台的,哪些球员将运行,并让他们之间的孔和间隙(这将随机出现),我不知道如何要做到这一点!唯一接近的东西,我发现或许可以解释这是一个样本code称为'的一些成熟的微软,我不明白(这将是很好的人可以解释他们使用那里的方法,或者更好/更简单的方式)。

First, I need to create a 'sort-of-platforms' which the player will run on and will have holes and gaps between them (which will appear randomly) and I have no idea how to do that! The only close thing I've found that might explain that is an sample code called 'Platformer' from microsoft, which I did not understand (it would be nice of someone could explain the method they use there, or a better / more simple way).

,我需要玩家跳跃(为了避免缝隙和孔洞,并继续运行),我不知道如何处理该功能的物理部分,我会真的很高兴,如果有人能提出一个方法来处理,或点到code一个有用的棋子。

Second, I would need the player to jump (in order to avoid the gaps and holes and continue running) and I have no idea how to approach the physics part of that feature, I would be really happy if someone could suggest a way to handle that, or point to a useful piece of code.

感谢进取,iLyrical。

Thanks ahead, iLyrical.

推荐答案

没有错,只是因为它是2D的,一个平台游戏并不是一件容易的事。所以我会建议你使用任何第三方库的帮助,你可以得到,使用XNA和C#已经是一个很好的起点。接下来的事情,而这正是你的问题来了,如何解决物理?你可以把它写在你自己的,这是一个很好的学习经验,但如果时间是至关重要的它可以是艰难和令人烦恼。所以,我建议使用第三方lib中,像先知。也许的小教程就派上用场了藏汉。

Make no mistake, just because it is 2D, a platformer is not an easy task. So i would suggest you use any third party library help you can get, using XNA and C# is already a good starting point. Next thing is, and this is where your questions come in, how to solve the physics? You could write it on your own, which is a nice learning experience but if time is crucial it can be difficult and frustrating. So i would suggest using a third party lib for that, like Farseer. Maybe this little tutorial comes in handy aswell.

但同样,这绝对不是一件容易的事。根据你的技能,我当然不知道,我会建议一个简单的游戏,如果它必须是一个游戏在所有。游戏是propably最困难的编程任务,你可以想像。 同时与多个子系统(图形,人工智能,声音,输入,物理)处理;让他们一起工作已经是一项艰巨的任务,但其内容(精灵,WAV文件,音乐,菜单GFX等)是自己另有一个兽。

But again, this is definitely not an easy task. Depending on your Skill, which i of course don't know, i would suggest an easier game, if it must be a game at all. Games are propably the most difficult programming task you can imagine. Dealing with multiple subsystems simultaneously (Graphics, AI, Sound, Input, Physics); making them work together is already a huge task, but having the content (Sprites, Wavs, Music, Menu gfx, etc.) is another beast on its own.

最后一个建议是,如果你不明白的一些成熟code;看了一遍,并再次,如果你不明白某些部分了解他们,直到你理解他们。如果您有问题,C#先学会它,从来没有停止学习。另请阅读尽可能多的教程和code有关的游戏,你可以找到。怎么看,为什么其他人解决问题,他们做的方式是很重要的。

A final advise is, if you don't understand the Platformer code; read it again, and again; if you don't understand certain parts read about them until you understand them. If you have problems with c# first learn it and never stop to learn it. Also read as many tutorials and code about games you can find. It is important to see how and why are other people solving problems the way they do.

这篇关于建立一个C#和放大器; XNA“怪物短跑”般的游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆