Giter Site home page Giter Site logo

programmers-guide-samples's People

Contributors

darkdukey avatar ricardoquesada avatar slackmoehrle avatar stammen avatar super626 avatar wenhailin avatar zilongshanren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

programmers-guide-samples's Issues

The file “Chapter 7 Mac-Info.plist” couldn’t be opened because there is no such file.

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.

Error when compile

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?

Chapter 9 - axe.c3b will not render as Sprite3d nor AttachNode. (android vm)

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

Some chapters fail to load resources

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

method createScene2() does not work on Android

In Chapter5.cpp there is a call to createScene2() inside a callback method:

Director::getInstance()->replaceScene(createScene2());

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?

Segmentation fail in chapter5 demo

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     });

Build Failed on Xcode8.3.3 , macOS 10.13, cocos2d-x 3.16

Env: Xcode8.3.3 , macOS 10.13, cocos2d-x 3.16

this is the step, I did

  1. use cocos command make out IOS library
  2. copy libs
  3. fllow this
$ git clone https://github.com/chukong/programmers-guide-samples.git
$ cd programmers-guide-samples/cpp
$ open proj.ios_mac/Programmers\ Guide.xcodeproj/
  1. run on Xcode, failed

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 ?

To add to PG from our users

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)

  1. Where all to change the min/max-sdk version so that it's compatible with different android versions while we're building finally.
  2. How to remove those libraries which are not being used so that the final apk can be of as low size as possible.
  3. Changing package name. It's easy but can be included if you want.
  4. How to set proguard settings
  5. I'll be shipping my first game after a month or so, so I am not sure what exactly people face or aren't aware of while shipping the game.

Original topic: http://discuss.cocos2d-x.org/t/programmers-guide/30622

No Android Project

I think we should provide android project as well, so people using windows/linux can also try it out.

Programmers Guide fixes

  1. Samples don't run correct anymore. Resolution issue. Labels, Sprites etc sizing funny.

  2. Each chapter must run independent. Chapter 2 was started and never finished.

  3. hard coded paths in build settings need to be made generic. Update README with how this project is structured on the file system

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.