New issue
 Projects > cocos2d-x > Issues > Refactor #1436

Re-architect resource loading and filesystem utilities

Refactor #1436 [Closed]
folecr 2012-08-20 20:42 . Updated about 11 years ago

The file system APIs are hard to maintain and not flexible enough for development usage.

Requirements :
* Easy switching between POSIX APIs and platform specific APIs - this allows development from POSIX filesystems and deployment on device-specific filesystems.
* This switching can be done by assigning a CCFileSystem to the framework at startup. (Default should be device filesystem, development mode access to be chosen by assigning a subclass of CCFileUtils that uses POSIX API’s)
* Optimized use of device filesystem APIs at deploy time
* Correct throwing of errors/exceptions so that script bindings are easy to write

Problems with current implementation :
* It is hard to use CCFileUtils in development mode. It is also inefficient. (Code checks for path string and behaves differently depending on existence of hardcoded strings)
* Use of popups by default instead of exceptions

Suggestions:
* Refactor so that the startup code can assigning a custom subclass of CCFileUtils to the framework in development mode
* Android CCFileUtils implementation should use Android APIs instead of custom zip/unzip

folecr 2013-08-19 23:37
  • Status changed from New to Resolved
  • % Done changed from 0 to 100
folecr 2013-08-19 23:37
  • Status changed from Resolved to Closed

Atom PDF

Status:Closed
Start date:2012-08-20
Priority:Normal
Due date:
Assignee:folecr
% Done:

100%

Category:-
Target version:-