@Arun55 wrote:
cocos2dx-3.17
As u seen in the screen shot some of my game elements are going in notch display
Is there any possibility to avoid notch screen after notch game elements should come
Posts: 2
Participants: 2
@Arun55 wrote:
cocos2dx-3.17
As u seen in the screen shot some of my game elements are going in notch display
Is there any possibility to avoid notch screen after notch game elements should come
Posts: 2
Participants: 2
@hananht wrote:
Is there a way to detect the elapsed time of a tween?
tween.to(10, { scale: scaleTo }, { easing: function (progress) { // elapsed time or time passed??? // duration??? return progress; }, progress: function (from, to, current, progress) { // elapsed time or time passed??? // duration??? return progress; } });
This is really important parameter and I really need it. Currently I am calculating elapsed time from outside the easing function and it is not the best solution for me.
Posts: 1
Participants: 1
@sayem_musk wrote:
i have a running game
i am getting this crash for android in google play console in crash section
java.lang.ClassNotFoundException
in dalvik.system.BaseDexClassLoader.findClassIn details
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass (ClassLoader.java:380) at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
Now i could not find which class in not found
My game is up and running.
Is the problem is creating for ndk or sdk version or different architecture?
If i can’t find the class causing the problem i can’t solve the problem.
plz help me
Thanks in advance
Posts: 1
Participants: 1
@kerryk wrote:
When i create a sprite using a custom texture (not a filename) as follows
auto rt = RenderTexture::create(cutZone->getContentSize().width,cutZone->getContentSize().height,Texture2D::PixelFormat::RGBA8888); rt->beginWithClear(0, 0, 0, 0); toBeClipped->visit(); cutZone->setBlendFunc(BlendFunc{GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA}); cutZone->setFlippedY(true); cutZone->visit(); rt->end(); Sprite *s = Sprite::createWithTexture(rt->getSprite()->getTexture());
i noticed that the texture is added in memory with a wierd key called “cc_2x2_white_image”.
When i try to free unused memory, using: Director::getInstance()–>getTextureCache()->emoveUnusedTextures(); i believe that the memory from this custom textures is not freed. Printing info about this prints:
“/cc_2x2_white_image” rc=926 id=2 2 x 2 @ 32 bpp => 0 KB
Also what happens if i add 10 custom textures in sprites (which i do), are they managed by the same key?
Can somebody from cocos team explain me memory management works in these cases and how i can free it up? @zhangxm
Posts: 1
Participants: 1
@Donmizzi wrote:
Hi, I would like to ask you how manage pause and resume effects and BGM in background/foreground with Simple Audio Engine (Cocos2dx 3.17)
Now I was working to iOS but also the solution for Android interests me for the near future
In the default code of AppDelegate.cpp od TestCpp I found this:
void AppDelegate::applicationDidEnterBackground() { Director::getInstance()->stopAnimation(); #if USE_AUDIO_ENGINE AudioEngine::pauseAll(); #elif USE_SIMPLE_AUDIO_ENGINE SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); SimpleAudioEngine::getInstance()->pauseAllEffects(); #endif } // this function will be called when the app is active again void AppDelegate::applicationWillEnterForeground() { Director::getInstance()->startAnimation(); #if USE_AUDIO_ENGINE AudioEngine::resumeAll(); #elif USE_SIMPLE_AUDIO_ENGINE SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); SimpleAudioEngine::getInstance()->resumeAllEffects(); #endif }
With this code I have a problem with background/foreground
At the first background/foreground audio effects don’t resume (but they are queued (??))
At the second background/foreground they start, but after a while start also those that was queued in the previous “session”In some post of 2014 someone suggested to comment pause/resume BGM
Infact this solutions works, and iOS automatically pause and resume BGMI continue to try and I test that I can comment also pause/resume of audio effects (almost on iOS)
So I’m cunfused, what is the proper way to manage effects and BGM during background/foreground in iOS??
Maybe the correct way is different from remove pause/resume of BGM?
Otherwise, I don’t undestand because cocos2d-x continue to use bad code after years and yearsWhy in the default code there are the pause and resume of effects and BGM, but does the system work even without it?
They are needed for some special cases that I haven’t tested?I remember that I’m talking about iOS 8 or above
Thank you
Posts: 2
Participants: 2
@Orlan wrote:
Hi there,
While building an app with Cocos Creator v1.10.2, I came across several issues with the EditBox, and I hope you can help me with that.
For some reason, the EditingReturned event I set doesn’t trigger on android phones. It is working fine on iOS phones and in the simulator.
I want to set the focus on the EditBox by tapping on a button. I tried to use the setFocus() method from the EditBox API, however, it doesn’t work.
It appears to me that when an EditBox is focused, other UI elements like buttons are deactivated.
So when I just entered something via the virtual keyboard, and I press a button while the keyboard is still open, the button is not considered pressed but only the virtual keyboard disappears. Is there a solution that both of that happens within one tap?Best regards
Posts: 1
Participants: 1
@chololunaria wrote:
I have a container node with vertical layout (top-bottom). With lots of stacked nodes in it aligned perfectly vertically. And it is scrolling just like a normal chat app.
I would like to add an animation node to that container but not be shown on the bottom and I would like it to follow the positions (x, y) that I set. But this does not happen. The animation node goes to the bottom. I need it to be on top of all the child nodes of the container node.
Is there a way to achieve this?
Thanks!
Posts: 1
Participants: 1
@Orlan wrote:
Hi there,
In my app I have certain skills with cooldowns after using them.
I want to visualize the cooldown like shown in the video I linked below. So the skill icon is greyed out, but it gets it color in a clock-like movement.Does anybody know how I can realize this with Cocos Creator?
Best regards
Sample video:
Posts: 1
Participants: 1
@Summer.Yang wrote:
Hello Everyone,
Following is Cocos-BCX Bi-Weekly Technical Report of March 4th–17th, 2019 .
- Completed
1.1) Adjusted the authorities of the council .
1.2) Updated Cocos-BCX blockchain system .
1.2.1) Extended the length of transaction ID .
1.2.2) Limited the recursion depth of the contract registry .
1.3) Adjusted the rules of splitting fees for on-chain transactions.
1.4) Rebuilt the voting mechanism .
1.5) Adjusted the mechanism of splitting fees for on-chain transactions.
2. In Progress
2.1) Adjusted the evaluation order of the memory table ’s object ID .
2.2) Adjusted account information attributes to describe the identity type of the account(s).
Thanks for your attention!
Cocos-BCX official social channels:
Website: http://www.cocosbcx.io/en/
Discord: https://discord.gg/jdJMNtC
Blog: https://medium.com/cocosbcx
Telegram: https://t.me/cocosblockchainexpedition
Twitter: https://twitter.com/cocosbcx
Reddit: https://www.reddit.com/r/cocosbcx/
Forum: https://discuss.cocos2d-x.org/c/cocos-bcx
Key Words:
Posts: 1
Participants: 1
@zhangxm wrote:
Compared to alpha0, this version finished:
- support all 3d features
- Sprite3D
- Particle3D
- NavMesh
- Physics3D
- Billboard
- MotionStreak3d
- DrawNode3d
- Terrain
- support spine but is not merged because the license
- enable physics
- support capture screen and capture node
- rendertexture can save to images
- enable all cpp test cases
- fix many bugs
Download
How to run
- mac: use
cocos command
or CMake- iOS: use CMake to generate Xcode project, then run
- Android: use
cocos command
orAndroid Studio
- windows: use
cocos command
or CMake- linux: it is not tested yet
CMake usage can refer to
cmake/README.md
.Next plan
- fixing bugs
- supporting lua
Known issues
The known issues are here.
Posts: 2
Participants: 1
@m_yukio wrote:
Hi,
My name is Yukio Murakai (m-yukio).Commits on Jun 26, 2016 “Improve RefPtr to avoid casting when possible”,
changed the type of _ptr from Ref to a pointer of T,
T is forward declaration (incomplete type),
If called by an inline function defined in a header file, a build error will occur.The error is the following code:
const_cast<Ref*>(static_cast<const Ref*>(ptr))->release(); static_assert(std::is_base_of<Ref, typename std::remove_const<T>::type>::value, "T must be derived from Ref");
I understand the reason for reducing the cast, but
Since RefPtr is a class that manages instances of Ref, the previous implementation seems to be straightforward.
Posts: 1
Participants: 1
@dsrf wrote:
Hello.
Is there any way to get the current Sprite atlas in script?
I would like to set the atlas in the editor, then animate by code.
But I don’t see any property/method to get the atlas.I only know how to do it using cc.loader and adding a custom SpriteAtlas property like so:
atlas:{ default: null, type: cc.SpriteAtlas }
Setting the atlas in the editor, the cc.loader is not a solution.
Also, adding a custom property in the script means making two redundant assignments instead of one.
Something like
var atlas = this.getAtlas()
and then use getSpriteFrame would be great.
Any alternative is welcome.Thank you.
Posts: 1
Participants: 1
@doyoque wrote:
Hello cocos people.
Last year I’m installed cocos2d-x with .zip file from website (version 3.^) on ubuntu 18.04, follow the tutorial from documentation for linux-build, and success.And now after my laptop got reset and installed new ubuntu 18.04 the make is failed with error like this.
I’ve tried from github repository and cocos zip but still error.
Posts: 1
Participants: 1
@tranthor wrote:
Hi,
I’m looking for some designer/artist for design my next 2D game (i will need all designs: assets, UI, buttons, etc).
The game will have tiled maps, so, it would be nice if the designer has experience designing tiles.Maybe anyone can suggest me a good designer?
Thanks.
Posts: 1
Participants: 1
@anggaaryas wrote:
after i create new class, i cannot include that header.
i create myclass.cpp and myclass.h . then myclass.cpp can include myclass.h . but other class (for example HelloWorldScene.cpp) cannot include “myclass.h”. Visual studio says “cannot open source file myclass.h”
am i forgot something? i remember that when i build for android, i should add the class in the Android.mk. but dont know when to build win32 application.
Posts: 2
Participants: 1
@smellypotato wrote:
I heard that there is One Signal for pushing notification on native device. How do I use it? Detailed steps and examples are really appreciated
Posts: 1
Participants: 1
@sheshmoshen wrote:
I have a question about certain specifics of
schedule()
function.How does it work in terms of calling itself?
If I pass
1/60
for the update interval will it get called at least one time within1/60
?If it’s being called every
1/60
or any update interval that I pass then what’s the point of thefloat
parameter for the call back?For example:
node->schedule([](float dt) { // what is the point of dt if it's the same as update interval? }, update_interval, key);
Thanks!
Posts: 2
Participants: 2
@Summer.Yang wrote:
Hey All,
Following displays the latest Cocos-BCX Bi-Weekly Technical Progress of 18–31 April, 2019 by Cocos-BCX R & D team .
1. Completed
1.1) Updated Cocos-BCX blockchain system .
A. Optimized the control of the contract call stack’s depth .
B. Modified the complex deducting mechanism .
1.2) Rebuilt the system and mechanism of homogenous assets blacklist and whitelist .
1.3) Adjusted the evaluation order of the memory table’ object ID .
1.4) Canceled the direct OP associated by the parent & sub NH assets .
1.5) Provided contract interface associated by the parent & sub NH assets .
1.6) Redefined the delegated authority in leasehold relations .
2. In Progress
2.1) Adjusting account information attributes to describe the identity type of the account(s).
2.2) Adjusting the return type of the contract function for NH assets creation .
2.3) Separating the intermediate code of the objects within the contract .
Thanks for reading!
Cocos-BCX official social channels:
Website: http://www.cocosbcx.io/en/
Discord: https://discord.gg/jdJMNtC
Blog: https://medium.com/cocosbcx
Telegram: https://t.me/cocosblockchainexpedition
Twitter: https://twitter.com/cocosbcx
Reddit: https://www.reddit.com/r/cocosbcx/
Forum: https://discuss.cocos2d-x.org/c/cocos-bcx
Key Words:
Posts: 1
Participants: 1
@bayquabaoto wrote:
var spineBoy = new sp.SkeletonAnimation(‘res/sprites/fish/testca2_anim.json’, ‘res/sprites/fish/testca2_anim.atlas’, 0.6);
spineBoy.setPosition(origin);
// spineBoy.setAnimation(0, ‘animtion0’, true);
this.addChild(spineBoy, 4);
Posts: 1
Participants: 1
@adikhel wrote:
How secure is the webview? Can a user modify the cached .js file?
Any idea how to secure the cache?
Posts: 1
Participants: 1