Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPhone OpenGL ES single or multiple views?

I'm confused on what the best approach is when writing a game for the iphone. The game will be rendered with OpenGL , but im curious when creating the Start Screen, Menu's, High Score page, etc. Do you do all of that with OpenGL or do you create additional UIViews and use the UIKit?

like image 776
chicken Avatar asked Oct 14 '22 16:10

chicken


1 Answers

I don't think there is a best approach. If you have the time to code up menus and high score tables in OpenGL the you have a lot more flexibility - you could for example have a 3d animation going on in the background.

If you code menus, high score tables, etc. using standard UIKit views and switch out the OpenGL view while they are shown then this has the advantage that it's very quick to code (esp. if you took the time to learn to use Interface Builder), but it is inherently 2d. Even though you can still use custom button graphics and fonts to make it look less like a business app, it's still going to look less polished compared to other games in the app store.

What you don't want to do is to layer a transparent UIView over the top of you OpenGL view - this will be very slow.

I personally use Interface Builder generated views to get stuff like menus in while I'm building the rest of the program. The intention is to replace that with OpenGL animated code later. In the end though, it's really down to how much time you have available.

like image 77
U62 Avatar answered Oct 18 '22 12:10

U62