• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

json

  1. samspade

    JSON with Structs in 2.3.1

    Now that we can load json data as structs and arrays, I have a question. I can take the following data and load it in: { "Some Data" : "Hello World", "Some More Data" : "Goodbye" } And that will give me a struct with two variables containing the strings hello world and goodbye...
  2. T

    SOLVED Saving system (JSON)

    Hello! I need some help with saving system. Now I am using JSON-system, it saves everithing in files. But saving in files is not good for saving when player, for example, change the room. I think the game can use some temporary memory during playing, and use file-saving only if player push...
  3. T

    Error: Unexpected token reading a json Object at line...

    I recovered my game file after like 10 months, and when I try to run the game, this compile error pops up cant I cant run my game
  4. FrostyCat

    Asset - Scripts JSON Struct: Use structs and arrays to work with JSON

    JSON Struct Bringing out the true potential of JSON parsing in GMS 2.3+ Overview This library allows encoding and decoding JSON as structs, arrays and other first-order data types as of GMS 2.3. In addition to standard encoding and decoding functions, it also contains utilities for encryption...
  5. Gigicom

    GameMaker Use code in json file

    Hey, I‘m trying to figure out how to use pre-defined json files for some item data in my game. Before, I simply assigned all values to variables and assigned those to a ds_map like this: constantData = item.apple; name = „Apple“; graphic = spr_ItemApple; list = ds_list_create(); listVal =...
  6. samspade

    JSON and GameMaker Studio 2

    GM Version: 2.3.1 Target Platform: All Download: Github Repo Links: YouTube Playlist Summary: A GML tutorial series on what JSON is, how to import, and export JSON files, and building a very simple Choose Your Own Adventure style game for practice. While done entirely in 2.3, and updated for...
  7. flyinian

    What are your ways to organize data for saving?

    I am looking for ways to organize data to save. I have a save/load system using JSON files and it appears to work nicely. Now, I am looking for ideas to organize data. I have several "controller" objects that controls parts of my game and done this way for organizational means. Could I place...
  8. flyinian

    SOLVED JSON save/load system questions

    Questions before I create a JSON saving and Loading system. I plan on following Shaun Spalding JSON save/Load system with that, 1. What would I have to do to save/load ds_grids? What about global variables? 2. Would it be easier/better if I were to change my global variables into a ds_grid...
  9. If Programable_Matter

    Loading JSON info Error

    I keep getting this Error even though the program successfuly uploaded the JSON key :values Apparently the code works and the values show up in my program but like 2 seconds later I get this error. I'm pretty sure I'm missing some code Create Event http_get("http://webpage.json")...
  10. A

    SOLVED Really no way to add to JSON save file??

    Hello! I'm just starting out with saving, and decided to go with the JSON method as the title indicates. I have successfully saved menu items like "username" and some other menu preferences. I just began my exploration of saving room and character position.. However, when I did so I was also...
  11. G

    JSON saving and loading with map chunks

    Hello! First of all this is my first time using JSON. I have an infinite, procedural generated map and I am working out a method to save the stats of instances within a chunk area as a JSON. I need to use point_in_rectangle in case collision masks go into other chunk areas however my code...
  12. If Programable_Matter

    Error when working with JSON

    I've been uploading json files unto a webserver and had no problem with them on game maker... for some reason I now keep getting this error with a new project I have started : json_decode argument 1 incorrect type (undefined) expecting a Number (YYGR) Create Event http_get("website.json")...
  13. S

    Fastest way to load a JSON/text file with tens of thousands of lines?

    Hi, I want to load a large JSON file (more than 40k lines when formatted) and decode it. The system that I'm using at the moment works perfectly fine if all the data is contained in one line (loading the text into a string takes less than 1 second). However, if the JSON is formatted, it takes...
  14. Divinik

    GameMaker Loading Grid From Json Not Working Properly?

    So in the game I'm currently working on, every companion and their info is stored in a ds_grid (Companions_Grid), and within each companion's column is another inventory grid stored for the companion. The code for storing the inventory grids into the json seems to be working perfectly, I check...
  15. Lord KJWilliams

    Is there an upgrade ( by GMS? ) for the JSON file format to handle 64bit values?

    I was just reading the online manual and it says that the JSON file format can not handle 64bit values. I was wondering if there are any plans in the standard ( see : https://www.json.org/json-en.html ), to upgrade it to handle 64bit values eventually ? I was reading via skimming what I found on...
  16. D

    GameMaker Import Texture Atlas from Spriter Pro

    Hey all, recently started working with GMS2, lots of fun compared to other engines, but already encountered a problem I can't solve on my own. Hope for some good advise :-) I want to select animations and modify skeletons of my sprites in the engine. Apparently GMS supports importing a JSON...
  17. J

    GameMaker Game runs fine, but not when using the Debugger [SOLVED]

    Hey guys. I'm baffled by this problem: When I run my game, a json file for language (menu items, etc.) is opened and read into a ds_map in the Create event of my persistent objGameController object. It all works fine. The game is finished and already available on Steam... but... ... when I...
  18. H

    GameMaker What am I doing wrong with my data saving/loading?

    Hello fellow indie devs! This problem has had me stumped forever now (feels like it anyway). I've looked up several "how-to" vids on saving and loading data in gms2. I've dabbled in using json-ds_map, ds_grid_read/write, and even ini files (hate them). For some reason, that has me truly...
  19. 31Nf4ChZ4H73N

    how to read/save array out of json using json_decode [SOLVED]

    Im trying to store some date in a json and read the data out. however the game crashes whenever i try to read out the array. this is the code: var checker = json_decode(@' { "player" : { "name" : "Player", "array" : ["huhu","2we"] } }'); var inf = checker[...
  20. W

    GameMaker [SOLVED] Best method for loading JSON help

    I am looking for the best way to handle a JSON file with over 200k objects. Each object has 4 fields. I've worked with loading text files before, but not CSV or JSON. Right now, the data is CSV and JSON but wasn't sure the best method for getting it into GMS. I was thinking that pulling...
Top