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

Create a rope that follow a sprite

$
0
0

@Akrone wrote:

Hi,
I want to create a "snake like"; for this, i need a head to be a sprite that move & point toward my mouse (achieved), and a body that act like a rope !

Here is how my game should look like:

But i don't know how to use the joint component, haven't found any cocos creator docs yet..
So, do you guys know how to achieve that ?

Thanks ! :slight_smile:

Posts: 1

Participants: 1

Read full topic


App crushes after HttpRequest on android

$
0
0

@kukuruzo91 wrote:

Suddenly app starting to crush after sends request or gets response (HttpRequest) on android devices < 19 api level.

At logcat I saw:
06-07 17:11:53.095 2503-2514/? A/<unknown>: stack corruption detected: aborted
06-07 17:11:53.315 1520-1554/system_process E/InputDispatcher: channel 'a6ca1000
06-07 17:16:45.995 2911-2953/<appPackage> A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 2953 (Thread-119)

At emulator:
06-07 17:11:53.325 1740-1749/com.google.process.gapps E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at com.google.android.gms.org.conscrypt.Platform.closeGuardOpen(:com.google.android.gms:383)
at com.google.android.gms.org.conscrypt.OpenSSLSocketImpl.startHandshake(:com.google.android.gms:297)
at com.google.android.gms.org.conscrypt.PreKitKatPlatformOpenSSLSocketImplAdapter.startHandshake(:com.google.android.gms:318)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.verifyHostname(:com.google.android.gms:217)
at com.google.android.gms.common.net.SSLCertificateSocketFactory.createSocket(:com.google.android.gms:507)
at libcore.net.http.HttpConnection.setupSecureSocket(HttpConnection.java:197)
at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:478)
at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433)
at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290)
at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240)
at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81)
at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
at com.google.android.gms.http.GoogleHttpClient.a(:com.google.android.gms:943)
at com.google.android.gms.http.GoogleHttpClient.a(:com.google.android.gms:761)
at com.google.android.gms.http.GoogleHttpClient.execute(:com.google.android.gms:669)
at com.google.android.gms.http.GoogleHttpClient.execute(:com.google.android.gms:653)
at cyh.a(:com.google.android.gms:233)
at dmx.a(:com.google.android.gms:263)
at dmx.a(:com.google.android.gms:4235)
at dmw.a(:com.google.android.gms:47)
at dmq.a(:com.google.android.gms:55)
at dmp.a(:com.google.android.gms:113)
at com.google.android.gms.auth.account.be.legacy.AuthCronChimeraService.a(:com.google.android.gms:3054)
at mwx.run(:com.google.android.gms:179)

At device:
06-07 20:38:58.718 32412-32412/? E/linker: load_library(linker.cpp:757): library "libcrashlytics-envelope.so" not found
06-07 20:39:01.530 32412-32550/? E/NativeCrypto: ssl=0x5163e7b8 cert_verify_callback x509_store_ctx=0x54cf7ab8 arg=0x0
06-07 20:39:01.531 32412-32550/? E/NativeCrypto: ssl=0x5163e7b8 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_RSA

I tried to debug via logs at HttpClient class in libcocos2d, but i couldn't build it. If you know how to do that you can answer at http://discuss.cocos2d-x.org/t/make-changes-in-libcocos2d-code/37220. Thanks for your attention.

Posts: 1

Participants: 1

Read full topic

[GAME] MetalAttack

$
0
0

@munhra wrote:

Metal Attack is a project that is under development by a dedicated team very committed on creating a game where "metal" is the law.

Enemies will emerge from all sides to prevent your band from achieving success, and it is up to you to choose the musicians, assemble your band, equip and balance your firepower to get through the various stages.

The game features an extensive gallery of characters, each one with a differential firepower and defense, as well as a distinctive musical style. Among the you will find from monsters to aliens… anything goes when it comes to a successful musical career!

Several scenarios are available, and within them, many enemies will try to destroy you. To overcome this challenge, you must also use strategy and know how to equip the items: powerful compounds and drinks that can increase your power or invoke entities to protect you, which are found in a pub in-game.

Destroy the enemies, collect money to hire stronger musicians for your band and buy the drinks available so you can reach the metal star where you can see a different ending to each of the characters.

All this programmed, designed and worked in details to put on your hands a game with great quality and fun ... Thanks and enjoy!

Posts: 1

Participants: 1

Read full topic

No more Google Analytics?

$
0
0

@energyy wrote:

@nite

Hi, I today was trying to create new Google Analytics property (id) for use with SDKBOX - and it seems there is no more selection between Google Analytics and Firebase. Only Firebase analytics left as choise - app need to be created now in Firebase - I think there could be some kind effect on your sdkbox implementation.

Maybe you know about this? Can we continue using SDKBOX Googleanalytics for new apps and how to generate id for it now?

Posts: 1

Participants: 1

Read full topic

SDKBOX AdMob reward video on iOS?!

$
0
0

@uid4o wrote:

