cocos2d / cocos2d-x-samples Goto Github PK
View Code? Open in Web Editor NEWContains different cocos2d-x samples
License: MIT License
Contains different cocos2d-x samples
License: MIT License
I tried to import EyeCandyLayer sample for android with Cocos2d-x V 3.1 and got only the above issue. When I even comment the Particles out all the above issue will be gone. The full trace is shown below
jni/../../Classes/EyeCandyLayer.cpp:146:24: error: aggregate 'b2ParticleGroupDef pd' has incomplete type and cannot be defined
b2ParticleGroupDef pd;
^
jni/../../Classes/EyeCandyLayer.cpp: In member function 'void EyeCandyLayer::initPhysics()':
jni/../../Classes/EyeCandyLayer.cpp:146:24: error: aggregate 'b2ParticleGroupDef pd' has incomplete type and cannot be defined
b2ParticleGroupDef pd;
^
make: * [obj/local/x86/objs/cocos2dcpp_shared//**/Classes/EyeCandyLayer.o] Error 1
make: * Waiting for unfinished jobs....
make: * [obj/local/armeabi/objs/cocos2dcpp_shared///Classes/EyeCandyLayer.o] Error 1
make: Leaving directory `/home/paulos/workspace/GameTest/proj.android'
Traceback (most recent call last):
The Selected NDK toolchain version was 4.8 !
File "/home/paulos/workspace/GameTest/proj.android/build_native.py", line 166, in
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "/home/paulos/workspace/GameTest/proj.android/build_native.py", line 153, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "/home/paulos/workspace/GameTest/proj.android/build_native.py", line 89, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /home/paulos/workspace/GameTest/proj.android ] fails!
Thanks
Hello,
I am trying to run LiquidFun-TestBed in eclipse with cocos2d-x 3.2. On importing the project in my workspace, the project gives error in AppActivity.java file that "Cocos2dxActivity cannot be resolved to a type". Can somebody help me with this issue.
It seems that LiquidFun-EyeCandy is missing the Box2D folder. Could I just find it from somewhere else and drop it in? Maybe I should get it from the LiquidFun repository?
Support of python2 ended in 2020. It still exists and can be used to run python2 scripts, but in the end, things can get worse. It's better to adapt it to the python3 version. After all, it's a tiny script, it can't be so hard.
I think it related with the override functions about MouseDown
ใMouseMove
and MouseUp
.
Following the instructions through:
git clone https://github.com/cocos2d/cocos2d-x-samples.git
cd cocos2d-x-samples
python download-engine.py
cd cocos2d-x-samples/samples/LiquidFun-Testbed/proj.ios_mac
open LiquidFun-Testbed.xcodeproj/
Now I attempt to build and it seems the Liquidfun folder is missing -
Showing Recent Issues
No such file or directory: 'cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp'
Checking in the shell reveals the liquidfun folder is empty:
#ls cocos2d-x-samples/libs/liquidfun/liquidfun
.
..
To try and remedy this I downloaded LiquidFun separately, and placed it in the requested folder. This enabled compilation to complete, but when I run the macOS version I am presented with a black/blank window. Interacting with the window (keys / mouse presses) produces logs as expected.
@ricardoquesada
Heard from minggo, that you have a solution for this.
Could you please take a look at it?
Due to some changes in Xcode6 beta4, the Swift example does not work out of the box.
A line like
var a = CGFloat(aFixedValue)
results in an error saying CGFloat is not convertible to UInt8. It can be fixed with an extra cast
var a = CGFloat(Uint(aFixedValue))
but I doubt this is the right solution in the long run
I want to run a small game in part of my screen of my existing Android and iOS application. Is it possible to integrate the cocos2d-x in my existing project? Thanks.
Should these examples work out of the box?
I've been following the steps from https://github.com/cocos2d/cocos2d-x-samples exactly, namely
Download
$ git clone https://github.com/cocos2d/cocos2d-x-samples.git
$ cd cocos2d-x-samples
$ python download-engine.pyRunning
Once the samples were downloaded just go any sample, and open the project. eg:
$ cd cocos2d-x-samples/samples/LiquidFun-Testbed/proj.ios_mac
$ open LiquidFun-Testbed.xcodeproj/
However, when I build the LiquidFun-Testbed.xcodeproj
, I get
Showing All Errors Only
Prepare build
note: Using legacy build system
Build target libcocos2d iOS of project cocos2d_libs with configuration Debug
Build target LiquidFun-Testbed iOS of project LiquidFun-Testbed with configuration Debug
clang: error: no such file or directory: '/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp'
clang: error: no input files
clang: error: no such file or directory: '/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/Collision/b2Distance.cpp'
clang: error: no input files
clang: error: no such file or directory: '/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/Common/b2StackAllocator.cpp'
clang: error: no input files
Build failed 06.01.20, 22:25 698.2 seconds
Clearly, the compiler is looking for files in
/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/
but these were never created.
After following the mentioned steps above, Box2D and its code are instead placed in
/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/cocos2d-x/external/Box2D
...So why is it looking for these files in
/Users/Chris/Desktop/source/repos/3rd party libraries/cocos2d-x-samples/libs/liquidfun/liquidfun/liquidfun/Box2D/Box2D/
??
"_CTFramesetterCreateWithAttributedString", referenced from:
"_CTFramesetterSuggestFrameSizeWithConstraints", referenced from:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
./download-engine.py can't download engine because the link to the engine in lib/config.json is outdated.
According to the links on the official site, it might be
https://digitalocean.cocos2d-x.org/Cocos2D-X/
Hi ricardo, thanks for the great sample!
I've some questions as I need to render textures on top of each particle group to make jelly simulations (e.g. the one in Loco Roco PSP game). I've been googling but can't find much help maybe due to the wrong keyword... Do you have any idea?
I've seen people doing that on Torque2D: https://www.dropbox.com/s/jscm9pks87c4ohl/Squishy.mov
So I think it must be possible on cocos2d as well, just the technique of doing it without shaders...
Thanks!
Ref: http://www.garagegames.com/community/forums/viewthread/133753/2#comments
Max@maximilians-mbp ~/D/C/C/cocos2d-x-samples> python download-engine.py
=======================================================
==> Prepare to download cocos2d-x engine!
==> Ready to download 'cocos2d-x-3.8.zip' from 'http://cocostudio.download.appget.cn/Cocos2D-X/cocos2d-x-3.8.zip'
==> Error: Could not find the file from url: 'http://cocostudio.download.appget.cn/Cocos2D-X/cocos2d-x-3.8.zip'
==> Http request failed, error code: 404, reason: <html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>nginx/1.10.1</center>
</body>
</html>
Hi! so this occurs when:
cocos run -p linux
On Ubuntu 14.10 64bits, is it just me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.