Don't wanna be here? Send us removal request.
Text
How do Browser Games Save Progress?
The answer is cookies!
Cookies are little packets of data that a website might ask your browser to save on your computer's hard drive so that when you come back to that website, the browser can send that data back, and the website can do stuff with it. This is commonly used for things like remembering login information, but in the example screenshot above, it's used to remember a high score from a previous game.
Many browsers, like Edge, put all of your cookies into one file which is nested in your AppData folder. If you show hidden items in your File Explorer, you can actually go right to your Cookies file and open it in Notepad (as long as your browser isn't open and using the file at that moment), though it might just look like a garbled, encrypted mess:
In GameMaker, if you want to make use of browser cookies to save data in a game meant to be played on a web page, you have a variety of tools at your disposal. I've found it fairly simple to work with .ini files, which you can add as "Included Files" in the Asset Browser, and then you can use GM's ini-based functions to read or write to those files when you want to load or save information, respectively.
Have fun using cookies for whatever your heart desires!
4 notes
·
View notes
Text
First Blog Post
Yo whaddup, I'm Cowow! I post games and stuff on Itch.io, and I'm starting this blog to write about cool programming & game design tricks that I've picked up while working on my projects. My goals are to be informative, to help increase my social media presence, and to give myself an outlet for all the new stuff I'm fitting in my brain.
Thanks for reading - I plan to make some cooler posts soon!
2 notes
·
View notes