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

Cocos2d-x-lite use bgfx as the rendering backend

$
0
0

@yinjimmy wrote:

I found a repo

cocos2d-x-lite use bgfx as the rendering backend

but I can not compile it successfully now.

Posts: 1

Participants: 1

Read full topic


firebase install -> sdkboxplay login fail

$
0
0

@brane7 wrote:

Google will not log in after installing FireBase

As instructed
./res/values/strings.xml
340534096218 </ string>

340534096218 </ string>

Andmanifest.xml

I can not log in even though I changed the current version of sdkbox is 2.4.3.3

Help me ~

Posts: 1

Participants: 1

Read full topic

how can i access to function(in typescript : class or method) on browser's console

$
0
0

@aqwer4 wrote:

when i develop JS projects, i did call function on Browser’s console for test or debug.
i want call cocosCreator’s function on console . but CocosCreator is how can i find namespace of function(or Object)? i don’t have idea.
how can i access to class or function?

Posts: 1

Participants: 1

Read full topic

Making a game thats unhackable (as much as possible)

$
0
0

@Musab wrote:

so i have normal and premium items in my game. so im using local storage to check if an item has been purchased or not. so doing this with normal items was easy right. i just set an item and get its value to check later if its bought or not. should i just do the same thing with items that are going to be IAP like should i store the data of if its bought or not offline? and only when someone is buying do that connection with iap? any ideas?

Posts: 7

Participants: 3

Read full topic

Just released BioBrickBreaker for Android

$
0
0

@franky4fingers wrote:

Hello everyone! We just released our first game BioBrickBreaker. It’s the Arkanoid with a cool graphic, different interesting mechanics, bosses, and more than 100 levels. We will be glad any feedback and with pleasure answer to all questions!

Posts: 2

Participants: 2

Read full topic

Bug with cutout on Android

$
0
0

@frozax wrote:

Cutout and GLView::getSafeAreaRect() does not support device rotation properly.

It looks like the solution is to remove the “static” keywork in the following line in CCGLViewImpl-android.cpp:

GLViewImpl::getSafeAreaRect()  {
...
int* safeInsets = JniHelper::callStaticIntArrayMethod("org/cocos2dx/lib/Cocos2dxHelper", "getSafeInsets");
...
}

Other wise the data is cached and it does not work.

Posts: 1

Participants: 1

Read full topic

Create a Parallax effect

$
0
0

@jeanporcher wrote:

Hi, i have read the guide to learn how can i create a parallaxnode but i don’t understand evey steps to do it.
Someone could explain to me steps for creating a parallax effect on the background ? thanks

Posts: 2

Participants: 2

Read full topic

Facebook Installation completed with errors :| cocos2dx js v3.17.2


Android P Notch v3.17.2 misplacing banner

$
0
0

@IzzyJM wrote:

Hello, in v3.17.1 my game displays a black bar where the notch is on android devices and the banner appears below the black bar, but upgrading to v3.17.2 it now looks like this does anybody know what code was changed to cause this ? and any possible solutions to this to display my banner below the notch ? I couldn’t find any documentation on Android about this

@raydelto @mars3142 any thing you could think of ?

Posts: 3

Participants: 2

Read full topic

Changing background color to transparent

$
0
0

@chololunaria wrote:

I have build a web-mobile platform.
Creator made 2 css files. I tried to change the background-color to transparent but it does not show as transparent.

I changed the style-mobile.css body and canvas to “background-color: transparent;” but still it shows a solid color.

canvas {
/background-color: rgba(0, 0, 0, 0);/
background-color: transparent;
}

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

UI Editor? How do people create their UI?

$
0
0

@SuperRG wrote:

Hi All,

I want to build the UI of my game in a a drag and drop editor. Is there such a thing in cocos2dx.?

I am using c++. I would like to create buttons, tables, labels etc and move and positon them in an easy way.

How do other people create their screen UI?

Posts: 1

Participants: 1

Read full topic

Chipmunk softbody physics

$
0
0

@Mamoxinch wrote:

Sorry if the following is an amaturish question, deepest appologies, I would not be asking this if there was to-date/English documentation for the matter online

Hello, I ask for a point in the right direction for soft body 2d physics using the Chipmunk physics engine,
I just want to implement something as simple as this example https://www.youtube.com/watch?v=JxICPtPbWTo

Posts: 1

Participants: 1

Read full topic

still cannot understand how to link my cocos2d c++ project against 3rd party libs (static or shared)

$
0
0

@netanalyzer wrote:

Hi to all

Android Ndk and in Android programming is not in my primary competence, so I have to ask.
I have a cocos2d-x C++ based game which runs smoothly on Windows. Now I want to build it for Android. The problem is that I use external static libraries (*.lib in windows) files, which need to be linked in executable. I successfully built those libraries for android. Now I have shared *.so file and *.a files for different archs (see below). So far so good.
But after long researches, tries & errors, and still cannot understand how to link my cocos2d project against upper mentioned libs (static or shared).
Let me show you some screen shots.

