? SmileBASIC 4 Discussion「プチコン4」 (Page 17) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

SmileBASIC 4 Discussion「プチコン4」

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  • #321 ✎ 47 PetitProfessor
    Did you try some 3ds programs that work that way on the switch to see if they act differently? P.S. great tutorials btw
    There’s a lot of the same functions but SB4 is pretty different. Still figuring out the basics. P.S. Glad I can help man
    Posted
  • #322 ✎ 54 kantackistan Can we detect via code when the Switch is docked or undocked? Posted
  • #323 ✎ 1053 snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements
    Can we detect via code when the Switch is docked or undocked?
    No EDIT: Maybe No access rn but it seems like CONTROLLER(1) is 1 when the system is in portable mode. Seems like that should do it. Try it DEF DOCKED() RETURN CONTROLLER(1) != 1 END LOOP VSYNC CLS PRINT "NY"[DOCKED()] ENDLOOP
    Posted Edited by snail_
  • #324 ✎ 54 kantackistan
    No access rn but it seems like CONTROLLER(1) is 1 when the system is in portable mode. Seems like that should do it.
    Unfortunately that doesn't cover it. Controllers can be detached, even in portable mode.
    Posted
  • #325 ✎ 1053 snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements
    No access rn but it seems like CONTROLLER(1) is 1 when the system is in portable mode. Seems like that should do it.
    Unfortunately that doesn't cover it. Controllers can be detached, even in portable mode.
    Well, this at least tells you that the device is definitely being used in handheld mode as opposed to docked or tabletop mode. Consider that portable docks exist, and the two aren't so different anyway.
    Posted
  • #326 ✎ 54 kantackistan
    Well, this at least tells you that the device is definitely being used in handheld mode as opposed to docked or tabletop mode. Consider that portable docks exist, and the two aren't so different anyway.
    It's probably the best we can hope for, but it doesn't suit my purposes. Was aiming to detect what screen was being used, HDMI out or the Switch's screen. It seems the best I can hope for is to listen for touch input, shame there's nothing automatic though.
    Posted
  • #327 ✎ 46 incvoid Make it a menu option of some sort, let the user tell you the mode. Posted
  • #328 ✎ 46 incvoid
    Is there a "replace all" or "replace and next" button somewhere with the keyboard's search function? It would do me a number of favors...
    Shift+find is replace (and it does replace and next by default), but I'm not sure if there's a replace all.
    from find mode(CTRL+F, F3), hit TAB to get into replacement mode (CTRL+H), first line is the search, second is the replacement, one by one ENTER to replace, or CTRL+ENTER to replace all. saw it in the manual and remembered this post. Dunno if answered before. https://video.twimg.com/ext_tw_video/1153088256143060992/pu/vid/1280x720/HDlTEOrVAuf7osyA.mp4 didnt look for an onscreen keyboard version for replace all
    Posted Edited by incvoid
  • #329 ✎ 203 niconii Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies https://twitter.com/notohoho/status/1153616941539479552
    <Notice for the upcoming SmileBASIC 4.1.0> To begin with, we're making it easier to play. ■PLAYMENU ・Public works screen: Search by tag, sort order (order by recent popularity, newest works, or most recently updated) ・Local screen: A Button long press submenu (check for updates, delete, and jump directly to BASIC screen for the specified project) ■FILEMENU ・Tag setting feature when releasing a work
    Posted
  • #330 ✎ 1053 snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements
    https://twitter.com/notohoho/status/1153616941539479552
    <Notice for the upcoming SmileBASIC 4.1.0> To begin with, we're making it easier to play. ■PLAYMENU ・Public works screen: Search by tag, sort order (order by recent popularity, newest works, or most recently updated) ・Local screen: A Button long press submenu (check for updates, delete, and jump directly to BASIC screen for the specified project) ■FILEMENU ・Tag setting feature when releasing a work
    These are all great features. An option for automatic project updates would be great as well (even if it's just a prompt to update when you run it.) Something that's a bit interesting is that he hasn't mentioned the additional functions etc. that were missing and they claimed to be adding. I guess they aren't finalized since there isn't even a date and they just wanted to put this out there.
    Posted
  • #331 ✎ 54 kantackistan Can you disable the minus button from opening the on-screen keyboard while the program in a running? Can't seem to find that in the translated docs. Posted
  • #332 ✎ 20 BlackDrag0n23 Third Year My account is over 3 years old Website First Week Joined in the very first week of SmileBASIC Source Website Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Does anyone have any information on the international releases of SB4? I can't find anything and I'm getting so tired of the built-in help menu being Japanese.
    Can you disable the minus button from opening the on-screen keyboard while the program in a running? Can't seem to find that in the translated docs.
    I can't find it either, but I don't see why you would need it. iirc, you can't detect the minus button using BUTTON() anyways.
    Posted
  • #333 ✎ 228 the_squat1115 Minecraft Is Awesome! I love Minecraft! Express Yourself Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Video Games I like to play video games! Hobbies
    LOOP ENDLOOP
    There will be an alternative to WHILE and Label loops?
    Posted Edited by the_squat1115
  • #334 ✎ 54 kantackistan
    I don't see why you would need it. iirc, you can't detect the minus button using BUTTON() anyways.
    It's to prevent players from opening the keyboard and covering half of the screen.
    Posted
  • #335 ✎ 203 niconii Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies
    LOOP ENDLOOP
    There will be an alternative to WHILE and Label loops?
    Yes, it's an infinite loop. That means it can be used in place of either of these: WHILE TRUE 'code goes here WEND @LOOP 'code goes here GOTO @LOOP The only real advantages it has are being able to state your intent more directly than WHILE TRUE, and being able to BREAK and CONTINUE unlike GOTO @LOOP.
    Posted
  • #336 ✎ 940 random_god Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Video Games I like to play video games! Hobbies
    LOOP ENDLOOP
    There will be an alternative to WHILE and Label loops?
    Yes, it's an infinite loop. That means it can be used in place of either of these: WHILE TRUE 'code goes here WEND @LOOP 'code goes here GOTO @LOOP The only real advantages it has are being able to state your intent more directly than WHILE TRUE, and being able to BREAK and CONTINUE unlike GOTO @LOOP.
    yes I love while loops tho :(
    Posted
  • #337 ✎ 203 niconii Video Games I like to play video games! Hobbies Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Drawing I like to draw! Hobbies
    I don't see why you would need it. iirc, you can't detect the minus button using BUTTON() anyways.
    It's to prevent players from opening the keyboard and covering half of the screen.
    There's no way to disable it. That said, if they're opening the keyboard, they're probably doing it on purpose, so I don't see the point in disabling it. It's the only way (without a USB keyboard) to run a subprogram while your game is running, for instance, so it does have utility even if there's no reason to type in your game.
    Posted
  • #338 ✎ 1823 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself LOOP/ENDLOOP should be faster than @LOOP/GOTO @LOOP WHILE,FOR,LOOP,REPEAT,IF,etc. all use literal addresses to jump to, while GOTO has a pointer to a position in the name table, where the address of the label is stored. WHILE/REPEAT are still slower than GOTO because they have to check the condition, though. Posted
  • #339 ✎ 1053 snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements
    LOOP/ENDLOOP should be faster than @LOOP/GOTO @LOOP WHILE,FOR,LOOP,REPEAT,IF,etc. all use literal addresses to jump to, while GOTO has a pointer to a position in the name table, where the address of the label is stored. WHILE/REPEAT are still slower than GOTO because they have to check the condition, though.
    The interesting thing about that is for constant labels it's very easy to optimize in an absolute jump. In most cases a name table lookup shouldn't even be necessary. At least, you COULD, if you didn't allow jumping across slots.
    Posted Edited by snail_
  • #340 ✎ 1823 12Me21 Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Yeah it would've been simple to just make a second pass through the bytecode to replace label addresses when possible. The reason it uses the nametable is because if you have something like: GOTO @A @A with GOTO @A, it checks for @A in the table, doesn't find it, and so it adds an entry (but without an address set), and outputs bytecode using the position of that item in the nametable. then when it reaches @A, it finds that in the nametable so it fills in the address. But for some reason, even if the label is BEFORE the goto, it still does this. Posted
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19