I'm stuck. Trying to load reward video on iOS for several hours and nothing works. Please help.
It is working just fine on Android devices. My config:

"AdMob": {
            "test": false,
            "ads": {
                "test_unit": {
                    "type": "interstitial",
                    "id": "ca-app-pub-9006426178832869/5460184831"
                },
                "restore_unit":{
                    "id":"ca-app-pub-9006426178832869/4622580035",
                    "type":"rewarded_video"
                }
            }
        }

Enabling/Disabling Arbitrary Loads did not change a thing...

Errors I get:

libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)

Posts: 1

Participants: 1

Read full topic

Camera getting weird after applying shader

$
0
0

@th7nder wrote:

void PostEffectNode::visit(cocos2d::Renderer *renderer, const cocos2d::Mat4& parentTransform, uint32_t parentFlags) {
if (!postEffectsEnabled || passes.empty() || _children.empty()) {
Node::visit(renderer, parentTransform, parentFlags);
return;
}

// quick return if not visible. children won't be drawn.
if (!_visible)  {
    return;
}

uint32_t flags = processParentFlags(parentTransform, parentFlags);

_director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
_director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, _modelViewTransform);

bool visibleByCamera = isVisitableByVisitingCamera();
if (visibleByCamera) {
    draw(renderer, _modelViewTransform, flags);
    rtSprites.back()->visit(renderer, _modelViewTransform, parentFlags);
}
_director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);

}

void PostEffectNode::draw(cocos2d::Renderer *renderer, const cocos2d::Mat4& transform, uint32_t flags) {
if (!postEffectsEnabled) {
Node::draw(renderer, transform, flags);
return;
}

if (!staticDrawing) {
    redraw(renderer, flags);
} else if (shouldRedraw) {
    redraw(renderer, flags);
    shouldRedraw = false;
}

}

void PostEffectNode::redraw(Renderer *renderer, uint32_t flags) {
if (passes.empty() || _children.empty()) {
return;
}

if (dirty) {
    checkRenderTextures();
    dirty = false;
}

RenderTexture *firstPass = renderTextures.front();
firstPass->begin();
sortAllChildren();
for( int i = 0; i < _children.size(); i++ ) {
    auto node = _children.at(i);
    node->visit(renderer, _modelViewTransform, flags);
}
firstPass->end();

for (size_t i = 1; i < renderTextures.size(); ++i) {
    Sprite *prevResult = rtSprites.at(i-1);

    RenderTexture *rt = renderTextures.at(i);
    rt->begin();
    prevResult->visit(renderer, _modelViewTransform, flags);
    rt->end();
}

}

I cannot move camera after using that node, what's wrong?

Posts: 1

Participants: 1

Read full topic

How to use encrypted atlas in Cocos Creator?

$
0
0

@BugsKiller wrote:

Hi there guys,

Do you know how to use pvr.ccz file with encryption in Cocos Creator? When I input source file into editor it did not ask me any key and all sprites were "empty".

Posts: 1

Participants: 1

Read full topic

Game created on creator, Phlinx2!


SDKBOX 2.3.14 Release - All your saves, on the cloud

$
0
0

@nite wrote:

We added cloud save support for iCloud and Google Play for 2.3.14 release.

Check out our sample for how to use them

2.3.14 Release Notes

Highlights

  • SDKBOX Play supports cloud save function for iCloud and Google Play
  • SDKBOX Play supports reset function for Achievement and Leaderboard
  • SDKBOX Play leaderboard support float point scores
  • InMobi supports rewarded ADs
  • Support customized build path for CocosCreator project

Bugfix

  • Fix a crash issue with SDKBOX issue
  • Fix a crash issue with social share
  • Fix google analytics not tracking app version correctly on iOS issue
  • Add new paramters for Facebook gifting issue
  • Fix InMobi onAdAction callback not been triggered issue
  • Fix crash in IAP issue
  • Fix IAP onCanceled returns empty in a special case issue
  • Fix double value support for SDKBOX Play issue
  • Fix OneSignal setTag crash issue

Posts: 2

Participants: 1

Read full topic

Lower FPS when loading other Scene

$
0
0

@mbgtcx wrote:

Hi.
When loading other scene, in my scene show a loading node rotate forever. But this loading node was lag with lower FPS. Anyone can help me?

Posts: 1

Participants: 1

Read full topic

AudioEngine Freeze in Android and Cocos2d-X 2.2.6

Cocos2d-x JS - Typescript - MVC - Entity Framework

$
0
0

@dalste wrote:

Hi, I have recently written an article and created examples for the creation of a cocos2dx game with Typescript:

It covers the following topics
MVC
Entity Framework
TDD - Mocha - Chai
Automated builds - using webpack and webpack-dev server

The source is located here:


the readme file contains links to the relevant articles.

Part 7 of the tutorial series, which discusses usage of the dijon the Entity Framework will be released very soon, but the complete source for the game is already present within the example CocosTsGameMVC project.

Posts: 2

