Search found 42 matches
- Thu Jul 11, 2013 6:34 am
- Forum: R.U.B.E discussion
- Topic: Directory structure question
- Replies: 1
- Views: 5310
Directory structure question
I've been working with RUBE for a few weeks now and loving it. But so far my exported .json, and all my images where in the same directory. Now I need to put some new images in a different directory, but something doesn't seem to work. I believe I'm setting the image to the body correctly in the edi...
- Tue Jul 02, 2013 1:59 pm
- Forum: R.U.B.E discussion
- Topic: Loading saved world slow?
- Replies: 1
- Views: 5510
Loading saved world slow?
I'm using the Cocos2d sample loader for saving a world, and reloading it. The code is straightforward: -(void) loadSavedFile: (id) sender { NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; NSString *fileName = [NSString stringWithFormat:@"...
- Mon Jul 01, 2013 3:37 pm
- Forum: R.U.B.E discussion
- Topic: Scaling & flipping bodies
- Replies: 2
- Views: 6915
Re: Scaling & flipping bodies
The scaling was relatively painless... double scaleBy = 1.1; if(scale) { if(scaleDown) { scaleBy = 0.9; } [touchedImgInfo->sprite setScale:[touchedImgInfo->sprite scaleX]*scaleBy]; b2Fixture *f = touchedImgInfo->body->GetFixtureList(); while(f != NULL) { if(f->GetType() == b2Shape::e_polygon) { b2Po...
- Wed Jun 26, 2013 1:46 pm
- Forum: R.U.B.E discussion
- Topic: Scaling & flipping bodies
- Replies: 2
- Views: 6915
Scaling & flipping bodies
Is there a way to scale bodies through the rube loader machinations? I know how to scale a sprite, and I've seen the tutorial on how to destroy the shape and recreate it. But at first glance it seems a lot harder to scale a shape with multiple vertices, and all my rube objects have them. So is there...
- Wed Jun 19, 2013 10:43 am
- Forum: R.U.B.E discussion
- Topic: Scale units in RUBE
- Replies: 8
- Views: 14466
Re: Scale units in RUBE
The issue was scaling. Once I scaled down my background image it started responding. Thanks.
- Wed Jun 19, 2013 7:22 am
- Forum: R.U.B.E discussion
- Topic: Scale units in RUBE
- Replies: 8
- Views: 14466
Re: Scale units in RUBE
Yes, I am using the sample loader -- the saving and reloading part of it is working and doing good for me. So I'm subclassing from RubeLayer. And I did try to comment out the anchor point. Seems like it has no effect.
- Wed Jun 19, 2013 6:49 am
- Forum: R.U.B.E discussion
- Topic: Scale units in RUBE
- Replies: 8
- Views: 14466
Re: Scale units in RUBE
Well, nothing I do works. All I'm trying now is just to place my background image, which size is screenSize.width*2, screenSize.height*2, so that the bottom of if aligns with the bottom of the screen, and the middle of the width is in the middle of the screen width. When working with a regular scene...
- Tue Jun 18, 2013 10:09 am
- Forum: R.U.B.E discussion
- Topic: Scale units in RUBE
- Replies: 8
- Views: 14466
Re: Scale units in RUBE
What is the best way to put a background image in a rube scene? I'm seeing that I can only attach it to a body, otherwise it's not showing on the screen? Would you just attach the bg image to a body, and put the body out of the screen? Or is there a better way?
- Mon Jun 17, 2013 9:17 pm
- Forum: R.U.B.E discussion
- Topic: Scale units in RUBE
- Replies: 8
- Views: 14466
Re: Scale units in RUBE
Basically I'd like to "hide" several objects outside of the screen, and allow the user to scroll there, and find them. Most likely I'll have them pay to unlock these items. I'd love to have the scrolling done by touch, and not buttons. I know the cocos2d sample project has scrolling with b...
- Mon Jun 17, 2013 2:34 pm
- Forum: R.U.B.E discussion
- Topic: Scale units in RUBE
- Replies: 8
- Views: 14466
Scale units in RUBE
I'm not sure I understand the scale units, a.k.a. PTM_RATIO in RUBE. iforce, could you please clarify it? The specific reason I'm asking is that I implemented a scrolling mechanism based on the movement of one body, and took into account the PTM_RATIO basically at every step. But now, when moving in...