Quantcast
Channel: cocos2d-x - Cocos Forums
Browsing all 2748 articles
Browse latest View live

How to change assets file path on config.json during build

I have to load splash screen, but correct assets file path are missing on config.json. How do I changes the file path? THanks 1 post - 1 participant Read full topic

View Article


[Sharing] Integrate the cocos2dx v3.x with unity engine

Hello this is a sample demo for integration of the cocos2dx v3.x with the unity engine this is my repo: GitHub - thienphuoc/combine_unity_cocos2dx: - This repo show you how to combine unity into the...

View Article


How to use lua with cocos?

How can I use lua with cocos2d?, I am a total beginner with cocos, and feeling a bit lost, pls guide 1 post - 1 participant Read full topic

View Article

Javascript option not available?

I am only able to see an option to use typescript, but not javascript, when I installed cocos first it gave me an option to download something in visual code, but I guess it said c++ so i skipped it....

View Article

TexturesCube probleme

can somoene explainn for me what mean “cube_map.vert” and “cube_map.frag” and “u_cubeTex” in this code: auto texturecube = TextureCube::create(“left.jpg”, “right.jpg”, “top.jpg”,...

View Article


[Fmod Audio] Need help to createSound from Binary(Encrypted Data)

Hi everyone! I need load audio files from Binary[Encrypted Data] to protect Game’s Resources 1, I successfully used createSound( filePath ) with fmodL.dll and other files setup oke. auto r =...

View Article

Image may be NSFW.
Clik here to view.

Got a bug with frame animation?

I’m sure there is no error in the location of the plist file and png image, why is this error still showing? the code as follows:...

View Article

AudioEngine getDuration or playing sounds in sequence

Hi, I’d like to be able to play 2-3 sounds in order, but the duration of each sound may vary. I don’t want them overlapping. Perhaps I could use the callback to do this, but was curious if anyone has...

View Article


Possible CCParticleSystem Leak

I have noticed that Cocos2d’s ParticleSystem uses image->release() in initWithDictionary method. CCImage is not an autoreleased object and I think C++'s delete should be used instead of releasing...

View Article


CCTexture2D crash on cocos2d-x v3

I have experienced a crash that is caused by a return on opengl error in initWithMipmaps method. This crash only happens when cocos’s font atlas is used. The reason is: when early return is used,...

View Article

First Project Build Issues Windows

Hi, I just started using cocos2d-x. And I’m having trouble to build my first project. When I try to build in Windows with x64 target , VS 2022 I get: Build started… 1>------ Build started: Project:...

View Article

Image may be NSFW.
Clik here to view.

Why the length of EventTouch's _touches changes

when i use the EventType.TOUCH_START,i use two fingers at the same time, i found that: on IOS platform,(iphone 13, safari), the length of EventTouch._touches is not always the same, 1 or 2 on Andriod...

View Article

Can I use Cocos2d-x in React Native project?

I am gonna make a simple game like tetris using React Native. And also, I found that Cocos2d-x is a good cross platform making game apps. Is there any solution which I can use Cocos2d-x in React...

View Article


Calling setScale() on sprite loses resolution

Hi, I have some images (helmets and other images) that I place in different areas, and I frequently need to scale them down. However, when I do so, they don’t look nearly as nice. I don’t know if it’s...

View Article

Image may be NSFW.
Clik here to view.

Android Studio java code no hints whatsoever

Hi, An old-school cocos2dx project here. Has anyone had this problem in Android Studio that the java code refuses to give import suggestions, autocomplete, and shows everything in red? The code still...

View Article


How to avoid a crash when when a node is deleted in update loop? (see example...

Hi, let me wright this pseudo code first and then explain. Say GameScene is a game level. GameScene has a private Sprite member called _mySprite declared in the header as nullPtr. In the update method...

View Article

I need to update because of the app crash

In the past, I launched a game using the cocos2d-x 3.8.1 version. This app is still on the App Store. But I see a lot of reviews that the app suddenly ends while running. So I think I need to update...

View Article


How to stop an update method when something happens?

Hi, so far I have used in my game scheduleUpdate(), schedule() and scheduleOnce(). But I think they way I am using some of those methods is not optimal. For intance, in the game scene update() method...

View Article

EXC_BAD_ACCESS While Trying to Get Data from List or Vector

Hi, first of all, hadn’t been using C++ for years until recently. What I am trying to do is using a list of objects created from a struct that I created and rendering them inside update function. My...

View Article

Image may be NSFW.
Clik here to view.

__TBB_malloc_safer_free, android free urlConnection may cause crash

cocos creator 3.0.1 NDK 19.2.5345600 targetSdkVersion 29 ABI armeabi-v7a:arm64-v8a We found a crash on android device. Trace the log we found the crash point is free headers of urlConnection. char...

View Article
Browsing all 2748 articles
Browse latest View live