How to send/get a table to/from a Url?

I've checked a bunch of other discussions, but they are all from 2012-14 so they are all outdated, so none of them really work anymore. I'd prefer that the way to do it doesn't involve downloading something, but if it does that's fine, and it would be best if you could do it on something like Google Forms. Also, if you know a way to do it, it would be helpful if you state if the method is free or not (not including if needing Gamesalad Pro). Thank you to anyone who is able to help!

Comments

  • ArmellineArmelline Member, PRO Posts: 5,456
    edited October 26

    I currently use a GameSalad to Fly.io to Google Firebase pipeline. Firebase is free and Fly.io is very cheap, and free if you have very minimal traffic (they only send bills out if your usage is over $5 in a month). I haven't gotten around to writing up a turorial for it, but my GitHub for it is here:

    ChatGPT can talk you through how to use it, most likely. Or I do freelance GameSalad support and I can set it up for you (paid service).

    ___

    Need help with GameSalad? Custom support, publishing, and game development services available at armelline.com!

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    Thank you! This would be very helpful, but as of now, I am unable to pay for anything, but I'm sure there's someone else who this is very helpful for. I am very grateful for you for trying to help, but personally I am unable to use this method.

  • ArmellineArmelline Member, PRO Posts: 5,456

    Unless you're going to be sending thousands of requests a month, this method is free. It takes a fair bit of traffic to hit the billing threshhold for fly.io.

    ___

    Need help with GameSalad? Custom support, publishing, and game development services available at armelline.com!

  • NoobDevNoobDev Member, PRO Posts: 51

    I need a method for saving my games progress. My ideal setup would be a cloud service that allows me to save the table via that "send table to url" behavior and to load the table via "get table from url". I suppose there needs to be some way to differentiate tables so each player would either have a randomized string of numbers or a username as their save ID so that if they re-install my app this same ID would be used to identify their save file and load the correct table. I would also like to be able to view and edit these files but its not necessary. First I would like to know if this is possible to do. I am not aware of all the services out there. If it is possible and isn't fairly easy to do in a few afternoons, I would be willing to pay someone to show me how to do it step by step or do it for me with an explanation afterwards. I would prefer just one service being used to accomplish this. @Armelline's method looked like it requires two services. But if thats the only way to get it done, beggars can't be choosers. My game requests won't be super heavy with between 400-500 players per day but I would like it to be a scalable method that can grow with my userbase. I may even limit how many requests they can make per day to 1. The service can be free or paid. Any help is appreciated. Thanks

  • ArmellineArmelline Member, PRO Posts: 5,456

    Hey @NoobDev. That should be entirely doable. I think with 400-500 players making requests per day, you'd definitely end up paying for the traffic, but not all that much. The main reason I used both Fly.io and Firebase was I was converting from a Glitch and Firebase method and it was the easiest way for me to transition without retooling games. If you wanted to use just fly.io I'm pretty certain that's possible, though I'd need to look into exactly how to achieve it. I'd honestly still recommend using Firebase (less maintanance, scaling, less work needed coding the server etc.). Feel free to drop me a PM and we can discuss what would be involved.

  • ArmellineArmelline Member, PRO Posts: 5,456
    edited November 9

    I just checked how fly.io bill for traffic and I'd actually be shocked if you ended up paying - apparently you get 100gb traffic a month free. If we assume ~2000 hits a day of 10s of kbs each (unless the table you're sending and receiving is huge, it shouldn't be more) and you're still in single digit gbs a month. I've honestly been continually impressed by how easy and affordable fly.io is. You'd need tens of thousands of players each day to go over their free limits and even then you'd only be paying a few dollars. By the time your game got big enough for it to be costing "real money" you'd have a smash hit game anyway and be making way more than it would cost. :D

  • ArmellineArmelline Member, PRO Posts: 5,456
    edited November 12

    I spent some time working on the server script and added some actions:

    * Pull specific rows from the table (specific rows or ranges of rows, including support for last row)

    * Append rows to table end

    * Inserting rows at specific locations in the table

    * Update specific table rows

    * Sorting a table server-side

    Currently it all works per-row, rather than per-cell, but bottom line is that pretty much anything is possible.

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    Could you please possibly explain to me how to set this up? Tried to set it up for about 5 hours and so far, haven't been able to figure it out or understand it.

  • ArmellineArmelline Member, PRO Posts: 5,456

    I don't have a full tutorial on it, but the gist is:

    Clone this to your GitHub: https://github.com/Armelline/gamesalad-fly-bridge (script was originally written by @adent42 for Glitch. Also you don't want my "origins = [" section though I don't think it does any harm if you leave it.)

    Make a Firebase and Fly.io account.

    Grab your secrets json from Firebase, in the Project Settings - Service accounts.

    Link your Github to your fly.io account.

    Upload your secrets json and database URL to fly. I use the command line but it might be possible via the website. (Google "flyctl secrets set")

    Deploy the Github project either via command line or the fly.io website.

    That's the main steps.

    I offer a paid service to set it all up for you, but it's quite doable with not too much effort.

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    Thank you so much, this is exactly what I needed!

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,283

    @Armelline it's not as "safe" but if you check in "*" for origin, you can let anyone use the. Or in this case anyone can use the API to develop right away and you domains aren't in the code.

  • ArmellineArmelline Member, PRO Posts: 5,456

    I actually ended up bypassing all the domain checking a while back but don't remember exactly why (I think it was for an HTML5 game that communicated with a server - unless I'm mistaken it's moot when communicating with a GS game). My understanding is that it isn't needed for this use-case anyway, as anyone can use the API and requests can be coming from anywhere. There's definitely security improvements that can be made but I haven't got to learning the security stuff yet :D For highscore tables it should be fine. I'll dig into better security (rate limiting at a minimum) once I get all the other stuff tested!

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    Ok, so I tried to figure it out for a few hours, and you instructions were helpful to getting me to what I think was close, but I still was unable to figure it out, so I'll just have to put this project on hold until I understand it better, thank you very much for trying to help.

  • ArmellineArmelline Member, PRO Posts: 5,456

    Drop me a PM with the specific point you're stuck on and we can see if we can get you moving.

  • ArmellineArmelline Member, PRO Posts: 5,456

    First version of a login system is working. I'll be tidying up a demo project and then working with @NoobDev to test it in a more real-world way but very happy with how things have gone so far!

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    Thats actually pretty funny, I just finished making a log in and sign up system for that game you were trying to help me with. If you want to check it out, the link is here: https://arcade.gamesalad.com/games/182944. So far its single client only (same device), but my goal is to add online play, plus you know, gameplay.

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    Thats actually pretty funny, I just finished making a log in and sign up system for that game you were trying to help me with. If you want to check it out, the link is here: https://arcade.gamesalad.com/games/182944. So far its single client only (same device), but my goal is to add online play, plus you know, gameplay. (I'm adding this a second time because for some reason it didnt do the quote thingy.)

  • ArmellineArmelline Member, PRO Posts: 5,456

    Looks like a great start! When I've got a demo project set up I'll send it over! If you haven't got your own server set up by then you're free to hook into mine for testing.

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    WHAT EVER YOU DO, DO NOT OPEN THIS ON A CHROMBOOK. It is the chrombook crashinator

  • ArmellineArmelline Member, PRO Posts: 5,456

    I've got the cloud account system working fully and have sent you the first pass at a demo project, @Wolflink164

  • ArmellineArmelline Member, PRO Posts: 5,456

    Now that I think about it, I've not actually tested it with HTML5 so it'll be particularly interesting to see what happens when it's run on the online creator!

  • Wolflink164Wolflink164 Member, PRO Posts: 11

    Ok, thank you! I'll look at it tomorrow (I've been pretty busy recently, that's why it's taken me so long to see this)

Sign In or Register to comment.