Quantcast
Channel: Cocos Forums - Latest topics
Viewing all 17056 articles
Browse latest View live

How to insert external rendering functions?

$
0
0

I’m a contributor of Effekseer, which is OSS third-party particle effect tool.

Some people requests to support Effekseer in Cocos Creator.
EffekseerForWebGL renders effects to current framebuffer directly.

I’m searching a function to insert external rendering functions in Cocos creator rendering flow like CommandBuffer.IssuePluginEvent (Unity’s function)

https://docs.unity3d.com/2019.4/Documentation/ScriptReference/Rendering.CommandBuffer.IssuePluginEvent.html

If this function is implemented, SpriteStudio, Live2d and many third-party tools can be used on Cocos Creator.

Best regards.

1 post - 1 participant

Read full topic


[iOS][Android] Tag Game: Run or Lose 🏃‍♂️🏃‍♀️

$
0
0

Demo
Ready, steady, RUN!
Do you like competitions? Try to run away from the tagger in the new Tag Game!

Tag Game – is an exciting speed game. Collect the maximum number of coins and pass the maximum number of levels before the tagger catches you! Catch boosters and unlock super skills! A simple interface and user-friendly gameplay will bring you a lot of fun and excitement. Set your own record and run, run, RUN!
Take the first place in the global score leaderboards.
Compete with other players all over the world in duels!
Choose your favorite location: find 10 unique maps and pass new levels.
Pick your character: complete levels, collect coins and accomplish tasks to unlock a new hero.

iOS https://apps.apple.com/app/apple-store/id1502958308?pt=120197236&ct=forum&mt=8
Android https://play.google.com/store/apps/details?id=com.ooleynich.sifx&referrer=utm_source%3Dforum

2 posts - 2 participants

Read full topic

Cocos2d 4.0 create shader for Spine animation

$
0
0

Hello,

I have an issue with applying the custom shader to the spine animation (cocos2d v.4.0).
The shader that I’ve created works fine with Sprite but doesn’t work with Spine Animation.

Here is the sample code, (partly taken from cpp-tests):

#define SET_UNIFORM(ps, name, value)  do {   \
decltype(value) __v = value;                           \
auto __loc = (ps)->getUniformLocation(name);  \
(ps)->setUniform(__loc, &__v, sizeof(__v));  \
} while(false)

...

auto animation = spine::SkeletonAnimation::createWithFile(jsonPath, atlasPath);

animation->addAnimation(0, "idle", false);
animation->setScale(0.5f);
this->addChild(animation);

...

std::string fragment = FileUtils::getInstance()->getStringFromFile(
         FileUtils::getInstance()->fullPathForFilename("example_Blur.fsh")); // from cpp-tests
auto program = backend::Device::getInstance()->newProgram(positionTextureColor_vert, fragment.data());
auto programState = new backend::ProgramState(program);

SET_UNIFORM( programState, "resolution", cocos2d::Size(500,500));
SET_UNIFORM( programState, "blurRadius", 50.f);
SET_UNIFORM( programState, "sampleNum", 7.0f);
SET_UNIFORM( programState, "u_PMatrix", Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION));

animation->setProgramState(programState);

Thank you for your help in advance!

1 post - 1 participant

Read full topic

Minimize game and locked

$
0
0

Hi,
I am working on a game using cocos creator for fbInstant build.
when we minimize our game, then return to the game after a few minutes, the game is locked and we can not communicate with the game UI and only the Console button works.
please help us if anyone has any information.
Thanks

1 post - 1 participant

Read full topic

onesignal sdkbox.PluginOneSignal.setLogLevel now working

$
0
0

Hi , I integrated Onesignal through sdkbox but on Onesignal is not able to received any event. To investigate this I tried to use sdkbox.PluginOneSignal.setLogLevel() but there is no sdkbox.PluginOneSignal.LogLevel.Verbose visible as suggested in samples to pass as parameters. Am I missing something here , how to see logs on onesignal ? I did tried to pass numbers as parameters but it ends up in crash , ex sdkbox.PluginOneSignal.setLogLevel(4,4);

1 post - 1 participant

Read full topic

how do I animate MenuItemSprite when I click on It?

$
0
0

Hi guys, I recently started making games and ran into this problem. I’m making a clone of FlappyBird and I want that when you click on this sprite on the screen, it disappears smoothly and only then moves to a new scene. Please help me, I have already searched the entire Internet.

2 posts - 2 participants

Read full topic

Firebase is available in cocos2d-x v3.3?

$
0
0

Hello
How’s it going?

We have game which developed by cocos2d-x v3.3 and lua script.
I know it’s too old version, but we can’t upgrade engine, because of some reason.

Now we are going to use Firebase in game for analytics and notification , etc…

Here is some questions

1) Can we integrate Firebase to cocos2d-x v3.3?

