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

VideoPlayer over canvas


Cocos forum domain has been blocked at Russia

$
0
0

@owlet wrote:

I’m not certain in which part of the forum put this and whether or not this will get attention but here is the thing:

Cocos forum domain has been blocked at Russia :roll_eyes:

You see, our government is in a state of war with Telegram, which leads to collateral damage in a few millions of IP’s like parts of the DigitalOcean (guys from China should probably understand). Different providers implement such measures differently so it still can work for some.

And also this probably true for some parts of the official site. So in order to download the latest version, not from the GitHub, you need somehow to get around. And also from my perspective this forum is essential for all developers because of the showcases and many QA (most of the info can’t be found somewhere else).

Just to notify and maybe it is possible to change host to a different subnet.
Thanks for attention.

Posts: 3

Participants: 2

Read full topic

Cant find info.plist file

Cocos build fail after sdkbox integration

$
0
0

@Musab wrote:

26.1.0.aar\4b7c0ab371ed02e29bc1fc64c238fe2e\jars\classes.jar has been removed.

Applying ProGuard configuration file C:\Musab\projects\jsb-default\frameworks\runtime-src\proj.android-studio\build\intermediates\proguard-files\proguard-android.txt-3.1.4
Applying ProGuard configuration file C:\Musab\projects\jsb-default\frameworks\runtime-src\proj.android-studio\app\build\intermediates\proguard-rules\release\aapt_rules.txt
Applying ProGuard configuration file C:\Musab\projects\jsb-default\frameworks\runtime-src\proj.android-studio\app\proguard-rules.pro
Warning: Exception while processing task java.io.IOException: proguard.ParseException: Unexpected keyword ‘com.twitter.sdk.android.**’ in line 22 of file ‘C:\Musab\projects\jsb-default\frameworks\runtime-src\proj.android-studio\app\proguard-rules.pro’
Thread(Tasks limiter_3): destruction
:the_balloon:transformClassesAndResourcesWithProguardForRelease FAILED
:the_balloon:transformClassesAndResourcesWithProguardForRelease (Thread[Daemon worker Thread 9,5,main]) completed. Took 0.97 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:the_balloon:transformClassesAndResourcesWithProguardForRelease’.

Job failed, see logs for details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 16m 53s
53 actionable tasks: 8 executed, 45 up-to-date
Error running command, return code: 1.

so i built before sdkbox and it worked just fine but after importing these plugins
image

i was building to test game services and admob tried to follow proguard optional steps but couldnt find the file it talked about

Posts: 1

Participants: 1

Read full topic

Error in cococs2d-x v2.2.6

$
0
0

@MingLee wrote:

I have a old code built in cocos2d-x v2.2.6 and now I am trying to run it on latest xcode 10
However, I was unable to run it and saw several errors.
Can anyone help me?
I am sorry for my poor english. Thank you.

Posts: 2

Participants: 2

Read full topic

SDKBOX with Cocos Creator for beginners

$
0
0

@Musab wrote:

So i integrated sdkbox successfully and imported some plugins too. i followed the admob integration for CC, but i couldn’t test if it works because i can’t compile i already posted about that in another post, but seems ok. the questions is how do i use the other plugins there aren’t guides on any other plugin other then admob for CC so those who used sdkbox with CC and integrated plugins successfully any advices any links i can follow or maybe even tutorials

Posts: 1

Participants: 1

Read full topic

2.1.0: Performance warning in Chrome

$
0
0

@MikeFromMars wrote:

Hi…,

I get this “Performance warning: clear() called with no buffers in bitmask” in Chrome.

Any ideas?

Thanks

Mike

Posts: 1

Participants: 1

Read full topic

How do I create a custom event on ts class

$
0
0

@rsamrry wrote:

hi,
I want to create custom events on my typescript class(not node). for that I will need to declare the event listener, create an event and dispatch the event. to do all this on the class and not the node I will need a singleton ts class and use instances of the class. can anyone tell me how to do all this? I am especially confused about how to make a singleton component class.
any help will be greatly appreciated.
Thanks!

Posts: 1

Participants: 1

Read full topic


How do i change apk icon and title

