LoginLogin

What features do you wish were in smilebasic?

Root / General / [.]

12Me21Created:
What things would you have added to smilebasic/the editor if you were in charge? This might be useful to know if anyone wanted to create their own editor, or just add some functions.
  • ^ for exponents.
  • OPTION to use 1-indexing
  • Syntax highlighting (and autocomplete) for user defined functions and variables
  • Syntax highlighting for +-*/
  • Open source editor (which could fix all of these problems). (of course, someone could make one, but it would be hard. I have the beginning of a syntax highlighter (keyword detector), though (used in my auto indenter))
  • Pressing SELECT in the editor runs the program in the current slot, not always slot 0.
  • Change MOD back to %, and change DIV to \
  • Add a logical XOR
  • More variable types (BIT,BIT*N,BYTE) (with their own type suffixes, of course.)
  • Type suffix (%,#) only required in VAR
  • Smoother SCROLLing
  • Being able to update programs on the server without deleting and reuploading them. (which changes the public key)
  • Better error detection
  • 3D Graphics (I'm sure there's a reason they didn't add this, though)
  • QR code support!
  • Reverse INSTR (Finds the LAST occurrence of a string in another string)
  • Change KEY 5 to "RUN " (with a space at the end)
  • More keyboards (access to ALL defined characters)
  • More fast
  • Default BREPEAT settings are the ones you set in the options menu
Other people's suggestions that I like:
  • Camera access

amiibo suport and camera ability (for games like the ar program). make it so your maps from the editor load by using load"map:name".

  • Syntax highlighting for user defined functions, and for variables and +-*/
  • type suffix (%) not required (I never use integers because of this)
The first one I'd like to add on to. The editor should also add the user defined functions to the suggestions on the bottom screen (maybe in a different color) and it should also scan the first few lines of a function for documentation.
DEF PUTTEXT D,X,Y,T
 'D=Screen to show text on (0=top, 1=bottom)
 '...
 'PutText puts texts in a specific place on the screen
 TEMP=DISPLAY():DISPLAY D
 LOCATE X,Y:PRINT T;:DISPLAY TEMP
END
The second one you can easily solve with OPTION DEFINT, which makes all variables defined default to integers. The features that I want would be
  • Actual 24-bit RGB and 3D GRPs (probably only one or the other)
  • A built-in MML editor in SmileTOOL
  • Being able to use START/SELECT as a button when the keyboard is onscreen there are no XSCREEN 2/3/4 statements
Edit: two last things:
  • TRY EXCEPT commands (we need them)
  • something that was really creative but when i type it out, i forget it (ill edit this again when it comes back)

The second one you can easily solve with OPTION DEFINT, which makes all variables defined default to integers.
But then you would need to put # after real variables. Using integers doesn't seem to have any speed advantage over floating point numbers, so I will only use them if they don't cause inconvenience.

OPTION XON SLEEP - allow the program to continue running and outputting audio while in sleep mode (technically it wouldn't be sleep mode anymore). A system variable would indicate whether the system is closed, and there would be a command to enter sleep mode if the current program state doesn't need to keep running. There would still be access to the L/R buttons, maybe also ZL/ZR for N3DS, and extra-maybe all the rest of the inputs for 2DS. Edit: and microphone would still work :P This would make it possible to have a continuous Petit Modem - hook up the 3DS to the PC, then type on your computer and have it instantly on the 3DS. No need to transfer things back and forth when you're working on something - it's all seamless! Of course, this is all possible to do right now, but it would be nice if it was possible with the system closed. :)

I would love to see labels with symbol suffixes like we do with DEFs now:
DEF func%
@label%
+1 to the v360's idea. Also just name suggestions without help would be amazing.
open source editor
Check out Actorbug on the Japanese miiverse! There's a whole lot on proper syntax highlighting and a cloned editor.
amiibo suport and camera ability
I think Nintendo has been very adamant about not having ways for outside data to get in. I can't see NFC happening, but the amiibo phrasing brings up an interesting point: amiibos are signed by Nintendo just like wireless multiplayer sessions are; they could for the most part guarantee the data stored came from a 3DS. And now for the nitpicky part (:p)
OPTION BASE 1 (or something like that) (strings and arrays start with 1 instead of 0)
I don't think it should be an option not to learn that these are offsets. You might break all of computer science! (Or have to adjust when you learn your next language...)
Using integers doesn't seem to have any speed advantage over floating point numbers, so I will only use them if they don't cause inconvenience.
Integers aren't intended to be faster; they take up less memory and are more accurate. Floats estimate a number by storing several integers.

I would love to see labels with symbol suffixes like we do with DEFs now:
DEF func%
@label%
+1 to the v360's idea. Also just name suggestions without help would be amazing.
open source editor
Check out Actorbug on the Japanese miiverse! There's a whole lot on proper syntax highlighting and a cloned editor.
amiibo suport and camera ability
I think Nintendo has been very adamant about not having ways for outside data to get in. I can't see NFC happening, but the amiibo phrasing brings up an interesting point: amiibos are signed by Nintendo just like wireless multiplayer sessions are; they could for the most part guarantee the data stored came from a 3DS. And now for the nitpicky part (:p)
OPTION BASE 1 (or something like that) (strings and arrays start with 1 instead of 0)
I don't think it should be an option not to learn that these are offsets. You might break all of computer science! (Or have to adjust when you learn your next language...)
Using integers doesn't seem to have any speed advantage over floating point numbers, so I will only use them if they don't cause inconvenience.
Integers aren't intended to be faster; they take up less memory and are more accurate. Floats estimate a number by storing several integers.
Pretty much every programming languages has strings that start at 1 0 is supposed to mean "nothing" not "the first value" For example, INSTR in PTC returned 0 if it didn't find the string, but now it returns -1, which doesn't work well with IF statements: IF INSTR("ABC",S$) THEN... will not work, you need to do: IF INSTR("ABC",S$)+1 THEN And: starting with 0: DIM ENEMIES[MAXENEMIES,3] FOR I = 0 to MAXENEMIES - 1 ... NEXT with 1: DIM ENEMIES[MAXENEMIES,3] FOR I = 1 to MAXENEMIES ... NEXT

The second one you can easily solve with OPTION DEFINT, which makes all variables defined default to integers.
But then you would need to put # after real variables. Using integers doesn't seem to have any speed advantage over floating point numbers, so I will only use them if they don't cause inconvenience.
They have an advantage of taking half the memory, especially when you're working with large arrays. I wish I knew this when I was playing with video playing before.

Pretty much every programming languages has strings that start at 1
Show me one... All languages I know start at 0. The only exception is Lua, where I'm actually not sure if strings can even be indexed, but 'arrays' start at 1 and they're not technically arrays, they're dictionaries.
And: starting with 0: DIM ENEMIES[MAXENEMIES,3] FOR I = 0 to MAXENEMIES - 1 ... NEXT with 1: DIM ENEMIES[MAXENEMIES,3] FOR I = 1 to MAXENEMIES ... NEXT
This is your only argument that makes sense, although in other languages it doesn't look like that because for loops traditionally are non-inclusive of the last value. (They use I<MAX rather than I<=MAX in the relevant part) But this doesn't really matter. Most if not all real-world languages use 0-indexing. It would be silly to go against that, especially for a program that is meant to introduce you to the world of programming.

The highest index should equal the length. This makes everything easier. DIM ARRAY[7] should make the array go from 1 to 7 STRING[4] should return the 4th character I will make my own string functions

The ability to write code using a proper keyboard and screen.

The ability to write code using a proper keyboard and screen.
Didn't they make a keyboard for PTC? (only in japan, of course) This would be really useful. It could use the IR port

The ability to write code using a proper keyboard and screen.
Didn't they make a keyboard for PTC? (only in japan, of course)
what. No. And hnakai did get a USB Keyboard to work with SmileBASIC, it just... requires extra hardware. I believe there was a Raspberry Pi or some other hobby board involved.

The ability to write code using a proper keyboard and screen.
Didn't they make a keyboard for PTC? (only in japan, of course)
what. No. And hnakai did get a USB Keyboard to work with SmileBASIC, it just... requires extra hardware. I believe there was a Raspberry Pi or some other hobby board involved.
Oh, I remember what I was thinking of. There was a DS game that had a wireless keyboard, and people were speculating whether it would work with PTC. Of course, it didn't.

OPTION is for precompiler settings, so OPTION BASE1 wouldn't work because it affects runtime. SLEEP wouldn't work either. As for strings starting at 1, there's very few languages that can actually index strings in the first place (usually they're standard library objects or something; in the case of C strings are just char arrays.) They're all 0-based indexing from what I remember. One of the few langs I know that 1-indexes anything is TI-BASIC with it's lists.

The ability to write code using a proper keyboard and screen.
That would be awesome it whould make programing like ten times faster!

OPTION is for precompiler settings, so OPTION BASE1 wouldn't work because it affects runtime. SLEEP wouldn't work either.
Ah, you're right. I've failed to make this distinction myself! In that case, I pretend I said XON SLEEP and just go with it.... :P

OPTION is for precompiler settings, so OPTION BASE1 wouldn't work because it affects runtime. SLEEP wouldn't work either.
Ah, you're right. I've failed to make this distinction myself! In that case, I pretend I said XON SLEEP and just go with it.... :P
I don't think any 3DS games are allowed to run while it's in sleep mode. The only argument I've heard for 0-indexing is that other programming languages do it. That's not really a valid reason. Just because someone does something bad, it doesn't mean you have to copy them. But OPTION BASE1 would stop all these arguments. I guess OPTION isn't perfect for this, but OPTION BASE1 is in some other versions of BASIC, and it makes the most sense. Obviously, XON wouldn't make sense in this case.

I don't think any 3DS games are allowed to run while it's in sleep mode.
Animal Crossing, Smash, Ambassador programs; I know a lot of games that continue to run with the system closed. I mean fully run: Animal Crossing continues running if your gate is open. It even warns you about it. Ambassador programs (like the GBA games) simply never allow the system to go into sleep mode. It's doable, I just don't know if it's a thing only Nintendo games can do. Edit: Base 1 has a computational overhead. In memory, variables are stored with an address. For arrays, this address points to the first element. Offsets (like 1, 2, 3) add to the address, so "no offset" from the first address is the first element (0 based index). If it starts at 1, the generated code would have to perform a subtract EVERY time you access an array. Imagine array accesses taking 50% longer... each and every one.

I don't think any 3DS games are allowed to run while it's in sleep mode.
Animal Crossing, Smash, Ambassador programs; I know a lot of games that continue to run with the system closed. I mean fully run: Animal Crossing continues running if your gate is open. It even warns you about it. Ambassador programs (like the GBA games) simply never allow the system to go into sleep mode. It's doable, I just don't know if it's a thing only Nintendo games can do.
I think only the GBA games never go into sleep mode (GBA emulator is very limited, maybe because the 3DS can barely emulate the game boy advance, but probably because only a few people (including me) have access to it, so they didn't bother adding lots of features). The NES emulator is much better, and supports sleep mode just fine. I'm sure Nintendo is very strict about games running during sleep mode, since this will drain the battery almost as fast as if the 3DS was open. Unfortunately, I don't think smilebasic is going to be updated very often, since it's on the 3DS, and updates are more inconvenient than on a regular computer.