This is my build of svgren lib as single shared library for different archs:

This is my build of svgren lib as separated static libs (dependencies) for different archs:

This is how my project look in android studio. Includes for the libs are not shown.

As a result configuration compile tasks completed successfully, but during linking process I got unresolved references, of course.

Thanks

Posts: 3

Participants: 3

Read full topic

Turning off all logs for release build?

$
0
0

@IzzyJM wrote:

I built my iOS cocos2d-x in release mode and I am still seeing a bunch of logs in the log console is there any thing we have to change to get rid of this or thats just the way it is ? also if theres a setting to turn off all logging will it take effect for the android version of game ?

Posts: 2

Participants: 2

Read full topic

Problem with custom text input on Android

$
0
0

@DavidHoltkamp wrote:

We are implementing a custom text input box which inherits cocos2d::IMEDelegate. All is working good on iOS and Mac, but when I came to test on Android, things got a bit confusing. I wanted to keep the keyboard on screen like it is by default on iOS, but when I call pGlView->setIMEKeyboardState(true); it pops up a full screen white input box along with the keyboard. This does not flow like I want and is inconsistent across platform. Is there anyway to suppress this popup box and simply show the keyboard?

Posts: 1

Participants: 1

Read full topic


GravityScale not working properly

$
0
0

@kasweshi wrote:

I am trying to make a character jump and fall by adjusting the gravity. The code is only making the gravity to stop working however. When I press the space button am executing the following code in hope that the character will go up.

this.node.getComponent(cc.Rigidbody). gravity Scale = -10;

Am using positive 10 to come down and I was assuming negative 10 will make it go up. But right now it’s just making the gravity to stop working. Any ideas ? Thanks in advance

Posts: 1

Participants: 1

Read full topic

How can I show outputs from two cameras simultaneously?

$
0
0

@rsamrry wrote:

hi,
I need to place a camera on the player and another on the enemy and move both cameras with their respective subjects, and show the outputs of both of these cameras on the screen simultaneously in real time.
how can I do that?
thanks!

Posts: 1

Participants: 1

Read full topic

How do I display a sprite with the original aspect ratio?

$
0
0

@rsamrry wrote:

hi,
I want to know if, I already know the widget tool and the spriteFrame method getOriginalSize, there is a way to resize/reposition a sprite with its original aspect ratio maintained? I want to do it using components and no code. I am sure widgets are needed for this but how do I maintain the original aspect ratio of the sprite given that I will be resizing the canvas (which is the parent of the sprite) depending on the mobile device’s resolution.
my guess is to find out the aspect ratio beforehand and set the values of the widget, but because I am going to resize the canvas these calculations will fail unless I use code, which I don’t want to do.
thanks!

Posts: 1

Participants: 1

Read full topic

Display of properties in editor

$
0
0

@maxim_kulik wrote:

Hello.

I’m trying to display my own properties just like cc.Vec2, cc.Size.
37
Has anyone tried to do this?
If so, can they give a link to an example.

Specifically, now I’m trying to make a one-minute MinMax.

Posts: 1

Participants: 1

Read full topic

Custom ValueType

$
0
0

@maxim_kulik wrote:

Hello to all!

Today I tried to create my heir сc.ValueType.
As a reference, I used cc.Vec2.
const ValueType = require(’./value-type’);
const js = require(’…/platform/js’);
const CCClass = require(’…/platform/CCClass’);

function MinMax(min, max) {
    this.min = min || 0;
    this.max = max || 1;
}

js.extend(MinMax, ValueType);
CCClass.fastDefine('cc.MinMax', MinMax, { min: 0, max: 0 })

var proto = MinMax.prototype;
proto.clone = function () {
    return new MinMax(this.min, this.max);
};

proto.toString = function () {
    return "(" +
           this.min.toFixed(2) + ", " +
           this.max.toFixed(2) + ")"
        ;
};

cc.MinMax = MinMax;
module.exports = cc.MinMax;

However, I always get an error

/Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/editor/page/scene-utils/lib/source-m…:1 TypeError: Cannot read property 'min' of undefined
at e (/Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/editor/builtin/inspector/utils/utils…:48)
at t (/Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/editor/builtin/inspector/utils/utils…:64)
at Object.buildNode (/Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/editor/builtin/inspector/utils/utils…:83)
at HTMLElement._handleQueryNode (/Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/editor/builtin/inspector/panel/index…:484)
at t.map (/Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/editor/builtin/inspector/panel/index…:469)
at /Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:52
at /Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:361
at /Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:52
at done (/Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:246)
at /Applications/CocosCreatorDubl.app/Contents/Resources/app.asar/node_modules/async/lib/async.js:44

Posts: 1

Participants: 1

Read full topic

Viewing all 17109 articles
Browse latest View live