Hi all,
This is a question I asked on discord, but I thought to get some feedback on here.
Stupid question maybe. I'm editing in vscode. I've put rulers at 32 chars to match the in built editor. How the heck do you all make your code fit inside a pico8 editor horizontally.
I don't mind going over every so often but 32 chars is very very little.
ico_zoom_in = create_icon(0x3844.92ba, 0x9244.3a01, 100, 40) |
comes to 62 chars.
even if I rename to be
zi = ci(0x3844.92ba, 0x9244.3a01, 100, 40) |
it comes to 44 chars but zi is a horrible name for zoom in icon. and ci is a horrible name for create icon.
maybe something like this.
local top = 0x3844.92ba local btm = 0x9244.3a01 local x,y = 100, 40 zoom_in_ico=c_ico(top,btm,x,y) |
That fits but need to lift a lot of variables out and still c_ico isn't very clear name.
Do you all even consider this?
I find I just can't work with 32 chars.
If people download the carts its hard to read carts in splore. I honestly think we need more resolution in the code editor.
If pixels in the editor were half width It would be a lot easier to fit into the in built editor 64 chars is still difficult to fit, but I think I could make the majority of lines fit into that.
What do you all think? I feel like having code not fit in the editor could be off putting for well basically anyone who uses the internal editor but especially for new people trying to learn.
I like to use vertical space a lot. For example (just grabbed a snippet of recent code I wrote):
meprops=crwind(32,16,64,32, {togslay1, togslay2, togslay3, togelay1, togelay2, togelay3, shwtext, edttext}) |
another example:
function tilebeneath() return gettilesol(htx,hty+1) or gettilelad(htx,hty) or gettilelad(htx,hty+1) end |
@gradualgames yes I think I need to layout the code more like this. On discord the consensus seemed to be don't bother.
I think it can look quite neat/easy to read vertically oriented like that. It's partly why I advocated for having a setting in PICO-8 that would replace all tabs with spaces, so that you can have very fine control over vertical positioning like this regardless of your tab depth setting.
[Please log in to post a comment]