chukong / programmers-guide-samples Goto Github PK
View Code? Open in Web Editor NEWProgrammers Guide Samples
License: Apache License 2.0
Programmers Guide Samples
License: Apache License 2.0
ProcessInfoPlistFile Library/Developer/Xcode/DerivedData/Programmers_Guide-acdskudnvyrpfjcxnzscpboztgnx/Build/Products/Debug/Chapter\ 7\ Mac.app/Contents/Info.plist Chapter\ 7\ Mac-Info.plist
cd Projects/Examples/cocos2d/programmers-guide-samples/proj.ios_mac
builtin-infoPlistUtility Projects/Examples/cocos2d/programmers-guide-samples/proj.ios_mac/Chapter\ 7\ Mac-Info.plist -genpkginfo Library/Developer/Xcode/DerivedData/Programmers_Guide-acdskudnvyrpfjcxnzscpboztgnx/Build/Products/Debug/Chapter\ 7\ Mac.app/Contents/PkgInfo -expandbuildsettings -platform macosx -o Library/Developer/Xcode/DerivedData/Programmers_Guide-acdskudnvyrpfjcxnzscpboztgnx/Build/Products/Debug/Chapter\ 7\ Mac.app/Contents/Info.plist
error: could not read data from 'Projects/Examples/cocos2d/programmers-guide-samples/proj.ios_mac/Chapter 7 Mac-Info.plist': The file “Chapter 7 Mac-Info.plist” couldn’t be opened because there is no such file.
Everything was fine, but when I ran "cd libs / cocos2d-x" as it is in the instructions, an error occurred: "No such file or directory" and can't run the examples. Can anyone help me?
Just wanted to tell you that I love this game engine, thank you very much.
In Chapter 9, Axe.c3b will not render on screen. (Android VM), I believe it's a problem with the Model file.
I tested a render with the orc.c3b model (successfully rendered on the screen).
This code renders the Orc:
auto sprite = Sprite3D::create("orc.c3b"); //C3B file, created with the FBX-converter
sprite->setPosition(Vec2(origin.x + _visibleSize.width / 2, origin.y + _visibleSize.height / 2).x,
Vec2(origin.x + _visibleSize.width / 2, origin.y + _visibleSize.height / 2).y);
this->addChild(sprite, 1); //adds sprite to scene, z-index: 1
I unsuccessfully tried to attach the axe to the orc using the getAttachNode method (it did not render an attachment on the Orc,)
This code does not render the axe:
auto sp = Sprite3D::create("axe.c3b");
sprite->getAttachNode("Bip001 R Hand")->addChild(sp);
I unsuccessfully tried to render ONLY the axe.c3b as a Sprite3D model (not as an attachment).
This code does not render the axe:
auto sprite = Sprite3D::create("axe.c3b");
sprite->setPosition(Vec2(origin.x + _visibleSize.width / 2, origin.y + _visibleSize.height / 2).x,
Vec2(origin.x + _visibleSize.width / 2, origin.y + _visibleSize.height / 2).y);
this->addChild(sprite, 1); //adds sprite to scene, z-index: 1
in Chapter 6: clicking on "Label" has auto myLabel2 = Label::createWithTTF("LabelTTF", "Marker Felt.ttf", 32); return nullptr probably due to inability to locate the font.
in Chapter 9: auto sprite = Sprite3D::create("boss.c3b"); fails - I can see such file in one of the subfolders, but they are not looked into at run-time
The symlink in libs/cocos2d-x is hardcoded to a folder specific to user jtsm. Perhaps remove the symlink and add to instructions how to create it manually.
(null): error: CFBundleIdentifier 'org.cocos2dx.Chapter 2' contains illegal character ' ' invalid bundle identifier 'org.cocos2dx.Chapter 2'
The better one is "org.cocos2dx.guide.c2"
In Chapter5.cpp there is a call to createScene2() inside a callback method:
I ran this Chapter5.cpp without any problem on Linux (Xubuntu 16.04), but it doesn't work on Android.
Actually, on Android the scene1 showed but when I tap on "Make A New Scene" the app crashes!
I tested it on three devices: HTC one X9 (API 23) , HTC one XL (API 17) and Nexux 5x (API 26). All of them crashed when I tapped on "Make A New Scene" in chapter5.
What is it for?
I run the chapter 5 demo on Linux, and a segmentation fail error is occurred.
And I find the error in AppDelegate.cpp
.
41 auto chapter5 = Chapter5();
42
43 // run
44 director->runWithScene(chapter5.getScene1());
45
46 return true;
chapter5
is a local variable, and will be destroyed after return
.
And you refer it in lambda of Chapter5.cpp
:
51 menuItem1->setCallback([&](cocos2d::Ref *sender) {
52
53 Director::getInstance()->replaceScene(createScene2());
54 });
Env: Xcode8.3.3 , macOS 10.13, cocos2d-x 3.16
this is the step, I did
$ git clone https://github.com/chukong/programmers-guide-samples.git
$ cd programmers-guide-samples/cpp
$ open proj.ios_mac/Programmers\ Guide.xcodeproj/
It seems like much framework find failed, for many of them is RED clolor
will you test this demo using cocos2d-x v3.16 on Xcode8.3.3 ?
As far as I think, simple points that can be included are:
(These are not necessarily cocos2d-x specific points but can be included to make PG as complete guide from start to shipment using cocos2d-x)
Original topic: http://discuss.cocos2d-x.org/t/programmers-guide/30622
http://discuss.cocos2d-x.org/t/how-to-run-programmers-guide-samples/26447
Worth updating the README about platforms that we don't offer pre-built binaries for. Also, can we make the samples run on Linux. I need to investigate this.
I think we should provide android project as well, so people using windows/linux can also try it out.
Samples don't run correct anymore. Resolution issue. Labels, Sprites etc sizing funny.
Each chapter must run independent. Chapter 2 was started and never finished.
hard coded paths in build settings need to be made generic. Update README with how this project is structured on the file system
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.