I hope this is the right place to put this, I'm new here
As the title states, I've been doing game dev in my home for years, and have used many programming languages, mainly but not limited to: C/C++, Java and AS3 (flash).
I'm new to Objective C, and have been reading around, searching and following tutorials, and of course messing with code myself. I've got a good grasp on the language now I think, but still not general iPhone dev.
I'm mainly interested in game development (which is why i put this here), and for now just 2D. I know of API's such as Cocos2D, however, whether I decide to use them or not, I'd like to understand all the basics going on in the background, and get some hands-on experience with them first.
With that said, I have a bunch of questions I'm looking for quick, concise answers to all in one spot to help clear things up for me (and hopefully others that may come across this).
Alright guys, here goes :P
1. The whole NIB thing.. I haven't really used Interface Builder, and the whole concept makes things more confusing. I also find it to be overkill for games, since your app is likely to be less UI heavy, and menu's will be pretty straightforward (most of the time). I've found out how to dump nibs all together and define your views programmatically, which at this point I prefer. However I'm wondering if there are any advantages/disadvantages to using NIBs for game development specifically. I'm sure they'd be great for general apps with lots of indepth UI. For those you making games, which do you prefer?
2. While I'm getting used to Objective C now, I still am pretty clueless on the iOS APIs, the XCode IDE, etc. Lately I've mostly used Eclipse or Eclipse-based IDE's, which have amazing code hinting and code completion. You can document pretty much all of your code with clean comments (as are all the built in API's), which makes everything quick and easy. I know XCode has code completion, but it's not as robust. In Eclipse, you just type a class or instance name and . and wait a second and a list pops up with all the variables and functions, and you can go through the list and it displays all the details documents in the comments. This makes it really easy if you forget features, or if you're not used to a certain object and have no idea what it includes or what it's capable of. I was wondering if there a feature or plugin like this available for XCode?
3. From what I read, everyone seems to discourage using primitives, and use object such as CGFloat or NSNumber, for example, instead of just a regular float. The reason being cross-platform compatability (OS, processor, 32 vs 64 bit, etc). For the past view years I've used Java and flash, which run in VM's, so I never had to worry about this. I'd prefer using float, int etc because it looks way cleaner in my opinion. I was wondering, since the iPhone devices are available as-is, are there any differences in them that I would need to worry about such issues? IE. There's no need to worry about 32bit vs 64bit iOS's, correct. I've read they're all 32 bit, and don't even support double datatypes, so just using a plain old float should be safe?
4. GRAPHICS!! As I said before, I'm mainly interested in 2D right now, and on computers, OpenGL is still a great choice for 2D games. However, I was wondering if this is the best option on the iPhone, or is there a better alternative? My games will be pretty graphically intensive, so the power of OpenGL would be great, but I'm not sure how well it is handled. If you're doing 3D, it's the only choice, but is the intensity of running an OpenGL based app on iOS devices more of a drawback if you're only rendering in 2D? Or does it provide better acceleration even with just 2D? I'm mainly looking at this from a performance perspective.
5. The best way to run a game loop? The only thing I'm aware of right now for accomplishing this is by using and NSTimer. Is this the best option? If so, how accurate and consistant is it? Can I rely on it for a fixed timestep? Or should I correct it or use a variable dt?
6. Using the game loop and views (menus). It's clearly best to take advantage of the built in UI to handle GUI and menus/etc, but from what I understand so far, each view (menu/state) needs it's own view controller. I'm used to having a general loop, and a state switching system, which just calls update/draw on the current state every frame, so the main loop/timing system isn't just incorporated in the game "view." This seems to be different for the iPhone though, as most tutorials I see have an NSTimer within the gamestate view controller, however, most tutorials only have the 1 game state view. So what is the best way to handle state switching (views/controllers) and the main loop? Do I even need a running loop to handle simple game menu's if I'm using the built in UI?
7. I haven't really looked into this yet, but I figure I'll put it in here. I have never really used multithreading, but it seems it is a must for iOS apps, especially if you're handling button events, touch events, and rendering a game at the same time. Is this true? If so, what is the most common way of splitting processes up?
That is all for now lol, thanks for reading such a long noobish post.
Any help is appreciated