Hello,
First of all excuse me if the question is not precise and for the long description.
I want to build an app/game and am facing doubts if I have to build it with unity or unity+wrapper app( if possible ) or not using unity at all( not perferrable ).
The gameapp is targeting the usual ios,android and window mobile. The gameapp should have two( maybe three ) main statuses …
1.The app is idle: in which the app should run and listen/check for notifications from the server at a low-rate intervals to optimize battery drain , bandwidth etc. It’s not essential to have this state but it’s a huge plus.
2.The app is in a non-game mode where the user can be active in the game( conttrolled by the server ), but not playing( unity doesn’t have to receive messages or be active )
3.From time to time the app initiates mini games. I really want to use unity, because of it’s ease of use, cross-platform compilation, already know javascript, have a lot of experience in flash/as3/flex , coded in c++ for an year and a half, the benefit of the great ide of unity etc … and also … I want these small games to rock for sure
I want the app to be optimized at max( I know the native development solution, but I’m an Indie ), so it will be perfect performance-wise to write the app in some framework like appcelerator and then use the code generated from unity and somehow connect it. I’m even keen on writing a wrapper app that just handles the server communication and then initialize unity whenever needed.
If you ask me I would build the whole thing in Unity, so I can have even better( why not 3d ) UI and maximum UX, but the thing that most concerns me is the idle period( possibly even when phone is locked ), and also the non-game state. In these states( as I’m planning,but still not sure if possible ), the app should have constant communication with the server( again at low-rate with disconnnection fallback ). Is it possible to have unity enter at 1fps. I checked the Application.targetFrameRate, but does this mean only the rendering is executed just once and having a core application method and additional logic running 2000 times/sec in the meantime ? Also I believe the Unity engine( as a game engine ), is written so methods inside are executed consecutively in a specific order( as it has to be ).Is it possible to insert logic for a non-game purposes that runs at specific intervals( game engine is not running ) and then initiate the game logic( initialize the whole engine & run ) , then stop the game logic and reinitiate again at a lowest possible framerate/cycles/iterations/operations ?
So to summarize all the questions:
-
Can unity have a state where it is running at a really optimized level. Invoking methods/operations that only I/me have defined and not core engine logic running ( or at least a few ones ). Something like a pre-run method that defines the pre run logic with timers calling specific/custom methods only when needed. Or something like a plug-in that’s executed before the main core logic ? Maybe the question is … Can unity implement Background Fetch functionality of ios7 ?
-
Does the previous question make sense ? Or maybe I shouldn’t even bother about this if I switch the app from 30 to 1 fps between states( or even turn off the render in certain state ) ?
-
What do you think of the idea of using the generated source code and wrapping it in another native app ( or another framework ) ? I even thought of having two separate apps and have seen ( in android ) one app switch to another( button in app A opens app B) and share common data.
I hope you can help me ( for sure you already feel close to me, spending all this time, reading this 100 pages poem )…
Thanks