Tips
General
- Separate the game logic from the user interface layer. This will make it easier to port the code over to the accompanying platform. For example, if you put the main game loop logic in a separate Java class, then you basically can just do a line by line conversion to Objective-C when you port it to iOS.
- Place all Strings in one location. Have a Constants.java where you put all of your static String objects, then when you port to iOS you just use the same thing, except now it is Constants.h.
- If you are going to use Texture Atlases in your game, create them using a tool such as Texture Packer and then you will have the exact location of each Sprite stored in a file that can be easily referenced for both versions of the game.
iOS
Use a framework! Working with Cocos2d made the transition re
Android
Any questions? Just leave a comment. Thanks.
[...] my post about some simple iOS and Android programming tips I mentioned a software called Texture Packer that is very useful in creating Sprite Sheets. Below [...]
ReplyDelete