我应该始终在 Silverlight 游戏中使用游戏循环吗?

发布于 2024-08-04 03:35:26 字数 294 浏览 6 评论 0原文

我读过有关在 silverlight 中使用 CompositionTarget.Rendering Timer 进行主要游戏循环的内容。用于命中测试和一般游戏逻辑,就像任何语言一样。

这就是说,我想知道最好一次在这个 x 像素内移动对象(作为任何其他语言的游戏),或者我可以更好地利用 silverlight 动画并使用缓动等功能吗?

我所指的对象是俄罗斯方块和乒乓球等游戏中的对象,而不是用户移动角色的平台游戏。

另一个领域是精灵动画。例如,步行动画是否最好通过游戏循环更改帧或关键帧 silvrelight 动画来完成?

I have read about using CompositionTarget.Rendering Timer for the primary gaming loop in silverlight. To be used for hit testing and general game logic as would be done in any language.

This said I was wondering is it best to move objects around inside this x pixels at a time (as a game in any other language) or can I utilise silverlight animations better and use such features as easing?

The objects I refer to would be in games such as tetris and pong rather than a platform game where the user is moving a character around.

The other area is sprite animation. For example is a walking animation done best with the gaming loop changing frames or keyframe silvrelight animations?

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

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

发布评论

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

评论(1

傾城如夢未必闌珊 2024-08-11 03:35:26

这是有关 silverlight 中游戏循环的非常好的信息来源
http://blogs.msdn.com/nikola/archive/2009/08/19/expose-5-methods-to-create-game-loop-which-is-the-best.aspx< /a>

为了解决你问题的核心......我认为这一切都归结于内容管道。我的意思是你应该问自己。哪种方法可以让内容创建者(可能是也可能不是您)更轻松地创建动画?在大多数情况下,您希望优化该过程,对于许多游戏来说,该过程比实际编程需要更长的时间,并且是由技术含量较低的人员完成的。

here's a really good source for information about game loops in silverlight
http://blogs.msdn.com/nikola/archive/2009/08/19/exposed-5-methods-to-create-game-loop-which-is-the-best.aspx

To address the core of your question ... I think it all comes down to the content pipeline. What I mean by that is that you should ask yourself. Which method makes it easier for the content creator (which may or may not be you) to create animations? For the most part, you want to optimize for that process, which for many games takes longer than the actual programming, and is done by less technical folks.

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