help with the basics needed

View previous topic View next topic Go down

help with the basics needed

Post  fabianjul on Sun Aug 09, 2009 11:16 am

I'm sorry for this stupid question, but I simply don't get it: First, I have to export my blender scene with the exporter script, that's what I've understood. But what to do next? In the tutorial files provieded, everything goes so fast... Sad

So can anyone list the thing to do? I'd be very happy!

fabianjul

Posts : 2
Join date : 2009-08-09

View user profile

Back to top Go down

Re: help with the basics needed

Post  Don Jaffa on Sun Aug 09, 2009 12:01 pm

Your most important file is template.mm . In this you have several different programming sections, which are the 'void templateblahblah (void)' denoted sections. The 2 most important when you start out are ' templateLoading' and 'templateRender'.

templateLoading (in most of the tutorials) is the first process to run - this is where you load your .sio2 file, set up the physics, load widgets / fonts ...etc - basically all the stuff you would class as loading. This runs through all the commands in the process once, as when it reaches the end it has the command 'sio2->_SIO2window->_SIO2windowrender = templateRender;' - this changes the main process from templateLoading to templateRender.

templateRender is the main render loop, here is where all the in game processes are put, such as character movement, animations ...etc. This render loop runs from beginning to end, then starts at the beginning again, until it is told to stop. So if you were to initialize an integer at the very top of the file called 'int COUNTER = 0; (you do this outside and render loop so it is accessible from anywhere in the game and is constant despite what 'templateblahblah' you are in) then inside the templateRender loop you put ++COUNTER; every time the loop runs from beginning to end 1 will be added to COUNTER.

The other templates control such things as accelerometer input, shutting down the game ...etc, all pretty apparent from their names.

Other files that are worth paying attention to are template.h (if you were to create any other render loops this is where they are declared) and EAGLView.mm (specifically the part that begins 'if( !sio2 )' ).

No go do some tutorials to learn how to do specific things like movement, animations ..etc Razz

Hope this helps.

Don Jaffa

Posts : 49
Join date : 2009-02-19

View user profile

Back to top Go down

Re: help with the basics needed

Post  fabianjul on Mon Aug 10, 2009 12:25 am

Thanks! template.mm was the file that I searched. I acctually wasn't able to place my .sio2 file, but I've now checked the template.xcodeproj from one of the tutorials. There, in template.mm, I found the link to the .sio2 file. So everything's great now Very Happy

I've already checked the tutorials, but I couldn't follow how and where he linked the .sio2 file with the Xcode project in the first one. So I wanted to figuere out that first.

Anyway, thanks again.

fabianjul

Posts : 2
Join date : 2009-08-09

View user profile

Back to top Go down

Re: help with the basics needed

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum