Log In  

Yep, some more casual observations by dw817.


Just a suggestion for the FORUM. Can add a NEXT or PREVIOUS when reading BBS messages to go to the next or previous initial BBS message that was written.

Signature lines for the forum anyone ?

Errors (or problems) I found:
local a,b,c -- accepted
local a=3,b,c -- accepted (This method is listed in LUA help)
local a=3,b=2,c -- error
local a,b,c=3 -- read wrong, number stored in "a"

Loading code currently includes loading any spaces that might be inadvertently added to the end of a line.

Suggest in loading they be truncated, I.E.:
One line could read:
"cls() " -- and have 2-spaces on the end. This is saved when the source is saved.
Loading a code could truncate this:
"cls()"
Or even in the EDITOR, automatically truncate leading spaces as they are not needed.
While they don't count in TOKENS, they =DO= count in source code bytes used of the available 65536.

Since the code editor's top-left-hand corner of the screen is blank, it could include information including the name of the last saved file. This would be useful when working with two-different PICO files that are open in two PICO editors so you don't confused as to which is which.

Suggest that anything between --[[ and ]]-- is not dark violet as a normal remark, instead is a brighter color as clearly the coder wants these remarks to be seen above all, perhaps color 12.

Suggest CONT be used to continue code if you accidentally press [ESC] during runtime.
Suggest ENTER bring up menu even if not Online or not running from SPLORE.

Suggest CURSOR X position be shown in code editor.

These commands are not explained in PICO-8's HELP file. Can anyone please tell me what these are used for ?

holdframe()
break()

Not all info in this text is suggestions or confusion, some are notes just to help me and others.

Can use either: print "" (double quotes) or print '' (double apostrophe)

\" generates a quote despite the possibility of being INSIDE quotes already.
print("He said, \"Yes !\"")

\n or \10 generates a true CR inside a string.

\a does not generate a picture of a bell or play a tone. But perhaps it could ? :)

Strings are automagically converted to numbers if used numerically, but not if there are operands involved.

print("10"+1)

This does not work.

sum="(10+1)*2"+0
print(sum)

If this worked, it could make for a great calculator program in PICO, which actually I could use right about now.

.. (dot dot) is used to connect strings, NOT +

dessert="apple".."sauce"

Suggest that BOOLEAN variables can also be used mathematically. Where TRUE is -1 and FALSE is 0, then this programming line could be done, which would be especially useful for compact 140-character tweets:

a+=(b>3)*c -- generates an error currently

To do a true QWERTY keyboard input for LUA, use:

a=io.read("*number") -- Which is not yet available in PICO.

tonumber() and tostring() do not work at all. Perhaps they might be needed sometime ?

Arrays are NOT limited to numbers and you can mix and match types from the same array. This could be quite useful !

game={} -- init, notice that these are curly brackets
game[34]="apple" -- standard string array
game["ballpos"]=23 -- or is it ?
game["ballpos"]+=1 -- you can mix and match types throughout the entire array

To "ERASE" an array, simply use:

game=nil

Periods, tricky stuff, can abbreviate referencing arrays, but only if they are words:

game.x=10

is the same as

game["x"]=10

NOTE ! You cannot use a number after a period in referencing an array, always use the square brackets.

game.34=10 -- ERROR

game[34]=10 -- ACCEPTED

Don't confuse the two:

game["x"]="ready" -- where "x" is the ID name for game
game[x]="ready" -- where variable X is the index number for game

These two variables are also different:

game[10]="go"
game["10"]="here"

Cannot read or write text files yet, hopefully in time.

LS can be used in place of DIR to view your directory. Suggest there is a true filer where you can scroll up and down and press ENTER to Load/Save/Rename a file as if you have more than 21-files in a directory, you get a page pause, then the remaining files before you can type in a command. Very clumsy.

Suggest available abbreviation of FUNCTION as FUNCT be available to save characters.

Would like to have 60fps option in FLIP(). "flip(60)"

I can see the character space and TOKEN space. How much RAM do we have to work with ? And would it be more convenient to have the remaining RAM appear in the source editor after running your code ? Perhaps appearing in the middle line on the bottom status in the code editor as it is blank there.

BTN() and BTNP() are different. BTNP() has a pause, like pressing a key on the keyboard. Hold it, it taps out one key, pauses, and if continued to be held, finally repeats. BTN() by itself is like a joystick. Hold it, and it automatically is repeated.

** I would like to see a numeric entry to creating sounds in addition to regular existing methods. That is, where you can type a 2-digit number to represent pitch. Then making scales would be a lot 'cleaner' than just dragging the mouse from left to right or entering fractionated octave notes.


That's all for now.

P#29533 2016-09-27 18:57 ( Edited 2016-09-28 23:04)


[Please log in to post a comment]