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

Using function parameter to access different objects inside properties

$
0
0

@Musab wrote:

properties: {
    balloon0btl: {
        default: null,
        type: cc.RichText
    },
    balloon1btl: {
        default: null,
        type: cc.RichText
    },
    balloon2btl: {
        default: null,
        type: cc.RichText
    },
},

i have this objects in my script they are different richtexts i wanna choose one depending on the paramater of function and change its strings value

here is what i tried and didnt work

var selectb = function (be) {
var n = String("balloon"+be+"btl");
this.n.string = selectedtxt;
};
selectb(cbal);

i know this isnt exactly a problem related to cocos but i hope you guys can help thanks in advance

Posts: 1

Participants: 1

Read full topic


Sprite Animation problem

$
0
0

@Andres_IC wrote:

I have a sprite cycle animation with a simple 4 frames sequence.
the problem is that the up part of the sprite doesnt move up its like being clamped
image
image

original sprite
Maza_IdleFront

in unity works fine so i dont know the problem

Posts: 1

Participants: 1

Read full topic

Do you have news about cocos2dx 4.0?

Insufficient Permission warnings on iOS

$
0
0

@piotrros wrote:

When I ran the app (latest iOS 12, cocos2d-x 3.17) and go to the home screen I’m flooded with these logs:

**My app[3864:1043844] Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (IOAF code 6)**

