There were a few issues with getting the code to compile perfectly each time on different devices. The first of which is that when you add any new classes to the project you need to add them to the visual studio solution if you want to compile for Win32, you also have to add the new cpp files to the Android.mk file under LOCAL_SRC_FILES: for it to compile properly for android.
Another thing to remember is making sure that the images that you use are stored in the Resources folder so that they can be found when compiling for the different platforms.
After figuring out these little things I have now got a fairly streamlined development cycle. Initially developing for iOS when on my Mac and then testing on android fairly often.
Here is what the game looks like so far ( mind the poor graphics ):
- Have the dog be controlled by dragging him towards the sheep in real time. The dog will have an energy bar which runs down as you move him and all the sheep need to be in the specified area before the energy runs out.
- You draw a path for the dog to take but again you only have so far you can make him go and then you let him run and see if all the sheep are rounded up. If they weren't then you have to start again and draw a new path.
Both these ideas will potentially work but finding the one that is most fun will be a challenge so I'm going to play with both and choose the one I feel is best.
Currently there is a flocking algorithm implemented with the predator avoidance added in so that they always run away from the dog. This algorithm will need tweaking quite a bit to get right but it's hopefully not too far off.
Next thing to be done is adding some obstacle avoidance, i.e. making sure they don't wander off the screen or bump into each other. With the flocking algorithm, they shouldn't bump into each other at all but there may be a point when I want to put fences or rocks or other obstacles in the scene to make it more challenging. Cocos2d-x comes with Box2D and Chipmunk but I'm not too sure which to use yet, or whether to roll my own as the collision detection stuff really isn't too complex for this game.
Anyway Development is going well :)