Log In  

@Coldbach

Follow
Follow

If you are on linux you can use firejail to launch PICO-8 sandboxed. That way PICO-8 cannot access all your files, only those in its directory and its configuration directory.

I assume that you have the PICO-8 binaries in ~/pico-8 and that you are using the default config directory ~/.lexaloffle

I also assume that you are saving screenshots in the ~/pico-8 directory and not on your Desktop. To do that you need to edit the "desktop_path" line in your ~/.lexaloffle/pico-8/config.txt to be like this:

desktop_path /home/username/pico-8/screenshots/

Replace "username" with your actual Linux username for the rest of this post.

Now, install firejail from your repositories (sudo apt install firejail) or download a newer version from their website (up to you)

Create a file called pico8.profile in ~/.config/firejail

Put the following in this file:

include default.local

include globals.local

noblacklist ${HOME}/.lexaloffle
noblacklist ${HOME}/pico-8

include disable-common.inc
include disable-devel.inc
include disable-interpreters.inc
include disable-programs.inc

whitelist ${HOME}/.lexaloffle
whitelist ${HOME}/pico-8

include whitelist-common.inc
include whitelist-var-common.inc

apparmor
caps.keep sys_chroot,sys_admin
netfilter
nodbus
nodvd
nogroups
notv
?BROWSER_DISABLE_U2F: nou2f
shell none

disable-mnt
private-dev
private-tmp

#noexec ${HOME}
noexec /tmp

Then you can lunch pico like this from its directory:

firejail pico8

Or, assuming you use MATE, you can create a file in /home/username/.local/share/applications/ with any filename (as long as the extension is ".desktop" I suppose) and these contents:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=/home/username/pico-8/lexaloffle-pico8.png
Icon[en_US]=/home/username/pico-8/lexaloffle-pico8.png
Name[en_US]=PICO-8
Exec=firejail /home/username/pico-8/pico8
Name=PICO-8

and now you will have a menu shortcut to start

The desktop file may work with other desktop environments. If not you can always use the menu editor that comes with your distro. The important part is making sure that you are executing firejail with the full path to pico8 as an argument.

To verify that you are running pico8 in the proper sandbox you can open a console and try to start it up by running

firejail /home/username/pico-8/pico8

You should see something like:

Reading profile /home/username/.config/firejail/pico8.profile

I will try to make the sandbox even tighter in the future.

P#65219 2019-06-15 11:53 ( Edited 2019-06-15 11:53)

If you boot up PICO-8 like this:

./pico8 -home $(cd .; pwd)/data/

Then the splore command has a weird bug: Updating the "New" page shows nothing in the "New" page and instead the "Featured" page shows the results that were fetched from the "New" category!

This bug is not present if you boot PICO-8 normally without a custom home dir.

(Also, the above weird $(cd .; pwd) command is the only way I've found that will allow me to make a portable version of PICO-8. Using "." will break the "cd" command in PICO-8 so I have to construct and pass an absolute path. Which is a second bug, perhaps I should open another thread about that.)

P#65103 2019-06-09 14:47 ( Edited 2019-06-09 14:50)

Cart [#bists-29#] | Code | 2019-06-15 | License: CC4-BY-NC-SA | Embed

[8x8]
[8x8]
[8x8]
Bists have a brain with 23 parameters that governs how they behave, how much HP they have and how fast they are (more HP = less speed). They are aware of their nearest green bist, the nearest red bist, as well as the nearest food source. The decide how to move towards or away of these things, how far to look for their closest bists and food, when to switch their color, how often to think, and when to slack off and slow down their falling HP. When their HP is full they give birth to offspring that has randomly mutated parameters.

[8x8]
Food tends to spawn closer to the 32,32 and 96,96 on the screen.

[8x8]
[8x8]
Every now and then a trap will spawn. This looks like food to the bists but it will freeze the bist that eats it for quite some time.

Be patient, bists sometimes take a long time to evolve. There is a speedup option in the help/menu page that you can use if you can't wait.

You can also join the game and try to outlive the oldest bist or try put evolutionary pressure on them (e.g kill some while you are red, and soon bists will be avoiding red bists)

Make sure to check out all the the options that can be found in the menu in the help/menu screen.

If you evolve any interesting brains paste them here! You can save to the clipboard the brain of the oldest bist by opening the help/opts page finding "SAVE TO CLIP".

Every now and then bists will play a custom cry which is 100% based on the parameters of their brain. You can also listen to the cry of the oldest bist by saving it.

To load a brain and add it to the game just ctrl+v in PICO-8, then open the help/menu page look into the menu for the "ADD FROM CLIP" option.

P#65079 2019-06-08 18:02 ( Edited 2019-06-15 00:49)

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-06-20 09:27 | 0.062s | 4194k | Q:26