Tix Lo Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 26
Added by Tix Lo over 1 year ago

Hi,
I think most purpose to used cocos2d-x are to develop mobile games and I found some important
features that are lacked, such as "UIGestureRecognizer", "XmlReader", "ResourceManager", etc.
So I implement some features for cocos2d-1.0.0.1-x-0.10.0

  1. EPNotificationCenter
  2. EPGestureRecognizerLayer
  1. performTap
  2. performLongPress
  3. performPinch
  4. performRotation
  5. performPan
  1. EPXmlReader
  2. EPResourceManager
  3. Optimize the memory usage of textures in according to the prefix of file name. (4444_,565_,8888_,5A1_)
  4. File Templates, including CCLayer,CCScene, and EPGestureRecognizerLayer #

I tried to attach the source code but always failed and how did I do to upload the source including the sample code ?

Zhe Wang RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

They looks cool, especially NotificationCenter & GestureRecognizerLayer.
The limit size of attachment is 10MB, is your zip ball too large?

Enjoy Coding, Enjoy Life.

Tix Lo RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 26
Added by Tix Lo over 1 year ago

I pack them to a patch file, cocos2dx.patch.To copy the patch file to cocos2dx folder and
apply it.
$> patch -p1 -i cocos2dx.patch

I modify some original source code of cocos2dx but all of them were marked as //Erawppa.
Maybe you will like and integrate them. :)

best regards.

cocos2dx.patch (2.1 MB)

Tix Lo RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 26
Added by Tix Lo over 1 year ago

I forgot sample code and uploaded :)

Zhe Wang RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

Thanks! I will read the source in Monday.

Enjoy Coding, Enjoy Life.

Zhe Wang RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 1642
Location Amoy, China
Added by Zhe Wang over 1 year ago

Issue #909

Enjoy Coding, Enjoy Life.

winipcfg winipcfg RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 56
Added by winipcfg winipcfg over 1 year ago

Is the notification center class used for Notification Center in iphone?
I have checked the code and it is something like observer pattern.

Tix Lo RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 26
Added by Tix Lo over 1 year ago

ya, the notification center is like observer of iOS.
I have no idea any similar observer system in Android and I implement the similar pattern by using C++.
Hope I can use the same observer pattern in both OS. (not Java and Obj-C)

winipcfg winipcfg RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 56
Added by winipcfg winipcfg over 1 year ago

The observer pattern is a nice feature. Just my 2 cents, the name EPNotificationCenter should be changed to something other than "Notification Center" if integrating into Cocos2dx. It is because someone might get confused to Notification Center in IOS (http://www.apple.com/iphone/features/notification-center.html). Someone needs the class name to implement Apple's Notification Center.

BTW, are there Notification Center in other OS such as Android?

Tix Lo RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 26
Added by Tix Lo over 1 year ago

I totally agree what you say of naming issue and I think you can modify those codes in according to your requirement.

To develop Android App is my future plan and currently focus on iOS platform ,so I dont understand about Notification Center in Android. sorry.

James Chen RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 637
Added by James Chen over 1 year ago

Could you provide more demos about how to use EPScrollListLayer, EPTextFiled?
BTW, I have modified some of your code to make it suitable for the latest cocos2d-x code.
Here is my repository : https://github.com/dumganhar/cocos2d-x/tree/erawppa_new_feature

Tix Lo RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 26
Added by Tix Lo over 1 year ago

here are some files about EPScrollListLayer and there are three samples, including createScrollH() , createScrollV() , and createSyncScrollH()

I updated and fixed some codes in EPScrollListLayer.cpp/.h and you can replace them with attatchment.

btw, you can ignore EPTextField because there are some powerful samples in cocos2d-1.0.1-x-0.9.1/tests/tests/keypadTest. :)

James Chen RE: Implement some new features for cocos2d-1.0.1-x-0.10.0
Posts 637
Added by James Chen over 1 year ago

Thank you. :)

Tix Lo wrote:

here are some files about EPScrollListLayer and there are three samples, including createScrollH() , createScrollV() , and createSyncScrollH()

I updated and fixed some codes in EPScrollListLayer.cpp/.h and you can replace them with attatchment.

btw, you can ignore EPTextField because there are some powerful samples in cocos2d-1.0.1-x-0.9.1/tests/tests/keypadTest. :)


(1-12/12)