Questions tagged [cocoscreator]

Cocos Creator is a complete package of game development tools and workflow, including a game engine (based on Cocos2d-x), resource management, scene editing, game preview, debug and publish one project to multiple platforms.

86 questions
5
votes
2 answers

Reduce game size in Cocos Creator cocos2d-x

I am developing a game using Cocos Creator for Android and iOS platforms. The game is small in scale and has few graphics elements. I found that the APK and IPA file size for this game is 11.5 MB. I think these files (APK or IPA) must be containing…
3
votes
0 answers

How to know what note is a beat in MIDI note event?

I'm currently working on a rhythm game, and have a set of MIDI note events converted from the MP3 file, but I don't know which notes is a beat. Is there any way to detect that? Here is the MIDI data of mine, have a look: 0, 0, Header, 0, 1, 43 1, 0,…
3
votes
1 answer

LiquidFun and cocos creator

I am new to cocos creator and JavaScript programming, recently cocos creator added 'Integrated Box2D physics engine' to its engine. And I was wondering if I can use 'liquidFun' within cocos creator. If it is possible, please tell me how can I…
lino
  • 287
  • 2
  • 12
3
votes
3 answers

How to navigate between scenes Cocos creator?

I'm working with cocos creator v 1.3.1 I want to know how to navigate between scenes, Let say we have to scenes SceneA and SceneB. First game load SceneA after that I can load second scene by calling this function…
Jack001
  • 43
  • 1
  • 5
2
votes
1 answer

Clamping an arrow with a circle shape for mini map

I'm currently working on a mini map for a game in which keeps track of different items of importance on and off the screen. When I first created the mini map through a secondary camera rendered onto a texture and displayed on screen in a miniature…
ACour008
  • 83
  • 8
2
votes
1 answer

Why Cocos Creator engine file is not called on the browser?

Non-Latin characters are not truncated properly so I modified the fragmentText() function to truncate on white space. file is in: "C:\CocosCreator\resources\engine\cocos2d\core\label\CCTextUtils.js" fragmentText: function (stringToken, allWidth,…
Blendester
  • 1,583
  • 4
  • 19
  • 43
2
votes
1 answer

How to encode HTML string in Cocos Creator?

Normally we should encode user input strings before displaying to avoid execution of malicious code. like this: var encodedValue = $('
').text(value).html(); But how is it possible in Cocos Creator? Or it is not necessary and is taken care of…
Blendester
  • 1,583
  • 4
  • 19
  • 43
2
votes
0 answers

can cocos creator use native c library?

I know Android lets dev to use .so for native code. Is there a way to do the same in cocos creator? The native library has c and c++. I have access to them so building them to a different format that cocos creator use will not be an issue, but…
user1865027
  • 3,505
  • 6
  • 33
  • 71
2
votes
0 answers

How to integrate Admob with Cocos Creator 1.3.x

I was wondering if anyone that have used cocos creator have ever managed to integrate admob banner in it. I followed this dcoumentation I found online but my app first crashed and on 2nd attempt, ads appears white on screen and can't progress on…
Chelseawillrecover
  • 2,596
  • 1
  • 31
  • 51
2
votes
2 answers

How to put external js API in cocos creator?

I am just wondering how to put another js API library( in my case, i want to put the smartfoxserver javascript API library) in cocos creator? because what i did in cocos2d-js, i just need to add it in project.json, and I am wondering if i can do…
2
votes
0 answers

Cocos Creator Performance issue

I'm using Cocos Creator to develop a new HTML game but the performance in my Macbook Pro Retina (2015) display is really bad. I started a new project to do some tests and i just created the Canvas and a label that says "Hello World". The problema is…
llKoull
  • 335
  • 3
  • 14
1
vote
1 answer

Is it possible to implement Typescript class which has a protected property?

I'm trying to mock a class of a third party library which contains a protected property and have got an error message. here's a small reproducible example: class WithProtected { protected property: number = 1 } class Derived implements…
3Dos
  • 3,210
  • 3
  • 24
  • 37
1
vote
1 answer

How to use CustomEventData in Button component Cocos Creator 3.5.0 Typescript

In the Button component we have CustomEventData. In my understanding the purpose it to send extra parameter when user tap the button. I have tried to use it like this: use_powerUp(par: string){ console.log("MapScreenManager::use_powerUp() = ",…
noobsee
  • 806
  • 15
  • 29
1
vote
1 answer

How to render SVG files in Cocos Creator?

Does Cocos Creator currently support SVG format files? If so, how can I render them in a scene? If not, is there an extension of some sort which would allow that?
Quickz
  • 1,626
  • 2
  • 11
  • 21
1
vote
0 answers

Base64 too large cause CORS

I use this code to upload base64 public static post(api:number, params:object = {},callback:{(success:boolean, json: any): void;}) { var xhr = new XMLHttpRequest(); xhr.open("POST", this.baseUrl+this.serverAPI, true); …
Kino
  • 11
  • 2
1
2 3 4 5 6