Log In  
[back to top]

[ :: Read More :: ]

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.

P#23725 2016-06-27 00:22 ( Edited 2016-06-27 04:22)

[ :: Read More :: ]

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.

P#23627 2016-06-25 15:32 ( Edited 2016-06-25 19:32)

[ :: Read More :: ]

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?

P#23530 2016-06-24 01:50 ( Edited 2016-06-24 05:55)

[ :: Read More :: ]

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

Basically, for each character, convert it to a number (and then build a second result set where values are actually hexadecimal)

Is there a better way I'm not aware of?

P#23441 2016-06-22 14:33 ( Edited 2016-06-24 00:41)

[ :: Read More :: ]

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.

P#23424 2016-06-21 22:25 ( Edited 2016-07-06 21:34)

[ :: Read More :: ]

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.

P#23088 2016-06-17 20:25 ( Edited 2016-06-18 18:17)

Follow Lexaloffle:          
Generated 2024-03-28 23:14:48 | 0.063s | Q:9