审核我的游戏项目或(如何对我的项目进行同行评审)?
我刚刚用 C++/Allegro 完成了一个 2D 平台游戏。 它仍处于不完整的阶段......
我想知道如何与从事游戏开发的人进行同行评审。 我想根据
- 游戏玩法、
- 碰撞检测、
- 面向对象编程的使用
- 声音、效果等
- 当前代码的任何进一步的想法
- 来回顾我的项目,我可以采取更好的方法
- 来优化
,在某些地方看起来像是垃圾......所以您还可以建议一些简化技术吗?
您可以通过更新的链接查看我的项目(如果您愿意) - nincompoop (直接链接)
http://ideamonk.googlepages.com/nincompoop_distro.rar
截至目前,我正在切换到 C# 和 XNA,发现它非常轻松快速地学习所有内容,因为 -
http://catalog.xna 给我留下了深刻的印象.com/GameDetails.aspx?releaseId=341
我无意在这里销售任何产品或推广任何东西...我的目的是从更优秀的人那里获得变得更好的建议。 至于我上传项目的页面,它不支持任何类型的广告。 所以请放心。
I just finished a 2d platformer in C++/Allegro. Its still in an incomplete stage...
I wonder how to go about a peer-review from people who are into game development.
I would like to review my project on grounds of
- game play
- Collision detection
- use of OOP
- programming of sounds, effects etc
- any further ideas
- ways in which i could have done better
- ways to optimize
current code looks like a garbage at some places... so could you also suggest some simplification techniques?
you can view my project (if you wish) at updated link - nincompoop (direct link)
http://ideamonk.googlepages.com/nincompoop_distro.rar
As of now I am switching to C# and XNA, finding it very easy and fast to learn all because I'm impressed from -
http://catalog.xna.com/GameDetails.aspx?releaseId=341
I do no intend to sell any product or popularise anything here... my intent is to get tips to be better from people who are better. As for the page where I have uploaded my project, its not supported by ads of any kind. so please feel safe.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在源代码中注意到的第一件事是,大部分游戏逻辑都在 main.cpp 文件中,嵌套深度达 11 个选项卡! 出于代码组织的目的,这是一场噩梦。 当然,我在第一场比赛中也这么做了。 :) 您可以做的第一件事就是简化您的主游戏循环,使其看起来像这样:
其他所有内容都应该重构到您的 game_object 类中。 通过这种方式管理会更容易,而且您的代码实际上可能适合页面,因为您可以避免深层嵌套。 如果您发现代码的深度超过 3 个选项卡,那么您所做的任何事情都需要重构为另一个方法,甚至是一个单独的类。
我的第二个建议是用更理智的东西替换你的 goto,如下所示:
The first thing I noticed in your source code is that you've got most of your game logic is in the main.cpp file, with the nesting going as deep as 11 tabs! For code organizational purposes, this is a nightmare. Of course, I did this too on my first game. :) The first thing you can do is simplify your main game loop to look something like this:
Everything else should be refactored into your game_object class. It will be much easier to manage this way, also your code might actually fit on the page since you can avoid deep nesting. If you find your code getting more than 3 tabs deep, then whatever you are doing needs to be refactored into another method or even a separate class.
My second suggestion would be to replace your goto's with something a little more sane like this:
回顾上一集 -
我不明白为什么人们投票反对你并冒犯你。 继续做好工作... – Daok(27 分钟前)
要求同行评审有什么严重错误吗? 在按下向下按钮之前请想一想,明天您可能也需要同行评审! – Abhishek Mishra(26 分钟前)
@Daok:这正是我 58 秒前想知道的! – Abhishek Mishra(25 分钟前)
这很愚蠢。 它可能不符合 SO 问题的典型模式,但同行评审并不是一件坏事,也不值得进攻,更不用说 4 票反对了。 – Thomas Owens(23 分钟前)
@Mitchel Sellers:你知道吗,当我从事这个项目时,关于游戏开发进行了很好的讨论..所以我认为将其放在评论中会很好..但是@stackoverflow ...事情真的很棒! ycombinator 人群更加聪明,他们提出了令人惊叹的反馈 – Abhishek Mishra(21 分钟前)
我认为这可能是问题的措辞和语气。 这听起来更像是产品公告,而不是寻求帮助的问题。 如果它被表述为“如何正确地对我的项目进行同行评审”等,那么人们可能不会那么严厉。 – Mark Ingram(21 分钟前)
重点是,这不是 Stack Overflow 的用途。 这是为了询问具体的技术问题。 – Remi Despres-Smyth(19 分钟前)
哎哟...是的,当我输入问题时,它在我的脑海中滚动...让我将其改写为一个真实问题! :) – Abhishek Mishra(18 分钟前)
,人们也可以提供有关如何改进游戏的技术反馈..此外,我还将提供源代码以供审核! 有什么办法可以再次提出问题吗? – Abhishek Mishra(17 分钟前)
我已经要求进行代码审查,并在这里收到了它。 Abhishek,如果有人重新打开此文件并且您可以对其进行编辑,请查看此问题:K & R 练习:我的代码可以工作,但感觉很臭; 清理建议? 作为代码审查问题示例。 – John Rudy(12 分钟前)
@John:谢谢! 希望它有效!
RECAP from previous episode -
I do not understand why people vote you down and offensive. Keep the good work... – Daok (27 mins ago)
anything awefully wrong in asking for a peer review ? think before hitting the down button, tomorrow you might too be in need of peer review! – Abhishek Mishra (26 mins ago)
@Daok : thats what I was precisely wondering 58 seconds ago! – Abhishek Mishra (25 mins ago)
This is silly. It might not fit the typical mold of a SO question, but a peer-review isn't a bad thing, and not worthy of an offensive much less 4 down votes. – Thomas Owens (23 mins ago)
@Mitchel Sellers : you know what, there had been a good discussion over game dev while I was working on this project.. so I thought it would be good to put it up fr review.. but @ stackoverflow ... things are really great! ycombinator crowd is yet more intelligent, they come up wid amazing feedbacks – Abhishek Mishra (21 mins ago)
I think it might be the phrase and tone of the question. It sounds more like product announcement, than a question for help. If it had been phrased as a "How to properly peer-review my project" etc then people might have been less harsh. – Mark Ingram (21 mins ago)
Point is, this is not what Stack Overflow is for. It's for asking specific technical questions. – Remi Despres-Smyth (19 mins ago)
woops... yeah it was rolling in my mind as I typed the question... let me rephrase it into a REAL question! :) – Abhishek Mishra (18 mins ago)
and one could've as well given technical feedbacks as on how to improve the game.. besides I'm putting up the source code for review as well! Is there any way to OPEN a question again ? – Abhishek Mishra (17 mins ago)
I've asked for code review, and received it here. Abhishek, if someone reopens this and you get to edit it, look at this question: K & R Exercise: My Code Works, But Feels Stinky; Advice for Cleanup? as a code review question example. – John Rudy (12 mins ago)
@John : Thanks! hope it works!