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

Builtin component with custom properties don't display in inspector

$
0
0

@davidbm wrote:

I’m trying to add functionality to the CCButton.js component in the engine and i can’t find the inspector file (packages://inspector/inspectors/comps/button.js)
It isn’t in the project packages folder and neither in the .CocosCreator/packages
Where is it?
Without modifying it i can’t add the component to display in the inspector in Cocos Creator editor without just removing the “inspector: ‘packages://inspector/inspectors/comps/button.js’”.

Thanks

Posts: 1

Participants: 1

Read full topic


Scene does not unload

$
0
0

@adikhel wrote:

Hi,

I am using a webview in a scene. When I use cc.director.loadScene(‘game2’), the previous scene should ideally unload. That is what is happening on the desktop, no problems at all.

But on android, I can still hear the audio from the webview content playing even after the ‘game2’ scene has loaded.

Cocos Creator is a great tool to work with. I am still new and learning, but it’s way more intuitive than I thought.

Posts: 1

Participants: 1

Read full topic

Cocos Creator Roadmap 2019 and beyond

Add new action to sequence

$
0
0

@sayiciemre wrote:

I’m not familiar with cocos. I would like to create a game logic and I’m stuck with following code. and i need your help.

var fallBounceSeq = cc.sequence(fallTo2, cc.callFunc(function() {
        if (!success) {
            this.gameOver();
        } else {
            if(*something true*) {
                *add another action*
            }
            else{
                *add another action to sequence*
           }

        }
    },this));
    this.square.runAction(fallBounceSeq);

How can i add another action into cc.callFunc()? Should i add another cc.callFunc into if - else condinition?Any suggestions?

Posts: 1

Participants: 1

Read full topic

Apply a force or an impulse to a PhysicsSprite3D

$
0
0

@versailles wrote:

Hello,

Do you know a way to apply a force or an impulse to a PhysicsSprite3D object ?

There is the applyimpulse() function for sprites 2d applied to rigidbody. But is there an equivalent for PhysicsSprite3D ?

Thanks,

Posts: 1

Participants: 1

Read full topic

Google Chromecast

Munchie Match (New Unique Match 3 Puzzle Game) [iOS/Android/Windows/MacOS/Apple Watch/Apple Tv]

$
0
0

@ericb365 wrote:

This game was proudly created with Cocos2dx in Canada!

The game is released on iOS, Android, Windows, MacOS and Apple Watch in almost every country!

We also have a separate ios app called Munchie Match Online which is using the Skillz integration to play online for real money turning the game into a mobile esports! https://www.skillz.com/

The Apple Tv version will be released on May 22, 2019

The game also includes an Apple watch mini-game and fun stickers for iMessage!

The game suports multiple languages including: English, Chinese (Traditional), French, German, Italian, Japanese, Korean, Norwegian, Portuguese (Brazil), Russian, and Spanish

Excluding cocos2dx, the game was made from scratch. All the programming, visual assets, and music is all original work under Bouchard Industries Corp. Here are the credits:

Developer: Eric Bouchard
Visual Artist: Zack Dawson
Composer: Chris Roach, (feat. Alex Schultz)
Engine: Cocos2dx

The game was in part-time development for about 1.5 years. Thank you Cocos2dx and the community for this amazing free engine!

Here is a bit of information about the game:

Munchie Match is a mix of old school and modern matching puzzle games with new and unique features you have never seen before.

Finally, a more interactive match 3 game that will leave you at the edge of your seat, challenge your on the spot problem-solving skills as you get through a multitude of unique levels, with a variety of objectives and obstacles.

If you have been looking for something more intense than your average match 3 game, look no further, this is the game for you!

This game is action packed with numerous intricate puzzles involving fun, colored food. Quickly maneuver and match the descending hamburgers, hot dogs and tacos to get points or to create new, more powerful food that will help you achieve your goal.

*Previews at the bottom of this post

ios and apple watch: https://play.google.com/store/apps/details?id=com.BouchardIndustries.MunchieMatch

Android: https://play.google.com/store/apps/details?id=com.BouchardIndustries.MunchieMatch

Steam version (Adless and unlimited lives) https://store.steampowered.com/app/1046210/Munchie_Match/

Mac OS version on Itunes: https://itunes.apple.com/ca/app/munchie-match/id1448319757?mt=8

Skillz mobile esport version (Play for money!) https://itunes.apple.com/ca/app/munchie-match/id1448319757?mt=8

0x0ss%20(1)
0x0ss%20(4)
0x0ss%20(7)
0x0ss%20(5)
0x0ss%20(9)

Posts: 1

Participants: 1

Read full topic

How to get cc.EditBox's cursor position.

$
0
0

@Devii wrote:

i.e How cani get edit box’s editing position or current input cursor position.
Thanks

Posts: 1

Participants: 1

Read full topic


How can I get uuid of prefab from the node created with prefab?

$
0
0

@FocusCreative wrote:

Hi friends.
I need to get prefab uuid from node’s PrefabInfo object. I need to save this uuid and I want to use it later to instantiate objects from prefabs. I can get correct uuid from prefab object itself but can’t get it from the node created.

Let me explain.

I can get uuid and path infor of prefab from editor:

menu

And I can use it in script like this:

var self = this;

let uuid = "2877e0c4-6500-41d8-9698-71d928778555";

cc.AssetLibrary.loadAsset(uuid, function (err, asset) {
    
    if(err){
        cc.log("ERROR: " + err);
        return;
    }

    let spawn_object = cc.instantiate(asset);

    spawn_object.parent = self.node.parent;
    spawn_object.x = self.node.x;
    spawn_object.y = self.node.y;
    
});

So far so good.
I drag the prefab to scene view and create node.

Now I need to find this node’s prefab with code.

I’ve tried get info from “node._prefab” but it only includes this information in PrefabInfo:

_prefab: cc_PrefabInfo:{
    asset: null
    fileId: "19LYOm+BVNJalMEZnNVgeb"
    root: cc_Node {_name: "Crystal_…}
    sync: false
}

I’ve tried “fileId” as uuid but it doesn’t work.
I need to find uuid of original prefab in asset database.

Any advices from big brothers?

Posts: 1

Participants: 1

Read full topic

Create Bowl Type Physics Sprite that contain Another Physics Sprite

Cocos2d-x version number defines

$
0
0

@R101 wrote:

With the future release of Cocos2d-x v4, it will break compilation of game code written for v3 of the engine. This would mean maintaining different branches of the game for each version of the engine, yet this can be avoided if version number preprocessor defines were introduced into Cocos2d-x. It would enable us to have a single code-base with support for both versions of the engine, since we would be able to check for the version number information and selectively include sections of code.

Adding the version defines would not impact the engine code, since it’s purely for the game code and any other extensions written for the engine (like Spine) to maintain a single code base.

I’ve created a github issue for this. If anyone has concerns regarding it, then please provide your input, and if you actually agree that this would help in some way, then please help push it along so it’s implemented before version 4 of Cocos2d-x is released.

Posts: 1

Participants: 1

Read full topic

Android studio thread issue

$
0
0

@Arun55 wrote:

I am using cocos2dx 3.17 ndk ->16b
When I’m building apk I a’m getting this kind of error unable to create thread
in android studio I don’t know what is the issue can any one help me out

Iam getting the issue in Mac mini iOS 10.14, ram->8gb

armeabi-v7a] StaticLibrary : libui.a
[armeabi-v7a] StaticLibrary : libcocosdenshion.a
[armeabi-v7a] StaticLibrary : libextension.a
[armeabi-v7a] StaticLibrary : libaudioengine.a
[armeabi-v7a] StaticLibrary : libpvmp3dec.a
[armeabi-v7a] StaticLibrary : libcocos2dxinternal.a
[armeabi-v7a] StaticLibrary : librecast.a
[armeabi-v7a] StaticLibrary : libcocos2dandroid.a
[armeabi-v7a] StaticLibrary : libcocos2d.a
[armeabi-v7a] StaticLibrary : libcocosbuilder.a
[armeabi-v7a] StaticLibrary : libcocos3d.a
[armeabi-v7a] StaticLibrary : libspine.a
[armeabi-v7a] StaticLibrary : flatbuffers.a
[armeabi-v7a] StaticLibrary : libnetwork.a
[armeabi-v7a] StaticLibrary : libvorbisidec.a
[armeabi-v7a] StaticLibrary : libcpufeatures.a
[armeabi-v7a] SharedLibrary : libMyGame.so
:NewSuperPack:compileDebugSources
:NewSuperPack:mergeDebugShaders
:NewSuperPack:compileDebugShaders
:NewSuperPack:generateDebugAssets
:NewSuperPack:mergeDebugAssets FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:NewSuperPack:mergeDebugAssets’.

unable to create new native thread

Posts: 2

Participants: 2

Read full topic

Cocos is Revolutionizing Gaming (Again) with Cocos-BCX

$
0
0

@Summer.Yang wrote:

Source: CoinAnnouncer

Launched in November 2017 by the founding team behind Cocos2D-x, one of the world’s largest open-source game development platforms behind hit games like Badlands, Fight!, and Clash of Kings, Cocos-BCXis a platform for developing, operating, managing and exchanging decentralized applications (“dApps”) and in app digital assets (“dAssets”) on the blockchain. Cocos-BCX includes a software framework for multisystem, multi-blockchain application development, a visual script based and data-oriented IDE for DApps and in app asset production, and CocosChain, customized for supporting digital asset transfer, game economic models on the blockchain, with cross-chain interoperability.

For anyone familiar with the world of online gaming, Cocos is synonymous with the world’s most popular game development tools and some of the most recognizable viral games. Since 2009, 1.3 million developers registered on Cocos community, while 3 million developers are estimated to have used the Cocos gaming engine. The ad network arm of Cocos covers 14 million daily active users and 605 million devices globally.

With Cocos-BCX, the team is planning to transform the business model of gaming from fee-based to asset-based and help balance the goals of digital asset appreciation versus using pay to play models with a blockchain gaming model that is without equal.

The key functionalities and features of Cocos-BCX, such as high system response and trustable randomness, are essential to creating successful blockchain games. To fulfill these requirements, Cocos-BCX incorporates multiple solutions to increase system efficiency, and three different randomness methodologies. These critical elements have been implemented successfully in Orion Shooting and Happy Fruit on Cocos-BCX. In Orion Shooting, the algorithm for the lucky draw system is fully executed by contract. Records such as player interaction and lucky draw can all be validated and viewed in the blockchain browser in real-time.

In August 2018, Cocos-BCX introduced NHAS-1808, a non-homogenous digital asset standard, improving existing NFT standards and makes industry level game development possible on the blockchain. In October 2018, Cocos-BCX further improved the NHAS-1808 standard, supporting new business models, such as asset leasing, collateralization, and mortgage. Today, NHAS-1808 standard has become a widely recognized non-homogenous digital asset standard in blockchain gaming. Cocos-BCX has already established ongoing collaboration with multiple public blockchains to jointly build a digital asset circulation network, and further promote the NHAS-1808 standard. Cocos-BCX has received strategic investment from leading institutions, including Binance Labs, NEO Global Capital, 500 Startups, and more, and has been closely working with industry partners such as HelloEOS, SlowMist Tech, Nebulas, Loom, IMEOS.ONE, to name just a few.

The Cocos-BCX testnet is currently live and expectations are high for the open-source, all-platform game development model that has attracted the attention and involvement of the leading developers in the online gaming space.

“Cocos-BCX is committed to supporting the innovation of technology and business models in blockchain gaming, by building the digital asset standards and a best-in-class digital game economy system,” explains Haozhi Chen, co-founder and CEO of Cocos-BCX and founder of Chukong Technology, “Cocos-BCX not only makes blockchain game development much easier, but also empowers the game industry. With our innovative infrastructure and business models, Cocos-BCX significantly lowers the barrier of entry for blockchain gaming. Cocos-BCX will bring industry opportunities and prosperity while driving forward the development of blockchain-based gaming.”

Official website: http://www.cocosbcx.io/en/

Telegram: https://t.me/cocosblockchainexpedition

Twitter: https://twitter.com/cocosbcx

Reddit: https://www.reddit.com/r/cocosbcx/

Discord: https://discord.gg/jdJMNtC

Read More https://www.coinannouncer.com/cocos-is-revolutionizing-gaming-again-with-cocos-bcx/

Posts: 1

Participants: 1

Read full topic

Drawcall and fps trouble

$
0
0

@ndmh wrote:

hi every one,i have a trouble with drawcall and fps.I have create atlas sprite for my game but it not really reduce drawcall and causing drop fps.Can you tell me how to optimize my game.it really lag.

Posts: 1

Participants: 1

Read full topic

Is there a color picker tool?

$
0
0

@dogwalker wrote:

I’ve searched, no luck so far, just wondering if there is any kind of color picker for the C++ 3.16 or above?

If not, I can just let them type in something. Thanks.

Posts: 4

Participants: 2

Read full topic


how to rotate images according to "onMouseMove"

$
0
0

@blackcat99 wrote:

2

        auto sp= Sprite::create("gun.png");
    	sp->setPosition(Vec2(500, 500));
    	sp->setScale(0.2);
    	layer->addChild(gun, 2);


void HelloWorld::onMouseMove(Event *event)
{
	EventMouse* e = (EventMouse*)event;
	ex = e->getLocation().x;
	ey = e->getLocation().y;

	.......
}

how can the sprite rotate the head in the direction of the mouse ?
many thank :slight_smile: :slight_smile:

Posts: 1

Participants: 1

Read full topic

Fix for run application on Linux

$
0
0

@chmyaf wrote:

Hi!
When running the application on linux (with cocos shell command) I get the following error:

OSError: [Errno 2] No such file or directory: '/path/to/project/linux-build/bin/Release/<%app name%>'

I have prepared a small fix for this problem in the cocos console - pull request #455.
Can You add it to the main sources?

Posts: 2

Participants: 2

Read full topic

Physics overlapping

$
0
0

@rollingpandaarts wrote:

when i create two physics object they can collide each other and overlapping so how to create object like character they can not ovelapping to another physics object

like this type object when the ball drop inside the object then after when move the object the ball move outside of the object so can you please tell me how to create this type of body they contain another physics body 12

Posts: 1

Participants: 1

Read full topic

How to re-animate the sprites?

$
0
0

@Darooooon wrote:

Hi, I wrote my class to run the animation.

It has Sprite and Animate member object.

It actually runs on Scene once.

I want to re-animate same sprite with same animation when I press any key, so I add Eventlistener to this Scene with Callback.

animation = Animation::createWithSpriteFrames(frames, 1.0 / numImgs);
animate = Animate::create(animation);

void SpriteAnimation::runAnimation()
{
	sprite->runAction(animate);
}

listener->onKeyPressed = [&sa = this->sa](EventKeyboard::KeyCode keyCode, Event* event) {
	sa.runAnimation();
};

But when I press the key, the program go down.

I debugged it but I cannot solve it.

When it animates first time on Scene(not on Eventlistener), the size of Animate is same as number of images.

But when Press Event is triggered, the size of Animate become trash value.

How can I re-animate when event has triggered?

Posts: 4

Participants: 2

Read full topic

Crash-reports from Google Play

$
0
0

@SteinOveHelset wrote:

Hi,
I get a lot of error reports in Google Play:
_ZN6sdkbox20GPGAchievementsProxy6unlockERKNSt6__ndk112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE

I think this comes from SDKBOX Play when an achievement is unlocked or something, but I’m not able to reproduce this.

I unlock an achievement with this code:
sdkbox::PluginSdkboxPlay::unlockAchievement(“100points”);

Is there a reason why this could cause errors? Is it because the user isn’t signed in or similar?

Posts: 1

Participants: 1

Read full topic

Viewing all 17082 articles
Browse latest View live


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