Page 1 of 2
libgdx / RUBE thread
Posted: Wed Feb 06, 2013 6:35 pm
by tescott
FYI--
There's a thread over on the Badlogic forums (libgdx) regarding RUBE. Thought others on this site might be interested.
http://www.badlogicgames.com/forum/view ... =15&t=7522
Depending on how things go, I hope to have a basic RUBE JSON loader for libgdx running this coming weekend.
--tim
Re: libgdx / RUBE thread
Posted: Thu Feb 07, 2013 4:57 am
by iforce2d
Yeah I see that. Looks like you guys are getting things rolling! I am about to start traveling for a couple of weeks so I might not be online as often as usual, but if there is anything you need to know just ask and I will try to answer asap.
Re: libgdx / RUBE thread
Posted: Sat Feb 09, 2013 10:10 pm
by tescott
First pass of libgdx JSON loader is up and running. It uses the libgdx Json class rather than org.json. Kudos to HeRMeS who laid the groundwork. I've been testing it today and have updated a few things in my fork.
HeRMeS github project:
https://github.com/cvayer/RubeLoader
my fork of that project:
https://github.com/tescott/RubeLoader
--tim
Re: libgdx / RUBE thread
Posted: Sun Mar 03, 2013 3:56 pm
by tescott
I've updated my fork. Now includes image support, an updated readme, and a new example demoing the loader capabilities.
https://github.com/tescott/RubeLoader
--tim
Re: libgdx / RUBE thread
Posted: Fri Mar 22, 2013 6:34 pm
by lacipalfi
@ tescott can you please make a tutorial on using your Rube loader for libgdx ? It would help a lot, Thanks!
Re: libgdx / RUBE thread
Posted: Fri Mar 22, 2013 10:05 pm
by tescott
lacipalfi wrote:@ tescott can you please make a tutorial on using your Rube loader for libgdx ? It would help a lot, Thanks!
I'll try to get something done for tomorrow. Keep an eye out!
--tim
Re: libgdx / RUBE thread
Posted: Sat Mar 23, 2013 4:54 pm
by tescott
Hope this helps. If you still have questions after viewing, please follow-up and I'll answer as best as I can.
http://youtu.be/hgo7Pxtcoyk
--tim
Re: libgdx / RUBE thread
Posted: Tue May 07, 2013 3:37 pm
by souldown
Hey love the loader Tim!
The video is also very helpful, although the first part was mainly about the rube editor itself.
Also noticed the project game me errors if i didnt have the controllers project in eclipse too (just for others to note really)
Anyway! i have a quesiton, I wonderd if you could give a quick example on how to use the loader to access specific things in the scene.
For example if you wanted to edit a specific bodys attributes in some way, whats the best way to latch onto the object?
Really appreciated!
Stew
Re: libgdx / RUBE thread
Posted: Wed May 08, 2013 12:48 am
by tescott
There are a few ways to access objects:
- * scene.getWorld(): This method returns the Box2D physics world. After loading, it is populated with the bodies, joints, and fixtures from the JSON file.
* scene.getBodies(): This method returns an array of bodies created
* scene.getFixtures(): This method returns an array of fixtures created
* scene.getJoints(): This method returns an array of joints created
* scene.getImages(): This method returns an array of RubeImages defined in the JSON file. Note: it is up to the app to perform all rendering
* scene.getMappedImage(): This method returns an array of all RubeImages associated with a particular Body.
* scene.getCustom(): This method allows you to retrieve custom property info from an object.
* scene.getNamed(): This method allows you to retrieve a scene object based on name. Since multiple objects can have the same name, this returns an Array<> type.
I
just added the getNamed() method to the repo.
Hope this helps!
--tim
Re: libgdx / RUBE thread
Posted: Wed May 08, 2013 12:28 pm
by souldown
Tim, you are a Legend!
I tried tom implement it myself but i dont know my arse from my elbow with this stuff so i gave up after 2 hours! Thank you so much!
