Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TIC-80

Fantasy computer for making, playing and sharing tiny games. · By Nesbox

New 0.0.10 pmem function

A topic by Tisajokt created Dec 03, 2016 Views: 821 Replies: 12
Viewing posts 1 to 4
(1 edit)

The new pmem() works just fine for preserving values within a single session if you exit the program within TIC, but it doesn't persist through closing TIC itself (a test, tell me if I did something wrong). Is that a bug or intended, and if latter, will truly persistent memory (through HTML local storage and files on system?) come about? A player of an export presumably has no need / no knowledge how to restart the program anyway.

Love the other new stuff though!

(Edit: It appears not to work in the HTML export at all)

Developer

I see the problem, will made hotfix soon...

Thanks

Developer(+1)

I've made a hotfix for 0.0.10 and uploaded it (with one condition, persistent memory depends of rom hash, so it will reset if you change any rom data)

Could you pls check it and let me know? Thanks.

Updated my test, it works 100% for web version of HTML export now, and persists within the session of installed HTML. Though I suppose local storage doesn't really work in "installed" HTML anyway (but if you found a way that'd be great :P). I work on Linux so I can't test Windows executable easily.

Developer

What do you mean when say "installed" HTML? sorry, didn't get it

(4 edits)

Ah, I mean if you're running the itch client and click the "Install" button on a page with an HTML export. It just downloads the index.html and runs it when you click launch. I can't remember if local storage works in such a case.*

Now would be a good time for me to ask if there's an export for a Linux executable?

*Edit: Just tested, actually it does work. At least in Chrome browser, perhaps not in the itch browser. I'll test that now...

...aaand nope, it doesn't work in itch browser.

Developer

It's a pity, seems to itch client browser works like 'in private' mode

As for Linux exec export it's easy to implement I think, will try to add it in 0.0.11

(+2)

The lack of persistent local data for HTML5 games in the itch app is a known issue: https://github.com/itchio/itch/issues/861

It derives from the fact that the game is served from a random http port every time it starts up (for example: http://localhost:23982) - it actually does save data, but the next time you start it, it won't load up the correct data.

The fix for that is probably to switch to a custom protocol (non-http), although that may cause other issues down the line. We're aware of the issue though, so there's hope!

Are you aware of how characters shift up a row after the 32nd character on the command line, by the way?

Developer

no, how to reproduce?

Did a little experimentation, found out that it does not occur in the web version, but only in the executable version I'm using (for Linux). It happens after you trace() a string that exceeds that limit, and doesn't seem to end until TIC is restarted. Here's a screenshot.

Developer

successfully reproduced it only on Linux and I'm intrigued what's going on :)

will try to fix, thanks

Developer

itch v22.2 is out! itch.io/app

  • twine game support
  • persistent save support for HTML games

https://twitter.com/fasterthanlime/status/81015889...