Back to the main site

How do I use a different browser for flash games?

This is where the save files for local games are supposed to go


If this path is not somewhere in temporary FS (aka RAM), then the saves should persist (although I’m not sure how this hash thing in the path is calculated, so maybe something’s causing that to change; in which case you still have it but not where the program is looking for it)

hm…no, there isn’t a macro media directory in my home folder.

Also, the game doesn’t have a tmp folder anywhere in it. Its just a game folder, with 2 sub directories. the data directory has the game, the img directory has an image for the background. And the html file, meant to run the game, is in the game directory.

Edit: also, I have almost no experience with programming.

I’m talking about where settings and save files for flash games are stored. It’s in user config files/folders. Those are dotfiles (starting with .) which are hidden by default. For example, ls won’t list them unless you pass -A option to it.

oh yea, I know what you meant. I have the ‘show hidden files’ checked my default now. Just so I can find some of my wine directories.

That said I also checked via the CLI, here’s what I can see:

image

as you can see, there’s nothing hiding that I can see.

…I said user config files/folders. That means $HOME. Because the folder accessible via shortcut ~ (or ~<username>) is where all config files are. I would even say, that’s basically the only folder where there’s much reason to place them (other than a few utility files like .keep which prevent the system from automatically removing a folder containing this file).

If you’re familiar with Windows folder structure, $HOME is equivalent to C:\Documents and Settings\<username> (or is it C:/users/<username> nowadays?), where all globally installed applications store their config per user. And yes, that means you’re storing all of your files in your settings folder, which is a quite bad idea in Windows; but in *nix it made perfect sense originally (because it originated from multi-user mainframes), and the fact that Linux uses good filesystems without severe limitations and that you’re free to mount/link external drives wherever you feel like while keeping access rights straight (because Linux filesystem is a single tree and not a bunch of separate ‘disks’) means there’s no actual reason to drop this convention.

Back to my previous screenshot; the game install I’m using as example is in /home/lex/Games/Flash/, but the config folder for Adobe Flash is in /home/lex – as it should be, since it contains global settings for your user. The #SharedObjects thing is basically cache for stored data per URL (Flash was made for the Web first and foremost), so it’s kept within the common files folder.

oh, I see what you mean. I think.

Here’s my listing for my flash player directory. Could the saves be somewhere else?

image

Huh.
Well that’s weird.
Seems like the data files aren’t stored.
You’re not running Lutris via sudo or something, are you?…
Or maybe you have storage disabled in local/global settings? Try running a flash file and checking settings from popup menu.
Come to think of it, where does it store data when storage is turned off?… Perhaps it’s in /tmp – that would explain losing data after reboot.

I don’t see a setting for storage in Lutris.

But if the files are stored in temp (I’m guessing thats ram?) directory, maybe it could be copied to the shared objects folder after every exit, and from it after every startup? I know lutris does have options to run commands before each launch and after each exit. I don’t know what that command would be, but it should be possible…right?

Also, where is the /tmp folder? I can’t find it in my home directory, or in the root directory

Hi,
Lutris has a Web runner (not to be confused with the Browser runner). If you add a new game you can use the Web runner, enter the link/path to your .swf as game path and tick the Enable Adobe Flash Player box in the runner options to play flash games.


I don’t know if this will fix your storage problems, but it’s worth a try (and it’s the recommended method to play flash games with Lutris)

@Medath, that’s where OP started from (read the first two messages). The discussion moved on to running a standalone flash player precisely because it’s more comfortable to use for flash games than a browser embedded plugin (YMMV, obviously).

@mattig89ch, I’m talking about Flash player. The program you’re running. Lutris settings have nothing to do with it, which should be obvious considering it’s not aware that the binary it’s running is specifically that of Adobe Flash (which is the thing that has problems with storage here).

/tmp is an absolute path (it starts with /, which means root directory), so its location is not ambiguous. If your distributive doesn’t have it, or (which I believe is more likely) mounts it someplace else, you can find it out fairly easily by running df -H (displays free space on mounted partitions, in human-readable sizes), or by grepping listing of mounted devices:
image


As you might’ve guessed, tmpfs is a filesystem located in RAM.

As for copying stuff over, you could use cp command for it (man cp opens usage manual)… Although in most cases it’s better to write a single shell script to do it for you. Which isn’t actually as hard as it might sound, since it’s literally the same thing as typing the commands in the terminal, except you only have to type them once (although there are some constructs you probably never used yet, so they may be unfamiliar should you need to use them). Just don’t forget to enable executable access right to the file before using it.
Regardless, before you can do anything with those directories, you need to figure out what’s happening there (and if the data is really placed in tmpfs, you still need to find the actual path to operate it).

