Каковы “глюки” при разработке iPhone Game? [закрытый]

Мои js файлы обычно следуют соглашению о присвоении имен, подобному этому:

  • lib xxx.utility.js
  • mypage.events.js
  • xxx.common.js
  • / /
  • /OS-DoNotDistribute/lib /

, Где

  • 'mypage' является названием HTML, aspx, php, и т.д. файл.
  • 'xxx' является понятием. (т.е. orders.common.js)
  • 'утилита' показывает, что это - допускающий повторное использование сценарий библиотеки (т.е. ajax.utility.js, controlfader.utility.js)
  • 'распространенный' допускающая повторное использование функциональность для этого приложения, но не допускающий повторное использование через другие проекты
  • , 'lib' является подкаталогом для любых внешних сценариев или сценариев библиотеки
  • , 'ОС-DoNotDistribute' является подкаталогом для обеспечения ОС, лицензируемый код распределяется, если приложение когда-либо продается.

кроме того, для ajax, у меня есть специальное соглашение о присвоении имен для, вызывают назад функции, таким образом, легко сказать, каковы они.

я не уверен это, это близко к тому, что Вы искали, но я надеюсь, что это помогает.

9
задан iwasrobbed 2 January 2013 в 12:21
поделиться

2 ответа

Основное различие между бизнес-приложениями и играми, особенно на мобильных устройствах, заключается в важности производительности. Приложение, которое создает форму и ожидает ввода пользователя, вероятно, пока что ничего не делает. С другой стороны, игровой цикл происходит постоянно и, вероятно, делает много. Бизнес-программисты не привыкли думать в этих терминах, но игры расходуют заряд батареи, и, хотите верьте, хотите нет, то, как вы реализуете свою игру, будет иметь большое влияние на то, насколько быстро разрядится эта батарея.

Итак, один вопрос что это за игра, которую вы «должны» разработать? Если это судоку, не беспокойтесь. Если это трехмерная космическая битва в реальном времени, это уже другая история.

Если ваши бизнес-приложения были на iPhone, вы, вероятно, использовали 100% Objective-C. (Если вы работали с приложениями C # или Java на компьютерах, Тогда добро пожаловать в управление своей собственной памятью.) Есть те, кто скажет вам, что управление типами времени выполнения в Objective-C слишком медленно для сложных игр. Конечно, люди делают нормальные игры, используя его с Cocos2D и другими движками, но опять же, это зависит от игры. Есть профессиональные разработчики, которые будут работать только на C ++ или даже на чистом C.

2
ответ дан 4 December 2019 в 06:27
поделиться

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.

Some of these things will depend on whether you are programming a 3D game or going for the 2D platform style.

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.

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.

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.

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.

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.

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.

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.

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++.

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.


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.

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.

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.

Here are some others to check out:

Ston3D for iPhone

OOlong Engine

SIO2Engine

iTGB for 2D Games

36
ответ дан 4 December 2019 в 06:27
поделиться
Другие вопросы по тегам:

Похожие вопросы: