Since the finalize function will get a invalid pointer of WebSocket, invoking ws->closeAysnc() will generate unknown result, probably crash. HOW TO FIX: WebSocket and JSB_WebSocketDelegate inhert from Ref. After websocket is initialized successfully, retain websocket instance and delegate, they will both have 2 reference count. release their reference both in onClose callback and finalize function. The reason is that the order of invoking onClose and finalize function will be unpredictable, ref count technique help to handle this. Another fix is sending onclose event after onerror is received.
Cocos2d-x, compact version
It is based on cocos2d-x[version 3.9], but remove 3D and other features. It works on iOS,OS X,Android and Windows.
The major change:
-
Remove 3D features
- Sprite3D
- Skybox
- Terrain
- Light
- Navmesh
- Physics3D
- BillBoard
- Animate3D
- Bundle3D
- MeshSkin
- etc..
-
Only support iOS,OS X,Android and Windows.
-
Remove support for LUA script(It's temporary)
-
Remove deprecated classes and functions
-
Remove Camera
-
Remove Physics integration
-
Using FastTileMap instead of TileMap
-
Remove C++ implementations of CocoStudio parser
-
Remove C++ implementations of CocosBuilder parser
-
Remove AssetsManager,AssetsManagerEX
-
Remove Allocator
-
Remove AutoPolygon
-
Remove support for WebP,S3TC,ATITC
-
Remove support for game controller
-
Improved robustness and many bugs have been fixed
Git user attention
-
Clone the repo from GitHub.
$ git clone https://github.com/cocos-creator/cocos2d-x-lite.git -
After cloning the repo, please execute
download-deps.pyto download and install dependencies.$ cd cocos2d-x-lite $ python download-deps.py -
After running
download-deps.py.$ git submodule update --init -
Build simulator
$ npm install $ gulp gen-simulator $ gulp update-simulator-config -
Build prebuilt library
$ gulp gen-libs
Contributing to the Project
cocos2d-x-lite is licensed under the MIT License. We welcome participation!