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 / Array.save(), Array.load(), Array.fromJSON(), Array.toJSON()

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 5th Dec 2018 03:24
These are some super awesome array functions! Makes formatting windows, environment etc a breeze. If you haven't already, check 'em out. Search for Json on the web page
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 6th Dec 2018 03:14
Oh... wow. Very cool. I missed this.
nz0
AGK Developer
16
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 7th Dec 2018 00:47
Love the JSON stuff. Worked well for me managing co-ord arrays produced from external tools. Just save off the files and hoover them into my game
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 7th Dec 2018 03:06
you can convert type stuctures to and from json as well, doesn't have to be an array. I've really been enjoying this feature.
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Dec 2018 07:32
I tried that and couldn't get it to work. Can you give an example please?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 7th Dec 2018 13:04
Here is the example straight from the help docs

http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 7th Dec 2018 13:24
Ok Thanks orto. I was trying the .save() .load() functionsbut they didn't work
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 10th Dec 2018 19:59
@BlinkOk You can create a single index array from your type and use .save and .load on that. e.g:


Would still be great if we could save any variable or user defined type (not just arrays) using .save and .load though.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Dec 2018 20:42 Edited at: 10th Dec 2018 20:45
Quote: "@BlinkOk You can create a single index array from your type and use .save and .load on that. e.g:"


Great idea!

Login to post a reply

Server time is: 2024-04-18 11:23:35
Your offset time is: 2024-04-18 11:23:35