rube with iStencyl
-
- Posts: 1
- Joined: Thu Jun 20, 2013 6:52 pm
rube with iStencyl
I would like to create a game in stencyl but load a physical scene from a .rube file. What would really be ideal is to load a rube scene into the stencyl workplace so that i can make bodies and joints in rube but create the rest of the game in stencyl. I wouldn't bother using stencyl but I find xcode to be extremely hard to use avoiding errors. I know I could try to add a rube file into the xcode project generated by stencyl. What I want to know is how to most effectively use rube with stencyl
Re: rube with iStencyl
I don't know anything about Stencyl other than what I have googled in the last 15 minutes, so take this with a grain of salt...
The typical approach for getting a rube scene loaded is to open the .json file, parse the JSON, and use that info to create the Box2D world however the language/framework would normally create physics objects. So if you would normally create physics things by using functions like CreateBody, CreateJoint etc, then you just need a way to load and parse the .json, and you can write a loader for your framework.
On the other hand, if your framework only lets you create physics by a more limited method like dragging and dropping preset bodies, and editing properties in a graphical UI, you may be out of luck. You would also need a way to get named items in the scene to work with later, if you want to be able to control anything. As far as I can tell Stencyl's interface has complete control over physics objects, and ten minutes of googling for things like "stencyl open file" turned up nothing, so my prognosis is not good at this point...
I think your best course of action is to ask on Stencyl forums, whether a JSON file can be opened and parsed, and whether you can create individual Box2D elements (eg. a single fixture) programmatically instead of using the interface.
The typical approach for getting a rube scene loaded is to open the .json file, parse the JSON, and use that info to create the Box2D world however the language/framework would normally create physics objects. So if you would normally create physics things by using functions like CreateBody, CreateJoint etc, then you just need a way to load and parse the .json, and you can write a loader for your framework.
On the other hand, if your framework only lets you create physics by a more limited method like dragging and dropping preset bodies, and editing properties in a graphical UI, you may be out of luck. You would also need a way to get named items in the scene to work with later, if you want to be able to control anything. As far as I can tell Stencyl's interface has complete control over physics objects, and ten minutes of googling for things like "stencyl open file" turned up nothing, so my prognosis is not good at this point...
I think your best course of action is to ask on Stencyl forums, whether a JSON file can be opened and parsed, and whether you can create individual Box2D elements (eg. a single fixture) programmatically instead of using the interface.