$
0
0

@Musab wrote:

i understand that i can’t put spaces in title while building, but i dont understand then how all these apps have spaces in their names or is that something google does for you when you send them your apk with the name you want?

also with apk icon does google change it automatically to the app icon i upload on play console or do i have to change it myself? this is going to be my first publish so i wanna make sure

Posts: 1

Participants: 1

Read full topic

Not able to compile apk

$
0
0

@adikhel wrote:

I am able to compile an apk successfully from Android Studio. But when I try to build it from the Cocos Creator Editor, I get an error. Log file below. The full log file is uploaded here: http://txt.do/15ysv

No history is available.
All input files are considered out-of-date for incremental task ‘:libcocos2dx:generateReleaseRFile’.
Unable do incremental execution: full task run
‘C:\Program’ is not recognized as an internal or external command,
operable program or batch file.
:libcocos2dx:generateReleaseRFile (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 1.102 secs.
External native generate JSON release: JSON generation completed with problems
:kf3:generateJsonModelRelease FAILED
:libcocos2dx:generateReleaseBuildConfig (Thread[Task worker for ‘:’ Thread 3,5,main]) started.
:libcocos2dx:generateReleaseBuildConfig
:kf3:generateJsonModelRelease (Thread[Task worker for ‘:’,5,main]) completed. Took 1.699 secs.
Putting task artifact state for task ‘:libcocos2dx:generateReleaseBuildConfig’ into context took 0.0 secs.
Deleting stale output file: C:\CocosCreator\resources\cocos2d-x\cocos\platform\android\libcocos2dx\build\generated\source\buildConfig\release
Up-to-date check for task ‘:libcocos2dx:generateReleaseBuildConfig’ took 0.002 secs. It is not up-to-date because:
No history is available.
:libcocos2dx:generateReleaseBuildConfig (Thread[Task worker for ‘:’ Thread 3,5,main]) completed. Took 0.039 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:kf3:generateJsonModelRelease’.

Build command failed.
Error while executing process C:\Program Files (x86)\Android\android-ndk-r13b\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\Cocos2D-X-Projects\kf3\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=D:\Cocos2D-X-Projects\kf3\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-16 NDK_OUT=D:/Cocos2D-X-Projects/kf3/build/jsb-link/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=D:\Cocos2D-X-Projects\kf3\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\release\lib NDK_TOOLCHAIN_VERSION=clang NDK_MODULE_PATH=C:\CocosCreator\resources\cocos2d-x;C:\CocosCreator\resources\cocos2d-x\cocos;C:\CocosCreator\resources\cocos2d-x\external -j4 NDK_DEBUG=0 APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
‘C:\Program’ is not recognized as an internal or external command,
operable program or batch file.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 51s
26 actionable tasks: 24 executed, 2 up-to-date
Error running command, return code: 1.

Posts: 1

Participants: 1

Read full topic

Js documentation to cocos creator user

$
0
0

@Musab wrote:


so i’m trying to follow this tutorial and integrate gpg into my game but since im using cocos i dont really know what to do with this am i supposed to make a component called gpg.GameServices.Builder and put these functions inside of it or what exactly ?
.SetOnAuthActionStarted( function( result ) {
                // Auth started callback
            })
            .SetOnAuthActionFinished( function( result ) {
                // Auth finished callback
            })
            .SetLogging( gpg.LogLevel.INFO )    // Set Logging level
            .EnableSnapshots()                  // Enable Snapshot (Saved Game) functionailty
            .Create( function( game_services ) {
                // 8
            } );

Posts: 1

Participants: 1

Read full topic

How to initialize GPG cocos creator?

$
0
0

@Musab wrote:

can someone show me their code on how to initialize GPG with javascript in cocos creator please? my game is finally finished expect i gotta implement gpg and leaderboard so please someone show me your code on how you did it or guide me throught it thanks

Posts: 5

Participants: 2

Read full topic

Best way to set position of a node to another node?

$
0
0

@ancomchancanh wrote:

Suppose I have nodeA & node B with paths:

Canvas/parentA/nodeA
Canvas/parentB/nodeB

The way I used to make nodeA to be positioned exactly at position of nodeB currently is
(making nodeA overlap & hide nodeB under)

var canvas = cc.find('Canvas');
var posAGlobal = canvas.convertToNodeSpaceAR( nodeA.convertToWorldSpaceAR( cc.v2() ) );
var posBGlobal = canvas.convertToNodeSpaceAR( nodeB.convertToWorldSpaceAR( cc.v2() ) );
var positionDiffGlobal = posBGlobal.sub( posAGlobal );

var posALocal = nodeA.getPosition();
nodeA.setPositon( posALocal.add( positionDiffGlobal  ) );

As you can see, my code looks so long and use an intermediate node as “canvas”, which is not kind of convenient.

Besides, I found out that node.convertToWorldSpaceAR() will give me wrong result if scale of parentA or parentB is not equal to 1. Or maybe, anchor point of parentA, parentB could spoil the result.

So, could any one give me a right way to achieve this?
Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Run cocos2dx inside Android Fragment

$
0
0

@owlet wrote:

This issue previously has been discussed here, but I thought it could be useful for someone except me, so I’ve implemented it and want to post a sample code here. Results look like this:

So basically with that, you might use cocos from native android fragment without any changes to the engine itself. You may find all the sources here.

RFC. Will be glad for any questions and suggestions as well as PR.

Posts: 1

Participants: 1

Read full topic

node.getPath() --->"Canvas/parent1/parent2/nodeName"?

$
0
0

@ancomchancanh wrote:

Hi creator users
Do you know any function with creator to get a node’s path like:

node.getPath() —> “Canvas/parent1/parent2/nodeName”

Or do we need to write a recursive function to crawl from the node to its root parent?
Thanks !

Posts: 1

Participants: 1

Read full topic


Loading Image from URL

$
0
0

@adikhel wrote:

How do you load an external image as a sprite frame of a prefab?

var tex = cc.TextureCache.getInstance().addImage(“http://www.abc.com/t1.png”);
icon.sprite.setTexture(tex);

Pops an error “Cannot read property ‘getInstance’ of undefined.”

Posts: 1

Participants: 1

Read full topic

What is the best way to create a level shortcut in menu?

$
0
0

@Dogrtt wrote:

Hi there.
I have a PageView and I want on every page to have an array of MxN items. Each item is a level icon. What if I want to make not just a flat button but the button with labels on top, with stars icons and some other stuff - a separate class, inside of which there will already be a implementation of all of this features, then on the basis of which base class is it better to reproduce? Button? MenuItem? MenuItemImage? As I understand, in PageView, as pages, the derivatives of the Layout are set. In this case, if I woud make an item based on the MenuItem, can I extend a Menu into several pages or do I have to do a few separate Menus on each page? In which container should it be placed, if I make item based on a Button class? Tableview? VBoxes for each row nested in HBox?

Posts: 2

Participants: 2

Read full topic

setWindowed changes visible size even though setDesignResolution was called

$
0
0

@Ninja_Gah wrote:

Here’s a github post from a while back if you want more detail, but no one commented on it so I’d figure I would try here.

But the jist of it is that setWindowed, which is a desktop only function, changes the visible size to the new window size even though setDesignResolution was previously called. The comments for getVisibleSize specifically says it returns window size unless setDesignResolution was called. Since setWindowed is a relatively new addition I don’t know if this was intended or not.

Does anyone have any input? Thanks!

Posts: 1

Participants: 1

Read full topic

--- Article Removed ---

$
0
0
***
***
*** RSSing Note: Article removed by member request. ***
***

WeChat game on android phone problem

$
0
0

@Eliteman wrote:

Hi.
I have been built a wechat mini game recently and it runs well on iPhones.
My game downloads all resources from the remote server and I think there is something to do with remote resource downloading.
I tried to downgrade WeChat version of the phone and change the cocos version, but nothing worked.
When I run it on the android phones it loads first but when it reaches 100%, it freezes and not show the game. I tested on various types of android phones and it’s the same.
Have anyone faced this problem?

Posts: 1

Participants: 1

Read full topic

Viewing all 17083 articles
Browse latest View live


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