I am using the code from SFML rube loader, it seems not not actually get any data from the rube json file resulting in a world with 0 in each field. I really have no idea how to fix this, I am on Qt GCC compiler and box2D was also compiled with that. I just copied all the header and source from json loader folder inside sfml folder and compiled like that.
Please help.
Rube loader
Re: Rube loader
The loader has an errorMsg parameter which you can check for some info, which may give you a lead. Any decent IDE will let you step through the code as it executes so you can see what happens.
Re: Rube loader
The error message is blank and I tried to step through but its damn confusing stepping through the giant json loader header ;(
Re: Rube loader
If you mean all the preprocessor macros, yeah they are confusing. But you shouldn't need to step all the way in there to get an idea of what the problem is. Did you come across any clues? The only clues I have are the clues you have 
If you don't mind sharing the .json file, you could attach it here just in case there is something weird about it. You are trying to load the 'raw info' exported file right, not the .rube file?

If you don't mind sharing the .json file, you could attach it here just in case there is something weird about it. You are trying to load the 'raw info' exported file right, not the .rube file?
Re: Rube loader
I am deciding whether I should buy the full version, I am using the images.json file from the trial folder. What seems to happen is it loads some stuff in the json loader but as soon as it gets to b2World* b2dJson::j2b2World(Json::Value worldValue) the worldValue contains map[0] (1 element only) = metaworld and the allocated parameter is -1 or 0.
Last edited by Rogerboy on Fri Aug 30, 2013 6:52 pm, edited 1 time in total.
Re: Rube loader
Debug info from Qt:
- Attachments
-
- Debug info
- QTInfo.jpg (154.71 KiB) Viewed 21042 times
Re: Rube loader
The presence of a 'metaworld' element suggests you are trying to load a .rube file, rather than the 'raw info' export that b2dJson expects. The formats are both JSON and quite similar, but with some differences (see the help topic under "Using exported data" -> "Difference between saving and exporting" for details).
Edit: and I just noticed, the name of the file is image.rube
Edit: and I just noticed, the name of the file is image.rube

Re: Rube loader
Ok thanks it works now, was a bit confusing about the .json and .rube files.