Loading models from .json file

Talk about graphics, 3D models, nice sprite sheets, music, sound effects and anything related to the presentation of your game (not code :)).

Loading models from .json file

Postby mayank_bisht » Mon Jan 09, 2017 6:31 am

Hi,

I am beginner in game development. I have box2d car model in .json file. I am not able to load that model from that .json file in libgdx game.
Any help or direction would be appreciated.
mayank_bisht
 
Posts: 1
Joined: Mon Jan 09, 2017 6:26 am

Re: Loading models from .json file

Postby Ankit Gupta » Tue May 09, 2017 5:22 am

You can load the json file using AssetManager class which can load the file either from assets or external storage. To load from the assets, use default constructor. And to load from the External storage you can use new AssetManager(new ExternalFileBrowser) constructor which will return you external storage path. then you can locate your desired path of the json file. Hope that helps.
Ankit Gupta
 
Posts: 4
Joined: Tue May 09, 2017 5:18 am
Location: Gururgram, India

Re: Loading models from .json file

Postby Geget » Sun Jul 08, 2018 9:07 am

I did it also with an Assets manager.
You can check my example - https://www.topspeed.com/car-games/truck-games/ke3562.html . It's quite a simple game, my first project, but many people enjoyed it. I had the same problem, with truck-models loading, but it works okay at the moment. :?
Geget
 
Posts: 1
Joined: Sun Jul 08, 2018 9:04 am

Re: Loading models from .json file

Postby wesley » Thu Sep 13, 2018 8:00 am

This is great!
It's nobody's trouble but mine. I just want to visit this site, that's all. This is what I need. Do you like it?
wesley
 
Posts: 1
Joined: Thu Sep 13, 2018 7:59 am


Return to Game Art

Who is online

Users browsing this forum: No registered users and 1 guest