2) Do I need make lua binding myself because I am using lua language

3) Does anybody already used Firebase in cocos2d-x v3.3?

2 posts - 2 participants

Read full topic

iOS14 bad performance

$
0
0

Hi,

I also wanted to raise a forum thread on the English forums about iOS14 bad performance when running on at least web-mobile.

Link to Chinese forum thread:

I think this is a very serious concern now since ios14 was released 16.9.2020 and every game live now is affected by it.

I’ve debugged that it is mostly about the drawcalls. With iPhone 11 Pro and iOS13 you can easily run 150-200 drawcalls with any FPS drops (having full 60FPS), but running 200 drawcalls with the same phone on iOS14 you are down to about 5FPS.

Even getting down drawcalls in our games to around 20, it still has slightly worse performance than iOS13 with 150-200 drawcalls.

Could this be something in the engine causing this or some issues in the operating system? What do you think?

5 posts - 4 participants

Read full topic


Facebook playable ad - fb preview doesn't pass loading screen

$
0
0

For some time I’m trying to make my fb playable ad.

Now I’m trying to make it in one zip file. But when I uploaded my zip, it is accepted by facebook but on preview it doesn’t pass the loading screen, it doesn’t load the scene. Is there some solution to this, what I read, is that it can be hard or impossible maybe, but it mostly refers for making one index.html, there is no mentioning of making playable ad as a zip file?

Thank you very much for your time!

1 post - 1 participant

Read full topic

Future plans of cocos2d-x 4.0

$
0
0

Hi there,
I am wondering what the future plans for v4.0 are at the moment. When looking into the milestones of the cocos2d-x repo: https://github.com/cocos2d/cocos2d-x/milestones
there is nothing new since months.

Are there any future plans that are just not shared over Github?

All the best,
Rambazamba

3 posts - 2 participants

Read full topic

Android: Full Screen in notched screen device

$
0
0

Hello,
I have project base on Cocos Creator v2.4.2, when I build Android and test in notched screen device such as the Nokia 6.1, my app not truly full screen, it have 2 black space, one on notched area and one on system navigator area. I don’t use SafeArea component in my project, but seem like cocos auto use them. How can I make the app truly full screen, ignore safe area?


1 post - 1 participant

Read full topic

CC3.0 Release Date Anyone?

$
0
0

Does anyone have a rough release date for Cocos Creator 3? I saw a Youtube video somewhere but I cant find it anymore…It looked like there was a lot of great stuff coming! Cheers

2 posts - 2 participants

Read full topic

.gitignore for v4 projects

$
0
0

Hi there is there any example .gitignore files for cocos2d-x v4 projects?

The .gitignore on Github https://github.com/cocos2d/cocos2d-x/blob/v4/.gitignore includes .a files for example, which removes all the prebuilt and required libs like libbox2d.a

Also when cloning the project on another computer I have to run CMAKE again to build the iOS Xcode project. Does CMAKE override the old .xcodeproj file or just update it?

All the best
Rambazamba

1 post - 1 participant

Read full topic

Cocos Game Showcase – September 2020

$
0
0

Yet another great showcase of games using Cocos Creator and Cocos2d-x. Can you guess which games use which? Thanks to the community for their games as well as our partners. Please share your games in the Game/Demo Showcase and we’ll see if we can add it to our next showcase.

Rabbids Wild Race - Ubisoft
Frontier Justice - ONEMT
The Marvelous Snail - QingCi Games
Idle Mafia - FunPlus
Painted Car Duel - Xiamen Qingqan Chase Technology
Munchie Match - Bouchard Industries
Gunboat Shooting - Hangzhou Xuanhuo Technology

1 post - 1 participant

Read full topic

SDKBOX_CORE: Checking plugin status for unknown plugin: Firebase

$
0
0

Hello
I am going to integrate Firebase to my cocos2d-x lua game
I am using SDKBOX and have done one by one from this manual

https://docs.sdkbox.com/en/plugins/firebase/v3-lua/#sdk-version

The build is success and I am now checking if Firebase analytics is working or not.
But it seems not working.

Here is code of lua

print("before firebase event")
sdkbox.firebase.Analytics:init()
print("finish init firebase event")

local evt = {
	[sdkbox.firebase.Analytics.Param.kFIRParameterItemID] = 'id123456',
	[sdkbox.firebase.Analytics.Param.kFIRParameterItemName] = 'name123456',
	[sdkbox.firebase.Analytics.Param.kFIRParameterItemCategory] = 'category123456',
	[sdkbox.firebase.Analytics.Param.kFIRParameterPrice] = '123.4'
}
sdkbox.firebase.Analytics:logEvent(sdkbox.firebase.Analytics.Event.kFIREventViewItem, evt)
print("sent firebase event")

But I am getting this log from logcat