Participants: 2

Read full topic

this->getBoundingBox() causes error only when I use "this->"

$
0
0

@FailingUser wrote:

In a pawn class that inherits from the cocos2d Sprite class, I used this->getBoundingBox() in it's update function. This caused an "Access violation at reading location" error. Then, I swapped "this" with "GAME::PLAYER", a variable in a namespace that references the player and it worked. Why does this->getBoundingBox() cause an error when GAME::PLAYER->getBoundingBox() works perfectly fine? Aren't they supposed to be the same thing? Just to note, "this->" works with any other function but getBoundingBox. Is it something I'm doing wrong? I'm not THAT good with C++

Posts: 1

Participants: 1

Read full topic

Issue build and run with Visual Studio 2017

$
0
0

@Aleinfo wrote:

Hi to everyone, i'am Ale and i'am new in Cocos2d-x.

After i build my project for win32 with the command:
cocos deploy -p win32 -m release
I receive an error message that says that is impossible to complete the operation.

When i try to run an example project in Visual Studio 2017 i receive an error message that says:
'WinSock32 not found'

What i do wrong?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

What Network Component Does Everyone Use? Socket.io, etc

$
0
0

@ManaInfested wrote:

Cocos2dx 3.15
Android Studio 2.3.3

Hello Everyone, I am trying to add network functions like emits and such for my game app. I cannot seem to find a recent guide or any guide for that matter that is based on Cocos2dx. What does everyone here use? Socket.io, native websocket? Any recommendations for a guide or what to use would be helpful thank you.

Posts: 1

Participants: 1

Read full topic


Unresolved external symbol _main [Windows 10, Cocos 3.15.1, Visual Studio 2015]

$
0
0

@mirth wrote:

I have Cocos 3.15.1 on Windows 10. I created new project with cocos new command. Then i generate Visual Studio 2015 project with cmake -G command. And now i'm trying to build project in visual studio 2015 and getting:
unresolved external symbol _main

How to fix it? Or tell the way i can build my game both on os and win please.

Posts: 1

Participants: 1

Read full topic

Dynamic isometric tilemap

$
0
0

@hossainiir wrote:

Hi , I want to create a dynamic isometric tilemap that support z ordering in cocos creator ,the question is that how can I do that???
Can I use builtin tilemap component ?? If yes how can I use it if no how to solve the problem??
Thanks

Posts: 1

Participants: 1

Read full topic

Why isn't there a method to get cpShape?

$
0
0

@Joseph39 wrote:

don't get me wrong you can get a cp shape using cpSpacePointQueryNearest() or by cpBodyEachShape()

but that's only as long as you don't call theme in Scene or Layer init methods ... they won't work there trust me i checked

i think the reason why they don't work in init methods is because during the init method call cpSpaceStep() hasn't been called

and apparently they only work if cpSpaceStep() gets called at least once. and cpSpaceStep() starts getting called only after the update loop gets called at least once.

so in other words they only work if they are called in the update loop

so if you ever needed a cp shape for some physics body you can only get it in the update method which gets called after every thing is initialized

and if you ever needed it in the init method then you are simply out of luck!!

it's either that or you have to make your own custom class that keeps a copy of cp shape once created

but that seems a whole lot of work just to get a cp shape???

this is very very stupid and i don't know why no one ever thought about this?

there should've been a way to keep a copy of cp shape once created so it can be easily retrieved later

PS: if anyone has a better solution on how to get a cp shaped please share.

Posts: 1

Participants: 1

Read full topic

ScrollView in a PageView

[Open Source] CrossPromo - Promote your own business in your game!

$
0
0

@ryanbournedev wrote:

Hey everyone!

When you download a game onto your phone, one of the worst things to see is some horrendously low-quality advert presented at every possible opportunity. Not only does it make the game seem of a lower quality, but it can drive audiences away from your product to other games! And we don't want that... do we?

Welcoming CrossPromo! The aim of CrossPromo is to remove the need for using third-party advertisements all of the time, replacing the lower-paying bad quality advertisements with high-quality native Cocos2d-x advertisements showing off aspects of your own brand or business.

Want to show off your other games? CrossPromo is made for that.

Want to promote your game's or business' social media accounts? CrossPromo can help with that.

Want to tell your players when there's a special offer on regarding to one of your other games - such as a 50% off sale on the download price? CrossPromo can do that!

Here's a preview, with a very quickly thrown together sample!

The screenshot above shows how the .json file can be used to present on screen a series of non-interactive and interactive objects. No code changes are required, just alter the json file and your changes will be reflected in your promotions!

For integration instructions, check out the GitHub repository here: https://github.com/ryanbourneuk/CrossPromo

I hope you all enjoy CrossPromo and find it useful! It took a great deal of work to make it function as it does, but it was entirely worth it! If anyone has any issues, let me know!

Thanks! :smiley:

Posts: 1

Participants: 1

Read full topic

Viewing all 17118 articles
Browse latest View live


Latest Images

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