Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / json parser?

Author
Message
Wilf
Valued Member
18
Years of Service
User Offline
Joined: 1st Jun 2006
Location: Gone to Unity.
Posted: 4th May 2013 15:09
json (JavaScript Object Notation) is a data format that is quickly replacing XML for a lot of things (weapon data, save games, network data) because its much lighter and human-readable.

I'm attempting to port a C# json parser to AppGameKit - this page is my starting point: http://techblog.procurios.nl/k/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html

Eventually I'd love to load Spine data straight into AGK.

Is anyone already working on something similar? This kind of thing is beyond my simple brain to be honest, so any help would be great.
Timshark
17
Years of Service
User Offline
Joined: 30th Jun 2007
Location: Oslo, Norway
Posted: 4th May 2013 16:21 Edited at: 4th May 2013 18:48
I cannot help you with the code - the only thing I can do is to honor your task and back you 100% on this one. I own both spriter and Spine and I would love to see a direct access to spine in agk. Personally I prefer Spine for it's neat interface. Spriter is just too buggy at the moment (but have more features - like IK locking)

What I can do is help you test it out as you make progress. I already have a couple of models and animations in Spine.

Go, Wilf, Go!

I never want what I know.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 4th May 2013 17:21
I believe there is a plan to have some native commands for Spine/Spriter or both at some point. I am very keen to use at least one of these tools and started an importer for the latest version of Spriter. I find the export counter-intuitive though and was considering making some import functions in Tier 1 for Spine instead. Needless to say I'd make it open source if I get the time.

If enough people want it as much as I do I'll started on it soon but for now I'm using my own tool (SpriteFX in the AppGameKit Showcase forum). The problem is I'm a little too busy to finish SpriteFX at the moment.


this.mess = abs(sin(times#))
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 4th May 2013 18:40 Edited at: 4th May 2013 18:44
long ago i begin my own json module in visual basic but i have the source not here.

i begin with this website, there are source code below the side.
http://json.org/
yamyam
11
Years of Service
User Offline
Joined: 12th Jan 2013
Location: Black Country
Posted: 26th May 2013 12:05
Just started using R.U.B.E Box2d software for pysics worlds great program and good tutorials. My question is can AppGameKit tier1 import these Json files. Any help would be appreciated.
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 26th May 2013 19:55 Edited at: 26th May 2013 19:55
Unfortunately, AppGameKit language is still too primitive to code a proper json parser. It lacks union, nested types, or even something like this:



That last one would definitely be enough to make a working json parser. I believe there are workarounds, but you will have to limit the amout of data you can store to a fixed number.

Follow me on twitter! @MotionStruct
Motion Struct blog
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 26th May 2013 21:03
However, if you use Tier 2 (C++) there are probably libraries and/or classes that will do the trick.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
tornado
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 26th May 2013 21:35
I would love to have this for Tier 2, so I'm 100% in

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 26th May 2013 23:59
@yamyam
this json files are very useless if you don't know how to process it.
i don't know any R.U.B.E load/interface for AGK.
i missing a load/save command for box2d physics.
yamyam
11
Years of Service
User Offline
Joined: 12th Jan 2013
Location: Black Country
Posted: 27th May 2013 10:35
Thanks for the replies all, i asked the question at the R.U.B.E forums

https://www.iforce2d.net/forums/viewtopic.php?f=6&t=134&sid=bcac8ca4d924e5c725d5f69bd257c5a8[/href]

They think it may not be possible either, shame really. Two great software products like AppGameKit and R.U.B.E combined could have made a big difference to the world of game programming.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Aug 2013 12:53 Edited at: 12th Aug 2013 12:59
I haven't checked the format of the RUBE json files but it is certainly possible to parse json output from Spine in Tier 1. I'm already doing it.

Reading a text file that has a set format? Of course that's possible in Tier 1...

I'll take a look at some point but I haven't read anything in the Wikipedia page on json that would make me think this wasn't possible yet.

Edit: Looking at the json output from RUBE there are a couple of Box2D features missing from AppGameKit such as the chain object but that could be faked using a string of thin rectangular shapes. Other than that the json format itself is pretty easy to read and therefore to parse manually. Pretty quick too if my json parser is anything to go by.

If GetDayOfWeek()=5 then initParty()

Login to post a reply

Server time is: 2024-11-24 17:52:14
Your offset time is: 2024-11-24 17:52:14