Git Product home page Git Product logo

ccbox2d's People

Contributors

axcho avatar bgulanowski avatar chrisintx avatar greglington avatar johndpope 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

Watchers

 avatar  avatar  avatar  avatar

ccbox2d's Issues

Template Destroys Files

I just installed CCBox2d and followed the directions to install the XCode4 template. Then I attempted to create a new project with the template via XCode ( v4.6 ) and it deleted everything in my target folder.

Steps:

  1. Install template in ~/Library/Apple/Developer/XCode/Templates/cocos2d
  2. Go to XCode, select File->New->New Project.
  3. Selected "cocos2d_ccbox2d" click next
  4. The panel comes up with the title "Choose options for your project:" There is nothing in the area under it. See image.
    Screenshot_2_25_13_3_02_PM
    But you can click next.
  5. Click Next and a Standard Navigation Panel comes up. There is no place to enter a name.
  6. If you click OK, XCode ginds for a while and then quits/crashes.

If you then go to the directory you picked, you will find only an XCode project called "Development.something". I can't remember exactly and I don't want to reproduce it.

But everything that was in that directory is gone.

Files folders everything. For me that was my Development folder. Thank God for offsite source control and backing up, though I did lose a mornings work.

System Info: iMac(iMac12,2), OS X 10.8.2 (12C60), 3.4 GHz Intel Core i7, 16 GB RAM

Port to cocos2d 2.x and usage question

This project has a lot of potential and I am excited to use it. However, there are two major issues.

  1. Not built for cocos2d 2.x. I have a fork where I've begun the changes and for the most part it's not too difficult to port, however, the debug drawing is broken and I'm still an Open GL novice so fixing that will take more time.
  2. The API is somewhat inscrutable. Just creating a simple CCBodySprite and adding it to a layer has proven to be a frustrating process. For example this seemingly simple code does not work:
CCBodySprite *sprite = [CCBodySprite spriteWithFile:@"foo.png"];
sprite.worldLayer = self;
[sprite addShape:[CCShape circleWithCenter:ccp(240, 160) radius:16]];
[self addChild:sprite];

Because the body is never created. So, I tried this:

CCBodySprite *sprite = [CCBodySprite spriteWithFile:@"foo.png"];
    b2BodyDef bodyDef;
    bodyDef.type = b2_dynamicBody;
    bodyDef.allowSleep = true;
    bodyDef.awake = true;
    bodyDef.userData = sprite;
    sprite.worldLayer = self;
    // have to include the CCBox2dPrivate.h header to access world property
    // which is really confusing because AFAICT this is the only way to get
    // it to create a body
    [sprite configureSpriteForWorld:self.world bodyDef:bodyDef];
    [sprite addShape:[CCShape circleWithCenter:ccp(240, 160) radius:16]];
    sprite.position = ccp(p.x, p.y);
    [self addChild:sprite];

Which kind of works, but the position if the sprite is always 0, 0 no matter what the postion property is set to. Am I missing something obvious? Can you provide a simple example of how to create a CCBodySprite that works as expected?

Any help would be appreciated. Like I said, this project seems like it will be awesome once some of it is demystified. Thanks so much for open sourcing it!

Current Repository Won't Build

If you do a download of the current repository it won't build because the file "CCBox2D-Prefix.pch" is missing.

Also CCWorldLayer.h line 67 has a typo.

-(UInt16) collisionTypeBits:(NSSArray*)collisionTypes;

NSSArray has too many Ses.

I'm trying to do a build and test for the Mac, like axcho asked, but haven't gotten past this yet.

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.