RUBE Loader Project

  ... the case you feel the need for a new feature or want to submit one.

RUBE Loader Project

Postby LouisBHirst » Thu Feb 07, 2013 10:48 pm

I put a simple project up on github of my RUBE Loader for AndEngine. It will take a JSON output file from iForce2d's RUBE Editor and load it into AndEngine.

AndEngine Loader:
https://github.com/LouisBHirst/AndEngineJb2dJson

Here's the original Loader:
http://www.iforce2d.net/b2djson/

and Chris's R.U.B.E Box2D editor found here:
https://www.iforce2d.net/rube/

You should check out the RUBE editor and videos - very cool and super easy to get going and experiment with AndEngine & Box2D!

Bart
LouisBHirst
 
Posts: 5
Joined: Wed Jan 16, 2013 10:42 pm

Re: RUBE Loader Project

Postby Matthias » Thu Feb 07, 2013 10:49 pm

Thanks for sharing!!
Matthias
 
Posts: 449
Joined: Thu Jun 14, 2012 2:50 pm
Location: Cologne, Germany

Re: RUBE Loader Project

Postby thepi » Fri Feb 08, 2013 2:49 am

This looks like something really useful, thanks!
You should put the meaning of RUBE into title if you want to attract more viewers.
Go and trap them... Trap Balls on Google Play
Play & reminisce... Treasure Island LCD Retro
thepi
 
Posts: 456
Joined: Sun Oct 09, 2011 9:30 pm

Re: RUBE Loader Project

Postby nazgee » Sat Feb 09, 2013 5:28 pm

For which branch is it? AnchorCenter, or regular GLES2?
Dirt Rider Mayhem is PUBLISHED now!
Image
User avatar
nazgee
 
Posts: 527
Joined: Fri Oct 21, 2011 10:31 pm
Location: Poland, Wrocław

Re: RUBE Loader Project

Postby nazgee » Sun Feb 17, 2013 10:58 pm

For GLES2-AnchorCenter and latest Box2D by hrabia (rope support!) I created this one:
https://github.com/nazgee/AndEngineRubeLoaderExtension

It supports all the stuff that RUBE has to offer besides images handling, since it is very "project specific" due to texture handling being developer-specific. Maybe at some point I'll extend it with some kind of callback-based textures provider. For now- it works fine.
Dirt Rider Mayhem is PUBLISHED now!
Image
User avatar
nazgee
 
Posts: 527
Joined: Fri Oct 21, 2011 10:31 pm
Location: Poland, Wrocław

Re: RUBE Loader Project

Postby gazpachu » Tue Apr 16, 2013 4:27 pm

Hey nazgee,

Thanks for sharing! That's great. Could you also share how to use the library?

I don't mean to be lazy, it's just that the loader file has 2000+ lines of code and I'm a bit overwhelmed. :oops:

Any kind of example is welcome.

Many many thanks, :P

Joan
gazpachu
 
Posts: 5
Joined: Sun Apr 14, 2013 6:56 pm
Location: London, UK

Re: RUBE Loader Project

Postby nazgee » Tue Apr 16, 2013 10:14 pm

I have created a simple example of how to use the loader. Please sync your code since there were some changes in the loader made. Please note, that I expect some more changes in the loader soon- it is still in beta.

1. ### Here is the loader code:
https://github.com/nazgee/AndEngineRubeLoaderExtension
There is only one branch (GLES2-AnchorCenter) so you can't get it wrong


rube file ae-example.rube (which you can load into rube) can be found in the root directory of the project. json file (exported from .rube file by R.U.B.E, loaded by AE) is located in res/raw/ folder. This is where you should export it after editing.

2. ### Here is an example of how to use it:
https://github.com/nazgee/ae-stub/tree/ ... er-example

Note: I have multiple branches in this project! You are interested in one named "rube-loader-example"
git clone git://github.com/nazgee/ae-stub.git
cd ae-stub
git checkout origin/rube-loader-example -b rube-loader-example


3. ### Here is the box2d branch you are supposed to use (it is new Box2D, supports rope joint!)
https://github.com/RealFictionFactory/A ... chorCenter

Note: My Rube loade is compatible only with GLES2-AnchorCenter (and since GLES2 is deprecated, I will not support it)
git clone git://github.com/RealFictionFactory/And ... ension.git
cd AndEnginePhysicsBox2DExtension
git checkout origin/GLES2-AnchorCenter -b GLES2-AnchorCenter


4. ### Last but not least: Use GLES2-AnchorCenter od AndEngine, not GLES2, or even worse, GLES1
git clone git://github.com/nicolasgramilch/AndEngine.git
cd AndEngine
git checkout origin/GLES2-AnchorCenter -b GLES2-AnchorCenter


I will try to explain the code some more later, but above should be enough to get you started.

This is how a Scene can look like:
https://github.com/nazgee/ae-stub/blob/ ... Scene.java

And this is how Activity can look like:
https://github.com/nazgee/ae-stub/blob/ ... ivity.java

Ac you can see- it is extremely easy to load a scene from R.U.B.E. :)
Have Fun!
Attachments
device-2013-04-16-221215.png
device-2013-04-16-221215.png (200.32 KiB) Viewed 5927 times
Dirt Rider Mayhem is PUBLISHED now!
Image
User avatar
nazgee
 
Posts: 527
Joined: Fri Oct 21, 2011 10:31 pm
Location: Poland, Wrocław

Re: RUBE Loader Project

Postby vitors » Wed Apr 17, 2013 1:38 pm

hi nazgee,

Im trying to run your example but i got some error's on imports.
In the RubeScene i got an error in the import:
import org.andengine.extension.rubeloader.SimpleLoader;

And if i look in these package on the extension there is no SimpleLoader, just Loader..
https://github.com/nazgee/AndEngineRubeLoaderExtension/tree/GLES2-AnchorCenter/src/org/andengine/extension/rubeloader

I downloaded all the projects that u told and used them instead of my old ones... im missing something?

Thx
Dog On The Run: Google Play
Remember Repeat: Google Play
vitors
 
Posts: 95
Joined: Mon Mar 18, 2013 2:36 pm

Re: RUBE Loader Project

Postby nazgee » Wed Apr 17, 2013 3:20 pm

Oh crap... It's a new file, indeed. I forgot to do the final push to https://github.com/nazgee/AndEngineRubeLoaderExtension ... sorry for that. I'll do that in the evening (~5-8hrs). Sorry- git fail.
Dirt Rider Mayhem is PUBLISHED now!
Image
User avatar
nazgee
 
Posts: 527
Joined: Fri Oct 21, 2011 10:31 pm
Location: Poland, Wrocław

Re: RUBE Loader Project

Postby vitors » Wed Apr 17, 2013 3:32 pm

hahaha no problem man :)
i'll wait for it..
Thanks for the fast answer ;)
Dog On The Run: Google Play
Remember Repeat: Google Play
vitors
 
Posts: 95
Joined: Mon Mar 18, 2013 2:36 pm

Next

Return to Features

Who is online

Users browsing this forum: No registered users and 5 guests