Log In  
Follow
Danjen

Holding alt and pressing left or right to tab through the different editors will also move the code editor cursor left/right.
Can be somewhat annoying when you're looking at sprite indexes and going back and forth rapidly.

0 comments



Topic.

I usually run Pico-8 maximized (but not full screen) so I can move between windows and tabs more easily. It's mildly annoying to have to find my mouse again because I moved it onto my main screen, and Pico suppresses it when I'm going for another window.

3
2 comments



Just wanted to make sure I understood how things worked before diving into it too deeply.

So I understand the idea behind the pattern editor, I've used it to make short sound clips and stuff (and then these are obviously arranged within the music editor to make different instrument tracks, etc)

From what I can tell at a surface glance though, is that the music editor only supports one song. Is that correct? I get the impression that I can set the loop start/end points to choose between different pattern sets to allow for multiple songs (eg 0-7 might be song 1, 8-16 could be song 2, etc). Additionally, I assume that I can create my own pattern arrangements on the fly by means of poke()

Anyone know for sure?

1 comment



Lua's standard library has a pair of handy functions called "tonumber()" and "tostring()", but they don't seem to be present with Pico8, which is unfortunate. I realized that you can get a lot more storage space by using strings, rather than sprite byte encoding, but passing it back into usable number data is challenging.

At best, I've got this so far:

function str2hex(str)

  local dd={}
  dd["0"] =  0 dd["1"] =  1
  dd["2"] =  2 dd["3"] =  3
  dd["4"] =  4 dd["5"] =  5
  dd["6"] =  6 dd["7"] =  7

  dd["8"] =  8 dd["9"] =  9
  dd["a"] = 10 dd["b"] = 11
  dd["c"] = 12 dd["d"] = 13
  dd["e"] = 14 dd["f"] = 15

  local obj={}
  for i=1,#str do
    obj[i]=dd[sub(str,i,i)]
  end

  return obj

end

[ Continue Reading.. ]

2
14 comments



Working on a little demake of MinerVGA.

Currently sitting at 15 ore types, 488 tokens, and 1 sprite page used. Most of the ores are loaded via peek() at sprite data. I want to keep it to one sprite page and 0 map pages, but we'll see how much I get done.

3
5 comments



Is it possible to take a string and index it or get individual characters from it? Ideally, I would like to convert to/from bytes to ascii characters. It looks like Lua 5.1 supports this in the standard library, but as far as I can tell, Pico-8 doesn't include it.

EDIT: I notice that I can use the # symbol preceding a token to get its length, such as a table or array or string, but I still can't directly index it.

EDIT2: After thoroughly reading the manual as much as possible, it looks like my answer is to use the sub() function.

2
2 comments