In version 0.1.0c it is possible to make files without a valid parent directory in the code editor by having the file name include a folder that does not exist, for instance, foo/bar.lua
will create bar.lua
but it will not be accessible unless you create the foo
folder manually.
EDIT:
Also, the link for the text version on the resources page just leads to the html version.
not sure if everyone noticed this and is waiting for zep to have time to work on the bbs, but noone reported it: the picotron (sub-)category labels on the bbs are wrong: BlogCartridges
is shown for example instead of Picotron > Cartridges
(update: now fixed with nice logos!)
@TeamPuzel - Ah... I see the logic, but it was definitely counterintuitive that the app doesn't run the same way. I'd expect metadata/exit behavior to be the same as when running normally. I did spend some time worried I was editing the terminal app somehow (since the about/window title reflected this at times).
In general shouldn't it match normal execution?
Anyway it's not a major detail, just a little thing and certainly a matter of opinion.
Picotron is still crashing upon execution of any undefined Lua function in 0.1.0c on an Intel Mac, in 13.6.4 (Ventura). To replicate, just run the code:
k(1) |
Picotron will immediately quit to the Finder.
Note that this does not occur in Windows on 0.1.0c on the same machine. Instead, the error message "main.lua:1: attempt to call a nil value (global 'k')" appears as you would expect.
EDIT: solved in 0.1.0d, thanks.
@bengarney It's actually not normal execution — the terminal within the window is just your program suspended. You can type resume
to continue running, and also give the terminal Lua code that will be executed in your suspended program. This is not as good as a real debugger but you can use it to print out some variables when things don't work as expected or just swap out some functions on the fly
Current version 0.1.0c (Windows 11 23H2, AMD, RTX 2070S)
Here some random issues after a few minutes of testing:
- Code editor lacks on undo/redo (CTRL + Y/Z)
- Tab size currently 3 spaces. I want 2 spaces. Option?
- File "ls" shows carts twice.
- Open .p64 in editor. Not only run. Maybe with a context menu.
- Middle mouse button could be used to close tabs.
- Are the resources / performance dedicated for carts or shared with the workstation? (e.g. can wallpaper impact performance of games?)
- The file url input in file browser (file nav) does not lose focus when clicked outside e.g. selecting files. This makes it impossible to change the selection with arrow keys.
- Exiting game with ESC brings back to terminal. But the last frame of game is in the background. In Pico 8 the cursor line has a clear (black) background. Otherwise you can't read it.
- The text editor should scroll beyond last line (like in VSCode or Pico 8). You can scroll down until the last line is shown on first line. Currently you can scroll beyond, but only 2 or 3 lines. Maybe not intended.
- Can we overclock? If I read it correctly, the performance is about twice as Pico 8 has. I would double again (4xP8). Btw. how to set FPS to 30?
- The vid modes are flickering and a mouse click stops the program.
@domske It's worse than that, it's 3 spaces and 1 pixel, so everything after becomes misaligned — the font isn't monospaced D:
@TeamPuzel I would never have guessed that. Useful! I wonder if there is a better way to communicate it.
Indeed, the font is not monospace. Therefore not suitable for coding. :(
Or makes it more difficult. Btw. an auto formatter would be great.
A few more fixes are up in: 0.1.0d
Added: default keyboard mapping for key()/keyp() uses host OS layout by default
Added: can map multiple physical keys to a single virtual key
Added: sfx len (becomes loop0 when loop1 > len)
Added: warning on startup when the /system version does not match the build version
Changed: about.p64 now shows/edits the metadata of /ram/cart by default (i.e. just type: about)
Changed: rename triplane.p64 to biplane.p64 (need to re-select it again from wallpapers)
Fixed: /system rom in 0.1.0c was the wrong version! (caused map drawing and other things to break)
Fixed: (Windows) rm does not delete host folders
Fixed: (Mac) crashes after ~13.5 minutes
Fixed: host system user data paths are clipped at non-ascii characters
@zep thanks for the update!
Macbook air M2, latest OS and 0.1.0d
Cmd key stopped working for this update! i.e. Cmd+s, Cmd+r and whatnot.
Fn + delete for deleting forward stopped working too.
And also, I've sent you several Emails and X DMs but you seem to have missed them? :( I don't know how to reach you
Awesome, haven't run into the crash again.
For me with macOS 14.3.1 M1 and German layout the Option Key stopped working in two ways:
-
Starting with 0.1.0c, I can't enter symbols that need the Option key, like Option-8 enters
{
and Option-5 enters[
Usually this is solved by treating Left Option as the Alt-key and preserving Right Option for these inputs.
The key tester from earlier in the thread reports 226 for Left Option and 230 for Right Option and as an example 37 and 230 for Right Option+8 ({
) -
With 0.1.0d, Alt (Option) based shortcuts like Alt-Left / Alt-Right do nothing, and the hold-Alt toolbar gesture does not trigger
- Also with 0.1.0d triggering the Right-Shift zoom option causes sprites/symbols like the mouse cursor or toolbar icons to draw with a black background until restart
Thanks @zep !
A nice few issues now happily closed ~
https://github.com/ace-dent/picotracker/issues?q=is%3Aissue+is%3Aclosed
:-D
a couple of issues:
if you put a \" character at the end of a string, there's a graphical error where the rest of the string on that line won't display correctly (but it still runs and all that)
the other is that from what I can tell, when you scroll while holding the ctrl key on a program that uses a gui with a scrollbar, it will let you scroll horizontally (even if there is no gui content out there). This works on the file explorer, for example.
Thanks @zep ! I can confirm it isn't crashing anymore on mac os 12.5 intel, but as @jyanuary said CMD key stopped working, instead of CMD+C, you copy with "control"+C, paste with control+V etc..
CMD+Z or Control+Z don't work in SFX :(
Also sound stops playing after a couple of loops when I play it in the "Pattern" section, but you can still see the "waveform animation" in the bottom left as if it's still playing. You have to press "spacebar" to stop the animation.
You probably know this and forgot, but in MacOS the "command" key is the equivalent of "CTLR" in windows, Apple really had to make a "control" key to mess with Microsoft.
We're getting there doe, thanks for the big work you're doing <3
Be patient guys, fixing bugs for all devices is not that easy
The DEL key (Fn+Delete on Mac) not working seems to be a cross-platform thing. Doesn't work for me on Windows 11 either.
Despite having "CTRL+Q to quit" option turned off in settings, and "CMD" not working on mac, if I do "CMD+Q" Picotron still closes itself... strange
It seems that the map() function doesn't respect tiles that are flipped (F/V in the map editor works, but the changes aren't reflected when drawing)
Also, I can't figure out how to use a different spritesheet in map(). Does anyone know? (or a map that's not 0.map, for that matter)
EDIT: I found that you can call set_spr() to set a sprite in the current spritesheet. This along with get_spr() can switch sprites (sprite 256 is sprite 0 of 1.gfx). I wonder if there's a better solution (arguments to map() )?
It seems like neither alt/option or cmd keys are working for mac in the 0.1.0d update. So no alt-arrow key workspace switching or cmd+r to run. ctrl-r still works to run apps but I haven't found a workaround for the alt/option key not working. Other than that, so far so good :D no crashes yet. Thanks a million!
M2 macOS Sonoma 14.3 - Opt + arrow keys to navigate no longer works on 0.1.0d. Crashing seems to be fixed. Thank you!
picotron seems to respond oddly to key presses that were intended for my window manager (although it's unclear the problem is actually related to the window manager)
say i have picotron in workspace 1 and i press mod4+1 to go there, making picotron the active window. it reads this as the same as pressing ctrl+1 while it was already focused, and so it will toggle the navbar on. but, it won't do this if i'm already on that workspace and press mod4+1 (it took me a while to troubleshoot this because i had no idea why the navbar wouldn't just go away. i was aware of the alt behavior but not the ctrl+1 behavior before i ran into this issue.)
most programs will ignore my wm keybinds like i want them to. possibly even pico-8 does? i tried making ctrl+a into a wm keybind and tried it on pico-8, though i'm not sure i tested it right
edit: system is linux 6.8.1-arch1-1 and i'm running awesomewm plus mate utils in case it matters
edit 2024-03-30: fixed in v0.1.0e! thank you!
Map doesn’t work:(
Edit: wait it’s not 0.1.0c anymore :)
Since the beginning (0.1.0) to the last version (0.1.0d) I randomly have big slowdowns for 1-2 seconds. I'm on Windows 11.
@zep Ok is that me, but I got 0.1.0d and the AltCar problem with { } [ ] (know in 0.1.0c) is still there and not fixed. It's like AltCar act same as left Alt. oh the DEL key not responding, only Backspace do. The only way to use these special {}[] is to type it in somewhere outside Picotron in your host OS (i.e. worldpad/blocknote) and then copy and paste it into Picotron's code editor then copy the pasted for multiple use.
loving picotron so far, keep up the good work zep! I've finally written up my big list of bugs:
I'm on 0.1.0d, here's some bugs:
- If I open a new terminal (
> terminal
) and then type?"hi"
into it, it prints to the original terminal - delete doesn't work in various apps (b/c the sdl keycode was renamed from "del" to "delete")
- pressing alt-tab on my machine (linux, manjaro + kde) while in the code editor inserts a tab character (and it toggles the sidebar in the gfx editor). this seems to be OS-specific
- pressing enter in
podtree
crashes the app (inside podtree.p64/main.lua,if(key("shift")) return true
gets upset b/ckey
is a local variable) - UX: opening the icon editor inside
about
silently reverts any text changes you made that you didn't save - it's a very minor thing, but
?type(("0"):basename())
is "number", which seems odd -- should be "string". same for:path()
mget(-1,-1)
prints nil (should be 0, like pico8 and like picotron userdata)?1+vec(5,5)
crashes picotron, instead of printingvec(6,6)
(well, I suppose it would technically print "userdata:0x1234" or something)- filenames with spaces act weirdly. for instance, when you drag them onto a window, the drop_items message does not have a "fullpath" key, among others
poke(0x5f36, 0x80) -- turn on wrap to clip_right text="drop a file with a space,\n and one without" window{width=160,height=160,autoclose=true} function _draw() cls() print(text) end on_event("drop_items",function(msg) text="" for k,v in pairs(msg.items[1]) do text..=string.format("%s = %s\n",k,v) end end)
- highlight some text in the code editor and press enter -- the highlighted code should be deleted but it is not
- hold shift in the code editor and click somewhere -- the selection will be from the start of the file to the cursor, instead of the previous location to the cursor
- clicking on an error message takes me to the correct file in the code editor, but it doesn't jump to the correct line
and some maybe-bugs; I could imagine these might possibly be intended changes?
fget(x,num)
-- thenum
arg doesn't do anything, unlike pico8palt()
doesn't reset the palette anymorecursor()
andcolor()
don't return anything like they used to in pico8tonum(false)
/tonum(true)
are both nil now (should be 0 and 1)btn
/btnp
without any args act strangely --btn()
returns 0 when I'm holding both left and right (should return 3, right?)w,h,typ,dim=userdata("f64",64):attribs() ?typ
prints "?" (should be "f64"). The docs say f64 is valid, and the userdata seems to work, so I'm not sure what's up with the "?"- if a fillp pattern is active when an error occurs, the terminal is infected with the fillp and becomes unreadable
and some feature requests:
- there's no way to write a custom
cd
command -- I hacked this into my terminal.lua to make it possible:on_event("terminal_cd",function(msg) cd(msg.path) end)
- I want home/end/delete inside the terminal! I added them myself:
if keyp"home" then cursor_pos = 0 end if keyp"end" then cursor_pos = #cmd end if keyp"delete" and cursor_pos<#cmd then cmd = sub(cmd, 1, max(0,cursor_pos))..sub(cmd, cursor_pos+2) end
- tab characters in the code editor can be extremely small (1 pixel) -- I wish there was a minimum size of something like 2-4 pixels
@pancelor do you still got the AltCar input problem for {}[] not fixed in 0.1.0d ?
I'm not sure what you mean (maybe I'm forgetting something?). I can type {}[]
just fine, but that's using shift, not alt. my right alt key works now, which I think is new.
For those of you wondering how to draw other than the main map, I was able to do it using this last night:
-- Fetch the map data.
mapdata = fetch( "map/1.map")
-- Draw layer 1
map( mapdata[1].bmp )
-- Draw layer 2
map( mapdata[1].bmp )
The .bmps are just 1-dimensional userdata objects arraged in rows, so you can read individual sprites using:
mapdata[ layer ].bmp[ y * width + x ]
@nephilim nice, that works. Still figuring out how to make map use different gfx files though, closest I've come to would be iterating through all the sprites in a file and copying them to 0.gfx
edit: how do you read a gfx file that isn't 0.gfx, 1.gfx, etc? we definitely need documentation...
A quick note for anyone experiencing missing key mappings: some of these will be fixed in 0.1.0e (most notably apple command, and del) but it is also possible to explicitly assign key->scancode mappings like this:
store("/appdata/system/keycodes.pod", {lgui=227,rgui=231,del=76,left=80,right=79,up=82,down=81,lalt=226,ralt=230})
To find out the scancodes of keys of interest:
>load #kbd_test
@Soupster switching between spritebank files in the map editor is arriving in 0.1.0e, but map() can already handle multiple spritesheets. The tile index is an int16, so spritebank 1 (gfx/1.gfx) uses indexes 256..511 etc.
To use a map that's not 0.map, you can refer to the map object as mentioned, but to set it as the current map and use it PICO-8 style, there is a magic address for it:
m1 = fetch("map/1.map")[1].bmp -- layer 1 memmap(0x100000, m1) map() -- draws m1 |
> how do you read a gfx file that isn't 0.gfx, 1.gfx, etc? we definitely need documentation...
The documentation is catching up soon! But to answer that particular question:
-- load monsters.gfx into spritebank 1 mon = fetch"gfx/monsters.gfx" for i=0,#mon do set_spr(256 + i, mon[i].bmp) end |
@zep that works! I didn't think to index the fetched gfx. I'm excited for the documentation! Also, it would be nice to choose a gfx file to use in the map editor, especially since it says what one it's using above the spritebank tabs. Copying multiple sprites is tedious too, so maybe a multi-select would be useful? Thanks!
On the Picotron manual page it looks like both the html and text links both point to the html version..
You can still get to the text version by changing the file extension in the address bar to from .html to .txt though.
-
The
delete
key does not work in code editor. (Remove text beyond cursor.) -
In Pico 8 Shift + Enter adds a
end
keyword where is needed (e.g. open funtion). Minor but helpful feature. -
Btw. is someting like splore planned?
-
I can't type
{}
(ALT + 7/0 german layout). Instead I get the message "captured label". Workaround: Copy from outside, paste into Picotron. -
The
~
tilde (ALT and + in german layout) is also not possible. -
How to get current game/window width and height?
- Please make the code font monospace.
version: 0.1.0d (win11)
AltGr key not working on non-US keyboard: code editor only partially usable as AltGr is needed for e.g. [, ], {, }, \ and ~.
- worked fine in 0.1.0b
- does not work in 0.1.0d (mapped to RALT)
More detailed info:
@domske To add to your list of interface grievances, Ctrl+D currently doesn't duplicate a line, so repetitive back-to-back lines of code like if (btn(0)) x-=1
etc. are more annoying to type.
You can get the current display width/height with get_display():width()
and get_display():height()
.
Lastly, SPLORE does seem to be planned in the roadmap, under 'BBS Integration' for Picotron 0.1:
"BBS Integration // Submit carts to a sub-forum, browse carts from splore app"
-
Picotron rocks.
- I am still getting the red junky bars around the screen on a Mac with 0.1.0c ... they do occasionally disappear tho ... but mostly they persist.
@Kaius Thanks for info to get display width/height.
I never used CTRL+D. You could do this after the line you want to copy:
- Enter for new line.
- Shift + Arrow Up to select the line above.
- CTRL + C to copy and CTRL + V insert again and again
It's easier/faster than it looks like. ^^
But yes, I wish that the basics works in Picotron like in Pico 8 or other code editor.
Hitting right shift to magnify puts a permanent black square around the cursor until the program is restarted.
crash report: In my _init function, I crash picotron doing error(env())
.
I was trying to debug why fetch_metadata(fullname(env().prog))
didn't work for me like it does in about.p64...
Cheers!
In 0.1.0d, fetching a webpage via print(fetch("website_goes_here"))
no longer seems to work. I tried restarting Picotron but still couldn't get it to work.
Oh and I do have 'Network' enabled in the system settings.
Haven't seen this text bug posted for v0.1.0d
yet.
I'm on macOS 14.4.1 (haven't tried on my Windows box yet)
- Copy/paste the sample program from
picotron_manual.txt
- Delete spaces from the beginning of a line of code until the line is flush left.
- Delete once more
The line being edited jumps to the start of the line above it.
This results in two lines of text overlapping,
as shown here where bunny = unpod(
overlays function _init()
Typing the code directly into the code editor behaves as expected.
Bugs in Picotron v0.1.0d on Linux (Ubuntu 23.10):
- Sound is crackly. Similar to the bug with the web player. Crackling affects all audio including startup noise, Bells, instrument player.
- In terminal, Home/End keys don't move to the start or end of the current line as one might intuitively expect.
having difficulty recreating the "plasma" tweetcarts (and others) from this page. goto doesn't compile so i needed to wrap things in a draw function. This is the only code i can get any kind of visual for, and it's still clearly broken when compiled:
function _init() cls(8) vid(4) end function _draw() for x = 0, 160 do for y = 0, 90 do k= (sin(x/400) + cos(y)) * 16 pset(x,y,k) end end end |
i think it may be some issue with the cos() function? everything else seems to be mostly working as intended based on some fussing around. here's a gif (also shows another error, which the poster below better describes):
using picotron 0.1.0d on linux mint 21.3. encountered similar issues using the same version on windows 10 earlier
On 0.1.0d turning on RSHIFT magnify and then using it causes a black box to appear under cursor that doesn't go away. It also causes all of the icons in the upper tooltray to do a weird sort of inversion of their colors- like they are black boxes with maybe blue symbols inside?
edit: looks like this glitch is also visible in the cart posted directly above ^
@josiebreck that seems to be some sort of issue with negative numbers; try using pset(x,y,k%32)
instead
bug report based on that example: pset(0,0,-6)
breaks the terminal colors (text is black now)
edit: oh maybe this is intended, since negative numbers set all the high bits, which are maybe signalling something to the drawing system? I haven't looked into it
@pancelor EDIT: this actually fixed it, thank you. needed to play around with it a little more to make it work
Hi all,
I'm using spanish keyboard, I've followed the @zep key rebind method and now del key works but I can't get right alt working. In the kbd_test program the right alt key seems to be bind to ralt and lcntrl values (E0 and E6 codes) by default:
I've tried to bind the lctrl key and ralt key but the E0 and E6 values remains. Anybody knows how to remove the E0 binding from ralt key?
Thanks in advance.
The manual ( https://www.lexaloffle.com/picotron.php?page=resources ) has no redirects from the Lexaloffle website. Is it possible to add a "Resources" tab for Picotron like Pico-8 ?
[Please log in to post a comment]