Am used to developing business and reference apps. Now I have to do an iPhone game. What tips can you share to help me with:
我习惯于开发业务和参考应用程序。现在我必须做一个iPhone游戏。您可以分享哪些提示来帮助我:
- understanding the scope of the project
- defining the deliverables
- specifying the game play and other parameters
- estimating the development effort
- testing the game
了解项目的范围
定义可交付成果
指定游戏和其他参数
估计开发工作量
测试游戏
A big question, I know. Thanks!
我知道一个很大的问题。谢谢!
2 个解决方案
#1
2
The main difference between business apps and games, especially on mobile devices, is the importance of performance. An app that puts up a form and waits for user input probably isn't doing anything in the meantime. A game loop, on the other hand is going all the time and probably doing alot. Business programmers are not used to thinking in these terms, but games draw down battery power and, believe it or not, how you implement your game will have a great effect on how quickly that battery is drawn down.
商业应用和游戏之间的主要区别,尤其是移动设备,是性能的重要性。提出表单并等待用户输入的应用程序可能在此期间没有做任何事情。另一方面,游戏循环一直在进行,可能还有很多。商业程序员不习惯用这些术语来思考,但是游戏会降低电池电量,不管你信不信,你实现游戏的方式会对电池的消耗速度产生很大的影响。
So, one question is, what is this game that you "have to" develop? If it is sudoku, no worries. If it's a real-time 3D space battle, that's another story.
所以,有一个问题是,你必须“开发”这个游戏是什么?如果是数独,不用担心。如果这是一场实时3D太空战,那就是另一个故事。
If your business apps were on the iPhone, then you probably used 100% Objective-C. (If you were doing C# or Java apps on desktops, then welcome to managing your own memory.) There are those who will tell you that the runtime type management of Objective-C is too slow for complex games. People certainly make OK games using it with Cocos2D and other engines, but again it depends on the game. There are professional developers who will only work with C++ or even straight C.
如果您的商业应用程序在iPhone上,那么您可能使用了100%Objective-C。 (如果你在台式机上做C#或Java应用程序,那么欢迎管理你自己的内存。)有些人会告诉你,Objective-C的运行时类型管理对于复杂的游戏来说太慢了。人们当然可以使用Cocos2D和其他引擎制作OK游戏,但这又取决于游戏。有些专业开发人员只能使用C ++甚至直接使用C语言。
#2
36
My answer is not following the waterfall methodology response you were looking for because I think you will need to learn the skill of game programming before you can plan, design, implement and test it. Game programming is VERY different to business programming and a whole other field in and of itself.
我的答案不是遵循您正在寻找的瀑布方法响应,因为我认为您需要先学习游戏编程的技巧,然后才能进行规划,设计,实施和测试。游戏编程与业务编程和其他整个领域本身非常不同。
Due to your lack of experience in programming games there are a few concepts that you will need to learn before you can program a game period, let alone one on the iPhone.
由于您缺乏编程游戏的经验,因此在编写游戏时段之前需要了解一些概念,更不用说iPhone上的概念。
Some of these things will depend on whether you are programming a 3D game or going for the 2D platform style.
其中一些将取决于您是编程3D游戏还是2D平台风格。
OpenGL ES The first thing you will need to learn is the OpenGL ES programming language. This is basically a 3D API which enables you to do drawing of 3D primitives. You will still need to use this if you are coding a 2D game as it is quick due to using the GPU for acceleration. There are some good tutorials on the Google that you should begin with.
OpenGL ES您需要学习的第一件事是OpenGL ES编程语言。这基本上是一个3D API,使您可以绘制3D基元。如果您正在编写2D游戏,由于使用GPU进行加速,您仍然需要使用此功能。您应该从Google开始有一些很好的教程。
Vector Math If you are doing anything 3D, you will need to learn about 3D vector math, vectors are basically used for everything in games, camera look direction, position of characters, speed, collision detection, etc. 2D vectors (x,y) minus the z component are still needed for 2D games programming.
矢量数学如果您正在做任何3D操作,您将需要了解3D矢量数学,矢量基本上用于游戏中的所有内容,相机外观方向,角色位置,速度,碰撞检测等.2D矢量(x,y)减去z组件仍然是2D游戏编程所必需的。
Collision Detection How do I know when my ball hits the wall? The answer is collision detection. There are many forms of collision detection such as Sphere to Sphere, AABB, OOBB, Convex Hulls, Triangle Mesh, etc.
碰撞检测我怎么知道我的球撞到墙上的时间?答案是碰撞检测。有许多形式的碰撞检测,如球体到球体,AABB,OOBB,凸壳,三角网格等。
AI How do I get the enemy to attack my player character? Artificial intelligence is another large field essential to give NPCs/Enemies the ability to make intelligent decisions. AI can be simple such as if else statements but usually requires Finite State Machines or Fuzzy logic to be effective.
AI如何让敌人攻击我的玩家角色?人工智能是让NPC /敌人做出明智决策能力的另一个重要领域。 AI可以很简单,例如if else语句,但通常需要有限状态机或模糊逻辑才能有效。
Pathfinding If you want to move a character from Point A to Point B while avoiding enemies and moving obstacles, you will need to use a pathfinding algorithm. A Star (A*) is one of the most popular.
寻路如果要将角色从A点移动到B点,同时避开敌人并移动障碍物,则需要使用寻路算法。 A Star(A *)是最受欢迎的。
Scene Graph If you wish to have 10-20+ enemies on screen at a time, you will need to code a scene graph to manage the dynamic drawing, logic and creation and deletion of resources. If you don't know what polymorphism is you will need to know it as it is essential for your game objects to adhere to and it ties in with the scene graph.
场景图如果您希望一次在屏幕上有10-20个敌人,则需要编码场景图以管理动态绘图,逻辑以及创建和删除资源。如果你不知道什么是多态,你将需要知道它,因为它对你的游戏对象必须遵守并且它与场景图相关联。
Physics Position, Speed, Acceleration, Gravity and Rays are all represented using vectors and you may need to brush up on your physics math in order to code any game. Start with Newton's Second law of motion F=MA (Force = Mass * Acceleration). An open source physics engine such as Bullet, ODE, Newton, Tokamak will make things easier, meaning you won't need to write these physics rules yourself.
物理位置,速度,加速度,重力和光线都使用矢量表示,您可能需要刷新物理数学以编码任何游戏。从牛顿的第二运动定律开始F = MA(力=质量*加速度)。像Bullet,ODE,Newton,Tokamak这样的开源物理引擎会让事情变得更容易,这意味着你不需要自己编写这些物理规则。
Objective-C++ This is optional although recommended. If you don't know C++ this is essentially a mixture of C++ and Objective-C. I tend to use C++ for the core game engine and programming because of the speed of C++ and availability of third party libraries in C++.
Objective-C ++虽然推荐使用,但这是可选的。如果您不了解C ++,那么它本质上是C ++和Objective-C的混合体。由于C ++的速度和C ++中第三方库的可用性,我倾向于将C ++用于核心游戏引擎和编程。
Sound If you need sound you can just go ahead and use the simple audio frameworks that Apple provide, however 3D positional audio is going to require something better. I would recommend learning the FMOD SDK for iPhone. As @Stowelly mentioned, FMOD requires a license for commercial distribution but there are others you can look for which are royalty free.
声音如果您需要声音,您可以继续使用Apple提供的简单音频框架,但3D位置音频将需要更好的东西。我建议学习适用于iPhone的FMOD SDK。正如@Stowelly所提到的,FMOD需要商业发行许可,但还有其他一些你可以寻找的免版税。
Use a Game Engine There are game engines available for the iPhone at the moment which will make it much easier for you to get a game going, in your case this will be faster although you will still need to learn the concepts I mentioned above.
使用游戏引擎目前有一些可用于iPhone的游戏引擎,这将使您更容易进行游戏,在您的情况下,虽然您仍需要学习我上面提到的概念,但速度会更快。
Here are some game engines I know of:
以下是我所知道的一些游戏引擎:
Unity3D This probably the most popular one that I know of. Unity is a PC/Mac game engine that lets you write code on the Mac and compile for Windows/Linux/Mac OS X. I doubt the iPhone building is compatible directly with other platforms, I would imagine you'd be restricted to iPhone if you started a new project. This engine does however have a commercial deployment cost of $199-$399.
Unity3D这可能是我所知道的最受欢迎的一个。 Unity是一款PC / Mac游戏引擎,可让您在Mac上编写代码并编译为Windows / Linux / Mac OS X.我怀疑iPhone构建是否与其他平台直接兼容,我想你会被限制在iPhone上你开始了一个新项目。然而,该引擎的商业部署成本为199美元至399美元。
Cocos2D This one is an open source 2D game engine that might be useful for a lot of games. Worth taking a look at. Hosted on Google code.
Cocos2D这是一款开源2D游戏引擎,可能对很多游戏都有用。值得一看。托管在Google代码上。
Here are some others to check out:
以下是其他一些要查看的内容:
适用于iPhone的Ston3D
iTGB for 2D Games
#1
2
The main difference between business apps and games, especially on mobile devices, is the importance of performance. An app that puts up a form and waits for user input probably isn't doing anything in the meantime. A game loop, on the other hand is going all the time and probably doing alot. Business programmers are not used to thinking in these terms, but games draw down battery power and, believe it or not, how you implement your game will have a great effect on how quickly that battery is drawn down.
商业应用和游戏之间的主要区别,尤其是移动设备,是性能的重要性。提出表单并等待用户输入的应用程序可能在此期间没有做任何事情。另一方面,游戏循环一直在进行,可能还有很多。商业程序员不习惯用这些术语来思考,但是游戏会降低电池电量,不管你信不信,你实现游戏的方式会对电池的消耗速度产生很大的影响。
So, one question is, what is this game that you "have to" develop? If it is sudoku, no worries. If it's a real-time 3D space battle, that's another story.
所以,有一个问题是,你必须“开发”这个游戏是什么?如果是数独,不用担心。如果这是一场实时3D太空战,那就是另一个故事。
If your business apps were on the iPhone, then you probably used 100% Objective-C. (If you were doing C# or Java apps on desktops, then welcome to managing your own memory.) There are those who will tell you that the runtime type management of Objective-C is too slow for complex games. People certainly make OK games using it with Cocos2D and other engines, but again it depends on the game. There are professional developers who will only work with C++ or even straight C.
如果您的商业应用程序在iPhone上,那么您可能使用了100%Objective-C。 (如果你在台式机上做C#或Java应用程序,那么欢迎管理你自己的内存。)有些人会告诉你,Objective-C的运行时类型管理对于复杂的游戏来说太慢了。人们当然可以使用Cocos2D和其他引擎制作OK游戏,但这又取决于游戏。有些专业开发人员只能使用C ++甚至直接使用C语言。
#2
36
My answer is not following the waterfall methodology response you were looking for because I think you will need to learn the skill of game programming before you can plan, design, implement and test it. Game programming is VERY different to business programming and a whole other field in and of itself.
我的答案不是遵循您正在寻找的瀑布方法响应,因为我认为您需要先学习游戏编程的技巧,然后才能进行规划,设计,实施和测试。游戏编程与业务编程和其他整个领域本身非常不同。
Due to your lack of experience in programming games there are a few concepts that you will need to learn before you can program a game period, let alone one on the iPhone.
由于您缺乏编程游戏的经验,因此在编写游戏时段之前需要了解一些概念,更不用说iPhone上的概念。
Some of these things will depend on whether you are programming a 3D game or going for the 2D platform style.
其中一些将取决于您是编程3D游戏还是2D平台风格。
OpenGL ES The first thing you will need to learn is the OpenGL ES programming language. This is basically a 3D API which enables you to do drawing of 3D primitives. You will still need to use this if you are coding a 2D game as it is quick due to using the GPU for acceleration. There are some good tutorials on the Google that you should begin with.
OpenGL ES您需要学习的第一件事是OpenGL ES编程语言。这基本上是一个3D API,使您可以绘制3D基元。如果您正在编写2D游戏,由于使用GPU进行加速,您仍然需要使用此功能。您应该从Google开始有一些很好的教程。
Vector Math If you are doing anything 3D, you will need to learn about 3D vector math, vectors are basically used for everything in games, camera look direction, position of characters, speed, collision detection, etc. 2D vectors (x,y) minus the z component are still needed for 2D games programming.
矢量数学如果您正在做任何3D操作,您将需要了解3D矢量数学,矢量基本上用于游戏中的所有内容,相机外观方向,角色位置,速度,碰撞检测等.2D矢量(x,y)减去z组件仍然是2D游戏编程所必需的。
Collision Detection How do I know when my ball hits the wall? The answer is collision detection. There are many forms of collision detection such as Sphere to Sphere, AABB, OOBB, Convex Hulls, Triangle Mesh, etc.
碰撞检测我怎么知道我的球撞到墙上的时间?答案是碰撞检测。有许多形式的碰撞检测,如球体到球体,AABB,OOBB,凸壳,三角网格等。
AI How do I get the enemy to attack my player character? Artificial intelligence is another large field essential to give NPCs/Enemies the ability to make intelligent decisions. AI can be simple such as if else statements but usually requires Finite State Machines or Fuzzy logic to be effective.
AI如何让敌人攻击我的玩家角色?人工智能是让NPC /敌人做出明智决策能力的另一个重要领域。 AI可以很简单,例如if else语句,但通常需要有限状态机或模糊逻辑才能有效。
Pathfinding If you want to move a character from Point A to Point B while avoiding enemies and moving obstacles, you will need to use a pathfinding algorithm. A Star (A*) is one of the most popular.
寻路如果要将角色从A点移动到B点,同时避开敌人并移动障碍物,则需要使用寻路算法。 A Star(A *)是最受欢迎的。
Scene Graph If you wish to have 10-20+ enemies on screen at a time, you will need to code a scene graph to manage the dynamic drawing, logic and creation and deletion of resources. If you don't know what polymorphism is you will need to know it as it is essential for your game objects to adhere to and it ties in with the scene graph.
场景图如果您希望一次在屏幕上有10-20个敌人,则需要编码场景图以管理动态绘图,逻辑以及创建和删除资源。如果你不知道什么是多态,你将需要知道它,因为它对你的游戏对象必须遵守并且它与场景图相关联。
Physics Position, Speed, Acceleration, Gravity and Rays are all represented using vectors and you may need to brush up on your physics math in order to code any game. Start with Newton's Second law of motion F=MA (Force = Mass * Acceleration). An open source physics engine such as Bullet, ODE, Newton, Tokamak will make things easier, meaning you won't need to write these physics rules yourself.
物理位置,速度,加速度,重力和光线都使用矢量表示,您可能需要刷新物理数学以编码任何游戏。从牛顿的第二运动定律开始F = MA(力=质量*加速度)。像Bullet,ODE,Newton,Tokamak这样的开源物理引擎会让事情变得更容易,这意味着你不需要自己编写这些物理规则。
Objective-C++ This is optional although recommended. If you don't know C++ this is essentially a mixture of C++ and Objective-C. I tend to use C++ for the core game engine and programming because of the speed of C++ and availability of third party libraries in C++.
Objective-C ++虽然推荐使用,但这是可选的。如果您不了解C ++,那么它本质上是C ++和Objective-C的混合体。由于C ++的速度和C ++中第三方库的可用性,我倾向于将C ++用于核心游戏引擎和编程。
Sound If you need sound you can just go ahead and use the simple audio frameworks that Apple provide, however 3D positional audio is going to require something better. I would recommend learning the FMOD SDK for iPhone. As @Stowelly mentioned, FMOD requires a license for commercial distribution but there are others you can look for which are royalty free.
声音如果您需要声音,您可以继续使用Apple提供的简单音频框架,但3D位置音频将需要更好的东西。我建议学习适用于iPhone的FMOD SDK。正如@Stowelly所提到的,FMOD需要商业发行许可,但还有其他一些你可以寻找的免版税。
Use a Game Engine There are game engines available for the iPhone at the moment which will make it much easier for you to get a game going, in your case this will be faster although you will still need to learn the concepts I mentioned above.
使用游戏引擎目前有一些可用于iPhone的游戏引擎,这将使您更容易进行游戏,在您的情况下,虽然您仍需要学习我上面提到的概念,但速度会更快。
Here are some game engines I know of:
以下是我所知道的一些游戏引擎:
Unity3D This probably the most popular one that I know of. Unity is a PC/Mac game engine that lets you write code on the Mac and compile for Windows/Linux/Mac OS X. I doubt the iPhone building is compatible directly with other platforms, I would imagine you'd be restricted to iPhone if you started a new project. This engine does however have a commercial deployment cost of $199-$399.
Unity3D这可能是我所知道的最受欢迎的一个。 Unity是一款PC / Mac游戏引擎,可让您在Mac上编写代码并编译为Windows / Linux / Mac OS X.我怀疑iPhone构建是否与其他平台直接兼容,我想你会被限制在iPhone上你开始了一个新项目。然而,该引擎的商业部署成本为199美元至399美元。
Cocos2D This one is an open source 2D game engine that might be useful for a lot of games. Worth taking a look at. Hosted on Google code.
Cocos2D这是一款开源2D游戏引擎,可能对很多游戏都有用。值得一看。托管在Google代码上。
Here are some others to check out:
以下是其他一些要查看的内容:
适用于iPhone的Ston3D
iTGB for 2D Games