Looking for some guidance on game loop and 2d/3d view switching
3 posters
Looking for some guidance on game loop and 2d/3d view switching
Hiya,
I'm new to SIO and OpenGL programming on the iPhone, but have some experience with C and Objective-C. I think the potential of SIO2 is great and am looking to use it for some game development going forward.
I was hoping for some guidance on how the game loop would fit into a SIO2 app, and also how you might flip between 2D views (i.e. menu) and 3D views (character generation / the actual game).
It seems that the game loop would become part of EAGLView and rather than just calling startAnimation, you could have custom functions here for example to go straight into a static 2d menu when the game was launched (with some 2d buttons etc), before going into a full 3d game with appropriate game state, etc. Am I on the right track here?
Secondly, the tutorials and such that I've looked at so far don't seem to mix a 2D view with a 3D one. Do you need to use separate render functions to achieve this? I'm not quite sure how to get this started in the SIO2 context.
Thanks for all the great info so far, these forums have been a good read.
I'm new to SIO and OpenGL programming on the iPhone, but have some experience with C and Objective-C. I think the potential of SIO2 is great and am looking to use it for some game development going forward.
I was hoping for some guidance on how the game loop would fit into a SIO2 app, and also how you might flip between 2D views (i.e. menu) and 3D views (character generation / the actual game).
It seems that the game loop would become part of EAGLView and rather than just calling startAnimation, you could have custom functions here for example to go straight into a static 2d menu when the game was launched (with some 2d buttons etc), before going into a full 3d game with appropriate game state, etc. Am I on the right track here?
Secondly, the tutorials and such that I've looked at so far don't seem to mix a 2D view with a 3D one. Do you need to use separate render functions to achieve this? I'm not quite sure how to get this started in the SIO2 context.
Thanks for all the great info so far, these forums have been a good read.
Krypt- Posts : 15
Join date : 2009-09-21
Re: Looking for some guidance on game loop and 2d/3d view switching
Look for templateRender in template.mm. That's the render loop where most of the animation will take place.
sio2Enter2D is used to switch to 2D rendering mode, and can be used to render your 2D elements. There are a lot of good examples in the tutorials on the technology link from SIO2Interactive.com.
sio2Enter2D is used to switch to 2D rendering mode, and can be used to render your 2D elements. There are a lot of good examples in the tutorials on the technology link from SIO2Interactive.com.
mordenkaim- Posts : 21
Join date : 2009-05-19
Re: Looking for some guidance on game loop and 2d/3d view switching
Hi, tutorial061 is all you need. Example app using this for a HUD is here:
itunes.com/apps/ridengivelite
--yarri
itunes.com/apps/ridengivelite
--yarri
yarri- Posts : 81
Join date : 2009-04-10
Re: Looking for some guidance on game loop and 2d/3d view switching
Hi guys,
Thanks for the responses.... I'll spend some more time on tutorial061....
Thanks!
Thanks for the responses.... I'll spend some more time on tutorial061....
Thanks!
Krypt- Posts : 15
Join date : 2009-09-21
Similar topics
» Top-down View
» How to control the game fps?
» number of moving physics objects
» about the camera view in tutorial03
» Game AI: Lua or IPO?
» How to control the game fps?
» number of moving physics objects
» about the camera view in tutorial03
» Game AI: Lua or IPO?
Permissions in this forum:
You cannot reply to topics in this forum