iTorque Technology
Chances are, you already know that iTorque 2D is a professional SDK
used to create games and apps for iOS. In simpler terms, iTorque 2D is a
game engine developed by GarageGames. Game development is one of the
most difficult, yet fun and rewarding, professions in the world.
Using a game engine is not just a shortcut to finishing a game. Using
iTorque 2D will save you the time and effort required to create a
complex rendering system, real time editors, a scripting system and so
on. However, you must also realize that there is a lot of power "under
the hood" that should be harnessed.
Developing an iOS game with Torque is very similar to creating the same
game for a PC or Mac. When it comes to iTorque 2D, you can still create
your game using the WYSIWYG editor, TorqueScript, C++, Objective C, or a
combination of them all. However, you should keep a few concepts in
mind when developing an iOS game:
- Your game and design resolution is very limited
- iPhone screen maxes out at 480x320 for landscape orientation, and 320x480 for portrait orientation
- iPad screen maxes out at 1024x768 for landscape orientation, and 768x1024 for portrait orientation
- The iPhone 4 features double the resolution (960x640) in a 3.5" screen
- Limited texture memory means you will need optimize your assets.
Try to use resolutions that are powers of 2 (16, 32, 64, 512, etc) and
square (when possible). Examples include 64x64, 128x128, 256x256, and so
on.
- Get creative with your input design. You get to use new
touchscreen and accelerometer functionality offered by iOS. On the other
hand, that's all you get. It is still possible to develop racers,
shooters and other genres, but you have to remember your limitations.
- Previously, Torque 2D developers could potentially finish a game
without ever opening the source code. Currently, iTorque developers must open the Xcode solution to test their game on the simulator and
hardware. Additionally, know that source code will always execute faster
than scripting. Anytime you can write in C++ or Objective C, do so.
The Engine
The engine, also referred to as the source code, was developed
entirely in C++ and Objective C. The most important thing to realize
about iTorque 2D is that it is a large, complex system. Having source
code access allows you to extend the engine to be whatever you want and
optimize game play code using a native language.
For instance, if you wish to add in MYSQL functionality or integrate
Box2D, the path is not closed to you. Another benefit of having source
code access is the ability to read through the comments and structures
to gain a better understanding of how the script system is set up.
Do not be intimidated. If you wish to start working with the engine, you
can do so whenever you feel comfortable. These docs will not force you
into the engine.
TorqueScript
TorqueScript is a very powerful, flexible language with syntax
similar to C++. The benefit of writing script code is that you do not
have to recompile your executable, which means you do not have to dive
into the source code. Simply create or modify a script, save it, then
run the game to see the effects. You MUST restart your game in order to
see the script changes.
To utilize TorqueScript you do not need to be a code guru or know the
nitty-gritty specifics of a particular language like C++. If you are
already familiar with the basics of computer programming, you already
have a head start using this system.
Even without prior experience coding or scripting, we have included
several TorqueScript articles that will teach you syntax,
functionality and how to use it in conjunction with the engine and
editors. Still, the more past programming experience you have, the
further ahead you will be when picking up iTorque 2D.
Editors
A large part of your initial learning experience will have you working with iTorque 2D's editors. The key term to remember is WYSIWYG, which stands for What You See Is What You Get. This means you can modify your game's level and immediately receive visual feedback on how it looks.
Builder - The Builder is where you will spend 99% of your time
when putting together your levels, importing assets, building particles,
etc. It is actually a collection of editors that work together to help
combine multiple elements of your game: Collision Editor, Particle
Editor, Scene Editor and so on. You can even tie script code and
behaviors to objects through the Builder.
GUI Editor - GUI stands for Graphical User Interface.
Examples GUIs include splash screens, options dialogs and sometimes in
game HUD (Heads Up Display). With the GUI Editor, you can design and
create your menus, player inventory, a health bar, loading screens, etc.
iTorque 2D vs Torque 2D
iTorque technology was originally built from Torque 2D v1.7.4, which
means the two engines share almost the same work flow. The premise
behind iTorque 2D is that you can develop your game similarly as regular
2D desktop users. Most of the iTorque code is located in an abstracted
platform. If you want, you can even develop a large portion of your game
on PC before testing it on an actual iOS device using a Mac. The OpenGL
ES system has been seamlessly integrated.
With most of the differences beneath the hood, we modified the editors
to make your iPhone development intuitive. The design resolutions have
been tied to your target device's resolution. The same goes for newly
generated projects. Due to the amount of iDevice related variables
exposed to script, we have added new settings and project management
tabs in the editor. Finally, all packaging of an iOS game occurs in
Xcode. If you are a Torque 2D user, you will notice that the Package
Project dialog is no longer available when you are using iTorque 2D's
editors.
Conclusion
Apple's iPhone SDK is an amazing opportunity for independent and
hobbyist developers. With the limitations of mobile development come
opportunities to develop games with lower budgets and smaller teams.
iTorque 2D is a powerful solution to expediting your game's development.
Read through the rest of the documentation to gain a better
understanding of iPhone development and have fun making your game. Good
luck!