Should I always use a Gaming Loop in a Silverlight Game?

最后都变了- 提交于 2019-12-04 22:04:07

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/1351499/should-i-always-use-a-gaming-loop-in-a-silverlight-game

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!