List of loaders for RUBE scenes

General discussion about the R.U.B.E editor
dmagunov
Posts: 16
Joined: Tue Dec 10, 2013 3:40 pm
Contact:

Re: List of loaders for RUBE scenes

Post by dmagunov »

iforce2d wrote: Wow, you are really cranking out the code! It looks like gravity scale is not being implemented in any of the loaders you have - in the 'joint types' example the 'B' body in the top right should have gravity scale of zero, so that it settles in a position above the ground. You can check the expected behavior in the RUBE player view.

What are your impressions on comparing these Javascript implementations? I like that box2d-html5 is hand-ported and the most up-to-date, with all joint types implemented. Speed-wise, I don't see a whole lot of difference between them. For some reason, the domino tower example behaves a bit strange in most Javascript implementations (box2d-html5 especially). I commented about this here a while ago if you're interested:
https://code.google.com/p/box2d-html5/i ... etail?id=1
Thanks Chris!

I've found a bug with gravityScale. Already fixed all demos and source code (except box2dweb that doesn't support it). Please check it, because seems to me, second 'B' from the top right corner doesn't work correctly.

About my impressions. I like box2d-html5 and jsbox2d because they both hand-ported and has all joints supported. But it seems to me that their performance is lower then emscripten-box2djs and box2dweb ports. I will test performance deeply in the next post.

About domino tower. All ports interpolate it differently. And no one as C++ box2d. What is the reason and who is the most correct I don't know yet. And what result You get on domino test on other box2d implementations (java, C#, python)?
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: List of loaders for RUBE scenes

Post by iforce2d »

The motor joint 'B' looks good in box2d-html5 and jsbox2d now. The friction joint 'B' seems a little stiff, but in general the movement is correct. From memory, it should allow the small box to fall off to the right, as it does for box2dweb.

I haven't tried any Box2D with python. It's been a while since I tried the Java testbed, but I don't recall seeing any strange behavior with the domino tower in Java.
kazeno
Posts: 8
Joined: Sat Feb 21, 2015 1:46 am

Re: List of loaders for RUBE scenes

Post by kazeno »

I can't build the rube-cocos2d-x-V3.4-sample.
It's trying to include "BaseTest.h" but this file did not come with the sample code.

Edit
Oh, I see I'm supposed to one in the the cpp-tests.
I thought it could go in the empty example.
But I really need to do this just to test?
It so much stuff to compile along with it.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: List of loaders for RUBE scenes

Post by iforce2d »

Thanks for pointing that out. I guess I must have had that file accessible somewhere when I was building, because now that I try the download I get the same error as you.

That "BaseTest.h" and everything related to it is not necessary, you can delete all lines that cause errors. If it helps, I've updated the download zip.
kazeno
Posts: 8
Joined: Sat Feb 21, 2015 1:46 am

Re: List of loaders for RUBE scenes

Post by kazeno »

I can build but I'm still having some issues.

I'm learning cocos2d-x and I'm not sure of how the file management works.
All the code that load files point to the root of the src directory instead of relative to the res directory.
For example "fonts/UbuntuMono-R.ttf" instead of "../res/fonts/UbuntuMono-R.ttf".

PlanetCuteRUBELayer.cpp include SimpleAudioEngine.h and I can build if I add a dependence directly to the cocos/audio/include but shouldn't it be already dealt when I included the api through cocos.h?
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: List of loaders for RUBE scenes

Post by iforce2d »

That depends on what platform you are targeting. For example on iOS and Android, all the resource files will be placed inside the app bundle during the build process, and they will be opened from there (and using relative paths like ".." is not possible).

So your build process should have a step that places resource files where they need to be. The "res" folder is only there to store them as part of your source files, it's not a final part of the distributed application.

About including SimpleAudioEngine, I'm not having that problem when I build. In some previous versions of cocos2d-x I recall that you had to manually import modules for audio and Box2D etc, but that did not seem to be the case for me this time with v3.4. Either way it's not really that relevant to the RUBE loader, you could probably get better answers about it in the cocos2d-x forums.
kazeno
Posts: 8
Joined: Sat Feb 21, 2015 1:46 am

Re: List of loaders for RUBE scenes

Post by kazeno »

I figured out and solved these issues.

However I'm kind of sure the next one is not my fault.
I get an exception error when I go to the PlanetCute scene.
Seems like it's trying to delete m_contactListener but m_contactListener is not initialized.
When I remove the clear() call in the BasicRUBELayer::loadWorld it works.
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: List of loaders for RUBE scenes

Post by iforce2d »

hmm... not sure how I can help with that. I tried going back and forward a dozen times between that scene, the menu and the other scenes and don't see any issues on Android.

ah... now that I look at the code though, I see the problem. I've updated the zip... again :) Thanks for pointing this out. I wonder why it did not cause any problems for me...
fisher
Posts: 6
Joined: Sat Feb 15, 2014 9:31 pm

Re: List of loaders for RUBE scenes

Post by fisher »

Hi, I'm not sure if this is right place to put that, but if someone needs RUBE json converter to Objective-C class with Box2D object defined in code, here it is:

https://github.com/pzagawa/RUBE2Class

This is command line utility with sources. Just give rube json object, run converter and you have your Box2D object created in code as Objective-C class.

Keep in mind, that if json format has changed since last year, there could be some bugs.
chrisVPlay
Posts: 2
Joined: Tue Oct 13, 2015 12:43 pm
Location: Vienna, Austria
Contact:

Re: List of loaders for RUBE scenes

Post by chrisVPlay »

Hi,
we have just added support for RUBE to V-Play [http://v-play.net], a cross-platform game engine specialized for 2D games.

You can find a tutorial how to make a side scroller game like Badland with V-Play and RUBE here:
http://v-play.net/doc/how-to-make-a-sid ... -tutorial/

Here is a list of the new RUBE components in the documentation:
http://v-play.net/doc/vplay-group/#rube-components

And here is the announcement about RUBE support with V-Play 2.6:
http://v-play.net/2015/10/v-play-2-6-re ... cker-rube/

Cheers,
Chris from V-Play
Co-Founder V-Play Game Engine
http://v-play.net
Post Reply