**2019-03-21 11:43:22.474312+0100 My app[3864:1043844] GLDRendererMetal command buffer completion error: Error Domain=MTLCommandBufferErrorDomain Code=7 "Insufficient Permission (to submit GPU work from background) (IOAF code 6)" UserInfo={NSLocalizedDescription=Insufficient Permission (to submit**

Strange, I don’t use Metal. Should I worry about it?

Posts: 2

Participants: 2

Read full topic

How to handle 'Objective-C AD Module' from javascript

$
0
0

@megatomic wrote:

Hi!
I want to integrate ‘Objective-C based AD Module’ into my cocos creator project.
Major problem is how my javascript module can receive ‘callback message’ from AD module when rewarded video is finished.
Please let me know your solution!!
Have a nice day~~~

Posts: 1

Participants: 1

Read full topic

Help test our new website (please...)

Update cocos2d-x projects versions

$
0
0

@versailles wrote:

Hello,

I want to update my cocos2d-x projects from version “3.16” to version “3.17.1”.

Is there a automatic way to do that without creating a new project and transferring c++ and resources files?

Thanks in advance,

Posts: 1

Participants: 1

Read full topic

How to create an array property

$
0
0

@Musab wrote:

how do i create an array property and have like different properties inside of it

arr: [
balloon0bt: {
    default: null,
    type: cc.Node
},
balloon1bt: {
    default: null,
    type: cc.Node
},
balloon2bt: {
    default: null,
    type: cc.Node
},],

Posts: 1

Participants: 1

Read full topic


destroy object ??

$
0
0

@blackcat99 wrote:

 #include "bullet.h"

USING_NS_CC;

using namespace std;
using namespace ui;
using namespace CocosDenshion;


Bullet::Bullet(Layer *layer,int x ,int y)
{
	Vec2 origin = Director::getInstance()->getVisibleOrigin();
	auto visibleSize = Director::getInstance()->getVisibleSize();
	sp = Sprite::create("bullet.png");
	sp->setScale(1);
	sp->setPosition(Vec2(x,y));

	layer->addChild(sp, 1000);
	
	auto bulletbody = PhysicsBody::createBox(Size(sp->getContentSize().width, sp->getContentSize().height));
	sp->setPhysicsBody(bulletbody);
	bulletbody->setCollisionBitmask(10001);
	bulletbody->setContactTestBitmask(true);
	bulletbody->setDynamic(false);
	auto moveToD = MoveBy::create(10, Vec2(8000, 0));
	sp->runAction(moveToD);
}

This is how I create the bullet.
how to destroy it. i want to delete it completely when it collides with another object

Posts: 2

Participants: 2

Read full topic

Which tool is best for making 2D animations

Full Script of CHEN Haozhi’s speech at Blockchain Games Next

$
0
0

@Summer.Yang wrote:

Cocos-BCX: Empowering Innovations in Blockchain Gaming

-CHEN Haozhi’s speech at Blockchain Games Next on March 19th, 2019

Thank you all!

  1. What is Cocos?

It has been 11 years since Cocos was founded in Los Angeles. Argentina, in 2008. Originally, it started as a game development engine for mobile applications, which evolved into today’s Creator, as we kept on designing additional tools to incorporate within it, since 2012.

Currently, Cocos game engine supports all-platform game development including PS4, Xbox One and PC . Globally the reputable developers we are aware of using Cocos game engine include Bigfish, Zynga, EA, Tencent, NetEase, Ketchapp, Ubisoft, DENA, etc. Out of all games developed by Tencent and NetEase, over 40% and 60% respectively are developed based on Cocos. The most well known one among these is Kniver Out, a game similar to PLAYERUNKNOWN’S BATTLEGROUNDS.

  1. Cocos has high market shares in Asian and Eastern European regions, due to the local game development habits and market factors. Cocos has been open source since the very beginning . It has always offered free game development environment, which enabled small and medium-sized teams to develop lightweight games with high speed, high quality and low cost. Especially in Japan, there’s a large user base involved in card games and casual games. Since 2013, thanks to the the rapid development of mobile games, many big MMO games, including part of 3D games, also started to use Cocos.

  2. Comparing to market shares of Unreal and Unity in the USA, Cocos enjoys much higher market shares in regions including Asia, South America, and Eastern Europe with 1.3 million developers worldwide.

  3. In 2018, with the release of Mini Games and Instant Games on WeChat and Facebook , Cocos Engine and Tools ranked number 1 by utilization rate within these two platforms. The main reason is that until today both Unity and Unreal Engine are not able to support these two platforms. It is also due to the advantage of architecture behind Cocos that made it possible… At Cocos, we put a lot of effort into making the framework and product structure light-weight. Nowadays, major companies including Huawei, OPPO, VIVO, Samsung and Baidu are all using the runtime environment and frameworks provided by Cocos for mini games. To some extent, Cocos platform is natively fit for the operation of blockchain games.

top earning games in China, Japan and India

Let us have a look at the top-earning games in Japan, India and China. Employing a Unity engineer with 2-year development experience costs around 40k USD per year, while a Cocos engineer costs only 25k USD. In China, every year there will be 20k graduates who have studied Cocos development program coming out to the market. Meanwhile in Japan, Cocos Creator development courses are already opened in primary schools.

market share of instant game engines

This diagram shows the market share of instant game engines.

Cocos accounts for 53% on WeChat (instant game) . WeChat instant game is largely different from that of Facebook. WeChat utilizes a Runtime solution provided by Cocos , which has performance similar to native game operating environment.

By 2018, total income of WeChat instant games has already achieved 1 billion USD, with game submissions from nearly 10k developer teams. In 2019, China mini game market will reach a total turnover of 3 billion USD.

The reason behind such rapid growth is mainly due to Huawei, OPPO, VIVO, Samsung have already started to support instant game . And Facebook instant game is of H5 game standard, which cannot support the operation of many other game categories.

Cocos partners

These are our long-term partners and some CPs in cooperation, among which Qualcomm is one of our investors.

In 2017, We started paying attention to and getting involved in blockchain. The reasons are twofold.

1.We officially entered the mobile games industry in 2010, only in 2012 the mobile games market started to gain profit and scale in user base. In 2014, we started the development of instant game runtime environment, but only in 2018 it began to support the operation of this new users and technical platform.

We believe preliminary preparations and technical reserves are of most importance for blockchain gaming.

  1. Game streaming is the trend of product format for current game market, and game subscription will be a major revenue model. Props trading will continuously arise in popularity. For example, the total in-game payment in China market is 30 billion USD, while the annual props trading is only 3 billion USD. However , we saw in 2018 that, the props trading on Ethereum, EOS and TRON has reached 5 billion USD, while the in-game payment is less that 500 million USD. This shows the scale of blockchain game trading is 100 times that of traditional market.

blockchain game props trading volume in 2019 (EOS, Ethereum, Tron)

blockchain games props trading volume in Q1 2019 (EOS, Ethereum, Tron)

Let’s take a look at the figures of Q1 2019, game props trading on blockchain (EOS, Ethereum, Tron) reached 2.8 billion USD, which is ten times the amount of Q1 2018. So it is expected that in the future blockchain games, props trading will be the major business model. In the digital asset trading market there may even emerge mega-sized trading platform that exceeds the traditional e-commerce platforms such as eBay and Taobao.

Therefore, in the process of integrating blockchain technology and adding support for non-homogenous game assets , we’ve been doing lots of preparation to enable high performance, low cost of contract development and execution for games on blockchain. Over the first half of 2019, Cocos will complete the official deployment and launch of the main net, expecting many developers joining the testing and product development . We hope to provide support for the development of the blockchain game industry, just like what we have done for mobile gaming and instant games in the past.

Google has just announced their launch of cloud game streaming during GDC. In China, we are also collaborating with major cloud service operators, to test and build platforms for cloud games.

Game industry evolves with continuous iteration of the user platform and the technology platform. To bring gamers unprecedented experience is the lifelong pursuit of us all working in the gaming industry.

End.

To know more about Cocos-BCX, check below important links:

Cocos-BCX Alpha Testing Now Opens to Developers Globally!

Technical documentation: https://doc.cocosbcx.io/

Github: https://github.com/Cocos-BCX

Cocos-BCX introduction video:https://youtu.be/KiKc3FG9Auc

Follow 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

Read full topic

cocos2d-x 3.17 crash

$
0
0

@kits wrote:

Hi everyone!
After update to cocos 3.17, We are seeing tons of “java.lang.NullPointerException” crash in Play Console. It happens in this line: mFrameLayout.addView(relativeLayout);

This is the code that contains that line:
adView = new AdView(this);
adView.setAdSize(AdSize.SMART_BANNER);
adView.setAdUnitId(AD_UNIT_ID);
RelativeLayout relativeLayout=new RelativeLayout(this);
mFrameLayout.addView(relativeLayout);
RelativeLayout.LayoutParams adViewParams = new RelativeLayout.LayoutParams(
AdView.LayoutParams.WRAP_CONTENT,
AdView.LayoutParams.WRAP_CONTENT);
adViewParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
relativeLayout.addView(adView, adViewParams);

I didn’t see this error when debugging on test device and can’t fix it. I use cocos2d-x 3.17 with android studio, google mobile ads sdk and google consent sdk. Please help me if you know about this bug.

Thanks!

Posts: 1

Participants: 1

Read full topic

importing module from javascript into typescript

$
0
0

@rsamrry wrote:

hi,
I am exporting a class from a js file like this :
var Game = cc.Class({

});

module.exports = Game;

I am storing the file called ws.js in the same folder as my typescript file and want to import Game into typescript.
I tried:
import Game = require ("./Game");

the above statement went on top of my ts file.
I am getting the error : cannot find module ‘./Game’
I want to know how I can import the js class into typescript and how to instantiate an object of the class and call a function of the class from typescript.
Thanks!

Posts: 1

Participants: 1

Read full topic

Adding leaderboard and ads

$
0
0

@Musab wrote:

so is there any tutorial i can follow to add admob ads and google play leaderboards in my game. my game is finally finished and all there is left to do is leaderboard and ads i dont really know what to do i have google play console account and right now trying to link my app to the game

Posts: 1

Participants: 1

Read full topic

[PAID] Need a Carrom Game Multiplayer

$
0
0

@Smartgames wrote:

Hi

I need a carrom multiplayer game done in any cocos2d-x or cocos js. Ready code is preferable to save time and modified. Budget is near $700

Posts: 4

Participants: 3

Read full topic


How do we add a button in static method?

Sorry for the idiotic question

$
0
0

@Cascade_Games wrote:

I just downloaded cocos creator and i was impressed by its design mechanism .It was pretty much clear that it will be 3-4 times faster than cocos2dx in game development.So we skipped cocos2dx and picked up creator.But i have few questions:-

  1. Can developers from other countries develop games for platform like oppo mini,vivo mini etc(or only chinese companies are allowed)
  2. Best possible means to learn cocos creator !!!
  3. Very important:-Can I use admob (or other) in games made in cocos creator. Infact because of this reason only I left godot game-engine (ads are only my means to earn money)
  4. just asking like that:-is there a roadmap for 2019
  5. also:- what is the difference between anysdk and sdkbox

Posts: 5

Participants: 2

Read full topic

I wanna see the doc of the game class.

Super Mega Space Game! Beta

$
0
0

@FocusCreative wrote:

Hi friends!

We are a very small team making a game called “Super Mega Space Game!” which is physics based space adventure game. Made with 100% Cocos Creator :heart:

We worked hard on this project for 1 year and resigned our daily job to finish the project. Last 3 months we worked full time and now released playable beta! You can download it for free or support us with small amount of payment.

Game has a physics engine which makes possible to have planets with gravity. You can fly around in the empty space and land on planets. We have some puzzle-like challenges to overcome and finish the beta level.

Spaceship has upgrade options like docking arm, rope, energy converter to collect crystals. Have damage and fuel features. You can repair and refuel spaceship with crystal energy like a currency.

Beta level takes about 45-60 minutes to complete once you get used to spaceship controls.
I would be very glad if you test “Super Mega Space Game!” and give feedback. You can also join us with new ideas for the game! We want to bring ideas together and complete this game with community!

Game Download Page:

After you played the game, feedback form is here:

Support us on Indeigogo:

Like, follow and have a look at social media pages:
Instagram: https://www.instagram.com/supermegaspacegame
Twitter: https://twitter.com/spmegaspacegame
Youtube: https://www.youtube.com/channel/UCS7x4xO7IYlZWP4yeXBKJxA
Discord: https://discord.gg/UsewVX2
Web: http://supermegaspacegame.com

In case of emergency full game video is here :slight_smile:

Thanks in advance for any kind of support :slight_smile:

Martin
Super Mega Space Game! Dev Team

Posts: 2

Participants: 2

Read full topic

Appmediation for cocos2d-x

$
0
0

@sheshmoshen wrote:

For those who don’t know, appmediation.com is an amazing easy to use mediation platform founded in 2017. It’s a small company and easy to work with.

So I took the time to add support for cocos2d-x.

Here is the project on Github.

For now there is only Android support, and there is no native callbacks.

Hopefully in the future, I will add IOS support and implement all functionality that appmediation provides.

Posts: 3

Participants: 2

Read full topic

Viewing all 17090 articles
Browse latest View live


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