Lua: before firebase event
SDKBOX_CORE: Checking plugin status for unknown plugin: Firebase                                
SDKBOX_CORE: Initialization request for plugin: 'com/sdkbox/plugin/firebase/Analytics/Analytics'
Lua: finish init firebase event
Lua: sent firebase event

And I can’t see any analytics logs from Firebase console.

Could you please check which case this problem occur?
I did everything step by step in https://docs.sdkbox.com/en/plugins/firebase/v3-lua/#sdk-version

BTW When I write code like below(get version info of firebase)

local firebaseVersion = sdkbox.firebase.Analytics:getVersion()
print("firebase version:"..firebaseVersion )

Then logcat shows version info

Lua: firebase version:3.6.0

Thank you

1 post - 1 participant

Read full topic


Cocos And US Bans on China

$
0
0

I know this this really shouldn’t be something I need to consider when choosing a new engine;( Cocos seems to have everything for me, it ticks all the boxes and gives me good reason to leave Unity).
However, with recent news of US bans on Tic Tok and We Chat (and not knowing the future of Chinese companies in the US and outside of China) I’m wondering if its worth continuing to learn to use an engine that may suffer a similar fate in the future.

Is this a potential problem? Realistically, how worried should we be?

Thanks

8 posts - 6 participants

Read full topic

Custom Preview Template - Cant find /assets/resources/config.json

$
0
0

I was just running the ‘Custom Preview Template’ example and I couldn’t figure out why exactly the main test.fire scene doesn’t run when you hit the preview button. I thought it might be designed that way for the example, (so it just shows the loading screen and nothing else) but when I check the browser console there is the error:

Can’t find resource /assets/resources/config.json

Is this just something I’m missing or everyone else?

Cheers

1 post - 1 participant

Read full topic

Hot update sample project not working

$
0
0

hi,
i downloaded the sample hot update project and made and android build of it. i then installed it on my android device and a popup came up. i clicked on the bottom left button on the popup and after some time a message appeared “Failed to download manifest file. Hot update skipped”. when i clicked on the bottom right button it disappeared. it seems the project is too old and the server side assets of the project have been removed. can someone fix this?
also, i had some questions…why is there a list of assets, both in hotupdate.js and in project.manifest? also i noticed that there are some assets in project.manifest that are not in hotupdate.js. is it so that they can be downloaded during hot update?
how can i setup hot update on my local server? if i run version_generator.js then does the parameter after -s need to be the path to the unzipped apk that i generate(and then i will zip the folder and install it on the device)? if not so, then what does the parameter after -s need to be?

thanks!

1 post - 1 participant

Read full topic

How to get banner ad height in design resolution size

$
0
0

Hello,

I want to use banner ad (320X50) in my game but the problem is it overlap game contents in some devices. I want to convert the banner ad height (50dp) in to my design resolution size and place all content above that. can some one help me to come up with an formula or something.

Thanks
KPLG

1 post - 1 participant

Read full topic

Remove sprite after use

$
0
0

Hi guys, I am making a clone of a flappy bird and I am facing this problem, my game crashes after I try to delete a sprite after animating it.

I have a SpawnPipe function that is called from GameScene when pipes need to be spawned. In this function, I registered the animation of the pipe movement and its removal after the movement, but the game crashes.

topPipe->setPosition(Point(visibleSize.width + topPipe->getContentSize().width + origin.x + 
(visibleSize.width / 2), topPipePosition));

bottomPipe->setPosition(Point(topPipe->getPositionX() - topPipe->getContentSize().width * 2, 
topPipePosition - (Sprite::createWithSpriteFrameName("bird1.png")->getContentSize().height * 
PIPE_GAP) * cocos2d::random(1.0, 2.0) /*- topPipe->getContenSize().height*/));

layer->addChild(topPipe);
layer->addChild(bottomPipe);

auto fadeIn = FadeIn::create(0.3f);

auto topPipeAction = MoveBy::create(PIPE_MOVEMENT * visibleSize.width * 2, Point(-visibleSize.width  * 3, 0));
auto bottomPipeAction = MoveBy::create(PIPE_MOVEMENT * visibleSize.width * 2, Point(-visibleSize.width * 3, 0));

auto seqTop = Sequence::create(fadeIn, topPipeAction, CallFunc::create([&topPipe, &bottomPipe, layer]()
{
    layer->removeChild(topPipe, true);
}), nullptr);

auto seqBot = Sequence::create(fadeIn->clone(), bottomPipeAction, CallFunc::create([&topPipe, &bottomPipe, layer]()
{
    layer->removeChild(bottomPipe, true);
}), nullptr);

topPipe->runAction(seqTop);
bottomPipe->runAction(seqBot);

Help me please)

4 posts - 4 participants

Read full topic

Viewing all 17056 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>