2013-08-31

7 things to be done when start making an APP


1. Version Control System (VCS) ready 

Version Control System is a very important things for every APP developers, it helps to keep track of the development history and changes; It is not a MUST, but you may be regret if not adopt any VCS; 

The two famous VCS are GIT and SVN; And the two famous public repositories are GitHub and BitBucket;  

Related Links:
  • GIT: http://git-scm.com/
  • SVN: http://subversion.tigris.org/ 
  • Repository: 
    • https://github.com/
    • https://bitbucket.org/

2. KM and PM Tools Ready

KM and PM are Knowledge Management and Project Management respectively; The tools for these two are important because, During the APP development, you need know the Road Map, which are what is the stuff to going to do, and when should be done right now. 

I am using MediaWiki for KM and Redmine for PM 

Related Links:
  • http://www.mediawiki.org/wiki/MediaWiki
  • http://www.redmine.org/ 
 

3. Code style

Code Style is a important thing for program; A consistent style can help coders code efficiently because they can understand other codes quickly (no need to ask or check docs). 

Related Links:
  • http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
  • http://www.oracle.com/technetwork/java/codeconvtoc-136057.html

4. Naming Convention

Naming Convention (or called Naming Rules) are the rules how coders names the variable, class, package, ….; It is important because we are all humans not machines; If the "java.util.Random" class named as "java.xx.AA", you are hardly guess the behaviours of the class. It is also an important section inside the Code Style; 

The followings are the parts should be defined:
  • Namespace (named as Package in java)
  • Class Prefix, Suffix
      (for example: GL Prefix mean Graphics Library module, View suffix mean this is a view class) 
  • Variable Prefix, Suffix
     (for example: str Prefix mean it is a string)
Related Links:
http://en.wikipedia.org/wiki/Naming_convention_(programming)


5. Program structure and folder structure

Folder structure is that clarifying how different kinds of files should be placed; To make a good program, we need to organise the source and project files properly; The more chaotic it is, the harder 
to manage the program project. 

This is an example of program structure
  • log.txt - development logs
  • docs/ - documents related to the project
  • src/ - source code folder
  • res/ - resource folder
  • res/gui/ - resource related to GUI
  • res/sound/ - sound resource

6. Make a very simple runnable program

This is my practice of start a software project. I make a very short and simple program so that I can make sure compile, build and run doing properly. This can make sure the development environment is setup successfully. "Build and run" is a good starting point of the coding activities;

7. Setup TDD coding facility

Once a program can be built and run. I will immediate add unit test related sources and library, such as  JUnit. For project involving graphics stuff, I will write some codes help testing the some graphics modules. Once it is done, it let you to write and test small pieces of code, which is the TDD practice;


 

2013-08-29

Key Tasks of cocos2d-x development


Setup Development Environment

  • Make the iOS binary (.ipa), run on Simulator and Device
  • Make the Android binary (.apk), run on Device

Seek and Read References

  • Reference of Cocos2d-x
  • Reference of C++
  • Reference of POCO library

Create Testing Code

  • Create UnitTest for Logic (text mode stuff), suggest to use UnitTest++
  • Create UnitTest for GUI or Graphics stuff

Create Architecture / Utility / General Code

  • Clarify how MVC architecture work
  • Create Data Class
  • Create a singleton class
  • Make and understand Useful MACROs

Manage GUI, Graphics and Scene 

  • About GUI 
    • Custom View
    • Popup View
    • Fullscreen View
    • TableView
    • Scrollable View
    • Using Cocos builder to create the views
    • Gallery View
    • Loading View
  • About Graphics
    • Render Sprites
    • Render Maps
    • Render something you want to
    • Controlling the zoom and location of the Camera
  • About Scene
    • Add a new scene
    • Switch between scenes

Network Stuff

  • Connect using Socket or HTTP
  • Adding Network Protocol
    • Create Requests
    • Handle Response
    • Handle Network errors
  • Testing the network protocol

Debugging and Profiling

  • Check the potential problem
  • Check memory leak
  • Check the performance using profiler
  • Locate where and when will crash the app

Deployment

  • Create different kinds of build using Makefile/build.xml/.… 
  •  Publish the app (ipa or apk) using TestFlight


2013-08-19

Tools that we need in a software projects

When running a project, there are lots of tools that we need in order make the project running smoothly and efficiently.

Knowledge And Asset Sharing

In a software project, knowledge is one of the most important things every one need to know. That includes the project requirements, frequently use information, KNOW-HOW and tips;
For asset, many software need many assets to build; For example, UI graphics, sound, text data, ..

My Tool: Media Wiki
Media Wiki a Knowledge Database; It helps to share specification, tips, requirements, team contacts, ...

Comments: MediaWiki is a really good stuff to share information and idea

Source Control

Source control is a very important things for programmers; It helps to share and collaborate codes with others and help to keep track of the code change history; Every professional programmers use Source Control.

My Tool: SVN and Will be GIT
SVN:
- The best choice of source control before GIT. Many developers still using it. Its concept is more simple than GIT but it is not good for users to branch and merge stuff.

GIT:
- The new fashion source control system and its design is really good

Comments: MediaWiki is a really good stuff to share information and idea


Project Management and Bug Track System

The management of a software project is complicated, many parties may be involved. So a PM tool is necessary to help different parties know their TODO list. This helps the project deliverable get done on time. Also, a bug track system is very useful to log the bugs, prioritize them and get ride of them based on the priority.

My Tool: Redmine
Redmine is a tool that help organize tasks and assigning to different people. It has the parent / sub tasks feature so that we can break down a big task to smaller one which helps easier to manage;

Comments: I use it to manage bugs and taskses; The team is more efficient because they what they need to do.

Conclusion:
To run a project successfully, unless the team size is less than two (solo team); The most important thing is not the toolset, it is the communication between team members; Therefore it is important to keep things simple, the more tools we adopted, this increase the complexity to communicate; Tools are helping team members to communicate and collaborate; Face to face communicate always be the best one;






2013-08-10

About my Cocos2d-x game project

I am working on a new project using Cocos2d-x. There are some notes about the development.

Reasons why using Cocos2d-x:

  • This is a cross-platform engine; easy to port to Android and iOS with one set of Source.
  • It has a lots of documents, samples, books and supports
  • Some team in our company use it
The parts of Cocos being used:
  • Memory Management (CCObject has retain/release behaviour like objective-c)
  • String Utility
  • File Utility
  • BatchSpriteNode
  • GUI Nodes uisng Cocos buidler
  • Particle Systems
  • HTTP
  • Animation Action Handling
  • Screen Auto-fit
  • GUI Components
  • Zip/Unzip support
  • Audio Support
The parts implemented by ourselves:
  • Sprite Rendering with skin support (because need to integrate with our existing data)
  • Map Rendering (also need to integrate with the existing data)
  • Protocol decoding
  • In-game controls
  • Special UI Components
    • Full View
    • Popup View
    • Tab view
    • RichText Label
    • RichText Input
The parts using the 3rd parties:
  • Game Content Patching (using vcdiff protocol and xdelta)
  • Thread (using Poco::Thread)
  • Socket (using Poco::Network)
  • A* Path finding
  • Unit Testing (using UnitTest++, this is really good)
The tools have used:
  • In house
    • Sprite and Animation Editor
    • 2D Tile Map Editor
    • Game Event Editor 
  • 3rd parties
    • Cocosbuilder

The things I want to try:
  • Sprite and Animation of cocos2d
  • Texture packer
  • Run the Unit Test without starting the simulator
  • Profiling Tools
  • Other texture formats: ETC, PVRTC
(will update if there are something new!!)