1 Like

Ok, thank you. I’m watching the it-pro videos from back when I had a subscription, and they just went over creating your own scripts. They used the FTP example, where they apended more commands to the ftp command. I’ve also just covered piping command output into other commands as well.

Ok, so do we know where I’d look to find if/where the saves are being stored in the /tmp folder?

Also, why is /tmp not shown when I run an ls -a in the root directory?

Honestly, that’s an open question. The plan in these cases is usually to open the folder and check for any familiar words in file/folder names (limiting the search by owner could make it simpler).

It’s not a dotfile, so it doesn’t count as “hidden”; the reason you can’t find it is probably because it’s not there. Most likely it has a different name and/or isn’t at root level. Hence my two examples on how to check for tmpfs mountpoints.

My apologies for the lack of response. I was asking the devs for the naming convention of their saves, and if they knew where they might be stored. Sadly, they build this game for web browsers, so they wouldn’t know where the standalone flash game would store its saves.

They suggested a temp folder, that got deleted by reboot. Regardless, the naming convention is: ecol_CHAP2_p1_12.sol (it changes the p1 for p2,p3 or p4 depending on the saving slot or if it’s the auto save). Now, I’m guessing they are talking about the actual second chapter they released in this series, given how they are saying ‘ChAP2’ instead of CHAP1’. But I now have a place to start.

Also, I think I’m missing it. You say /tmp is a destination, but it doesn’t show up as a directory to access because its not a directory? Do I have that right?

Well, Adobe Flash doesn’t really allow SWF files to control where their data is saved. And the location of the saves is dependent only on logic implemented by Adobe (which is normally, as I said before, the Adobe Flash config folder → shared-objects folder → path to “filesystem” domain → path in file tree). The exact name of the save file doesn’t matter, as it will be inside a folder named after the SWF file.

You’re probably confusing /tmp directory, tmpfs, and the concept of temporary folder. Think of it like this: somewhere in your system, there is a folder designated for throwaway files (like where an archived file can be unpacked when you want to view its contents). This folder is usually mounted in tmpfs, because RAM is always faster than hard drive, and the files in it aren’t needed after reboot (by definition). As for the name of this folder, it can be named /tmp (as it would make sense), but there’s nothing stopping the distributive developer from choosing a different name (like /shm, for example; shmfs being the old name of tmpfs). Actually, you can easily make a temp folder of your own by mounting a tmpfs anywhere you like (as you can tell from my screenshots, there’s several tmpfss mounted in my RAM), but in this case, you need the one used by system as default path for temp files. And the easiest way to find out is probably to check which folders are mounted as tmpfs.

Ok…so if I’m understanding correctly, there isn’t a specific directory where these files in RAM would be stored. So I couldn’t just look in someplace like /tmpfs. I more need to search the entire drive for the file name/type?

Check out my earlier post; it explains how to find out which folders are in tmpfs.

Oh I see. Check here:

image

I ran the first command, then ran the game and created a save and exited. Then I ran the second command. Am I missing something, or has nothing changed?

How much data do you expect there to be in a flash game save file? The current save folder to the one I used as example takes up several dozen bytes. At the very least use exact size instead of rounded one (df -B1). And, you should probably compare folders from a fresh boot (when there’s no flash saves at all) to make sure there’s actual difference.

That being said, out of these folders the most suspicious one seems to be /run/user/1000. Second one is /dev/shm (why is it tmpfs?…) but I wouldn’t bet on that one.
You can also try echo $TMPDIR, but no guarantees here.

Honestly? I was expecting a meg or two of data. I was def not expecting anything below a kb. Seriously? Only a dozen bytes?

What do you mean by suspicious?

Also, I just re-read your post. You don’t say how to actually navigate into the folder in ram. Only see them. Or…am I missing something?

Well I don’t actually know how much information this game stores, but how much save data do you expect to be there? Probably stuff like your location, your stats, and what point in the storyline you’re at. It’s not like a flash game gonna have thousands of individual characters and items to keep track of at all times…

Suspicious as in most likely guess.

It’s a folder. The method to navigate there is always the same regardless of its location. The only issue could be if it was unreachable (remote or forbidden access), but that never applies to the temp folder (for obvious reasons).