3 votes

How to read a color of a pixel from texture (cocos2d-js)?

I'm not finding any way to do this within the cocos2d framework, so if someone can do that it would probably be a better answer. However, cc.Texture2D does have a getHtmlElementObj() function. Now, ...
  • 1,237
2 votes
Accepted

What is the difference between a Facebook Canvas and Facebook Web project?

Facebook Canvas app are apps that live inside the facebook eco-system. This is done by Facebook creating an iFrame to the canvas URL you supply. The authentication system is a POST variable sent one ...
1 vote

How do I create a message box that fires a callback on button press?

I need too often to show popup message in my games. so I've created a base class and I derived new popup message class from it and override SetupUI() in derived ...
  • 920
1 vote

Stop mouse joint from dragging current rigidBody without mouse-up?

I've tried to trigger a fake event "touch-end" on the node without luck. But a minute later I found the answer (It was pretty simple) ...
1 vote

Help understanding the parkour tutorial in Cocos2d

This is to keep the player centered on the screen (while maintaining the illusion of motion). The player is moving (right) relative to this.gamelayer. If ...
  • 4,413
1 vote

Color Based Collision Javascript (Cocos2d-js)

I am not experienced in Cocos2D or JavaScript, but using color-patterns is very common on Java game development, and I am sure JavaScript will be almost the same. Here you have an example that does ...
  • 897
1 vote

Saving data in the local computer with cocos2d-js

Most web browsers implements kind of JS Sandbox that blocks any interaction with the real machine, JS just has power over the webkit/gecko/... layer that works like a "virtual machine", that's all, ...
  • 745
1 vote

Saving data in the local computer with cocos2d-js

With JavaScript you don't have a way to persist things transparently other than local storage. I don't know anything about cocos2d but this is really a question about JS. If you really need something ...
  • 515
1 vote
Accepted

Location of project.json in Cocos2d-JS

As I found out, the requirement of project.json is hardcoded into Cocos2d-JS internals and it should be located at the same directory (path) as the HTML document. ...
1 vote
Accepted

Cocos2D-JS Windows App in fullscreen mode (Win32)

I was able to make the deployed cocos2d-js Win32 app run in fullscreen mode by modifying the AppDelegate.cpp file (located in ...
  • 121

Only top scored, non community-wiki answers of a minimum length are eligible