New SBS update is complete, follow updates here.

Nintendo Switch Discussion

Root / General / [.]

Anyway the Switch has a 64-bit processor so ints might also be 64 bits wide in SB now, if that means anything to you.
Can't wait until we reach 512-bit processors. That'll be a while.
pfft just skip that an go straight for quantum processors
How about something that's 6739986666787659948666753771754907668409286105635143120275902562304-bit?
must be as wide as the moon
I would want more

I've never seen it mentioned anywhere but HARDWARE is 3 on PiSTARTER, so Switch is likely 4 (assuming they use HARDWARE this time around.) Additionally PiSTARTER refers to its language as SmileBASIC-R (revision?) and is in multiple ways different from past versions (filesystem and input methods especially) so what this says about Switch is yet to be seen.

SmileBASIC-R R stands for Raspberry Pi lol

SmileBASIC-R R stands for Raspberry Pi lol
that's a fair thought but they also released SOLIDGUNNER-R (revision) alongside this thing so

SmileBASIC-R R stands for Raspberry Pi lol
that's a fair thought but they also released SOLIDGUNNER-R (revision) alongside this thing so
PiStarter does have additional features though, like HTTP support, so maybe it is a revision.

FUZE delayed again until May 31st 😈 https://youtu.be/8iiJlJ-dKDk However, they did release this preview video and while I only skimmed it, some of what I saw might give SB a run for its money (full 3D with light/shadows...)

They delayed AGAIN!! Insert angry cursing and muttering here. That thing is about a year late now. They are treading into Duke Nukem Forever territory. I have a favor to ask, my eyes are old and my mobile data connection very slow making YouTube blurry at best. Can anyone watching the video spot if the code looks like the PC/Pi version or if they really have changed it significantly. They were acting like the switch version was going to be more like Python. I hope they at least added classes, and gave sprites a z order. I was counting the days to get it. It is why I bought a switch. What are the odds of SmileBasic Switch beating it to market?

I'd say it's more similar to a C like now but I only looked superficially

The list of builtin functions looks like it was the result of someone saying "Ok quick write down a bunch of functions that sound useful!"

analysis (from chat logs) Yttria[19:06]g: First scene: Why are we looking at C code? Yttria[19:06]g: except it's C in a BASIC-like shell Yttria[19:06]g: *pasted into 12Me21[19:06]g: HolyC lol Yttria[19:06]g: It's dave here 12Me21[19:07]g: uh first job to do is check if the video of typing is real Yttria[19:07]g: we keep adding improvements == oh shit there's so much to add to the editing environment before it's usable 12Me21[19:07]g: like maybe they're just playing a video on the switch and the person is pressing random keys Yttria[19:07]g: typing looks real Yttria[19:08]g: I see array literals randomous[19:09]g: why is this in his house Yttria[19:09]g: setmode(1280, 720) array plr[4] = [.fwd = {}, .rgt = {}, .data = [], .newData = [], .colour = {}] array fire[20] = [.active = false, .fwd = {}, .scale = 0, .pos = {}, /vel = {}, .dist = {}, .speed = {}, .dt = 0] 12Me21[19:10]g: array[4] has 5 items lol what Yttria[19:10]g: maybe it's 4 of that object....??? 12Me21[19:10]g: lol imagine typing SETSPRITEROTATIONVELOCITY Yttria[19:11]g: http://kland.smilebasicsource.com/i/mklvm.jpg Yttria[19:11]g: keyboard is still a mess but not as bad as before Yttria[19:11]g: >delete is next to RArr ww 12Me21[19:12]g: hmm what are {} and [] 12Me21[19:12]g: why are structs? written in [] randomous[19:12]g: ok so wait: does fuze have like an official community or something Yttria[19:12]g: nope 12Me21[19:12]g: they haven't released any information about the language until now, as far as I know randomous[19:12]g: i bet there is one somewhere Yttria[19:12]g: a few people on twitter maybe Yttria[19:13]g: schools that they keep pushing this on Yttria[19:13]g: maybe check reddit? Yttria[19:13]g: http://kland.smilebasicsource.com/i/qxzht.png Yttria[19:13]g: update() to refresh display?? Yttria[19:13]g: lol Yttria[19:14]g: http://kland.smilebasicsource.com/i/pzzzv.jpg 12Me21[19:14]g: I mean it's a more reasonable thing to do , I guess but pretty lame and annoying Yttria[19:14]g: when ur example code isn't even finished 12Me21[19:14]g: probably VSYNC + all the things SB does automatically per frame Yttria[19:14]g: also yeah holy crap Yttria[19:15]g: GETSPRITEROTATIONVELOCITY Yttria[19:15]g: what is that in sb Yttria[19:15]g: I mean no actual analog but 12Me21[19:15]g: SPROTV Yttria[19:15]g: SPROT OUT ,,VEL 12Me21[19:15]g: would be probably Yttria[19:15]g: *SPROT ID OUT ,,VEL 12Me21[19:15]g: it's weird because umm 12Me21[19:16]g: hmm Yttria[19:16]g: http://kland.smilebasicsource.com/i/gzgqu.png Yttria[19:17]g: I bet it doesn't even show you the color theme or keyboard style Yttria[19:17]g: have fun going through every single one 12Me21[19:17]g: it does 12Me21[19:17]g: oh hmm 12Me21[19:17]g: well just on the buttons 12Me21[19:18]g: but anyway all of these minor things are whatever 12Me21[19:18]g: the real question is is any of this real? 12Me21[19:18]g: does the language actually work 12Me21[19:18]g: how slow is it? 12Me21[19:18]g: etc. randomous[19:18]g: lolol Yttria[19:18]g: http://kland.smilebasicsource.com/i/iakex.png randomous[19:18]g: 12me asking the real questions Yttria[19:18]g: drawObjects() update() 12Me21[19:19]g: maybe they did something evil like transpile the code to C or Lua or Python or something and then just stole an existing interpreter/compiler randomous[19:19]g: all these assets look like dlc Yttria[19:19]g: this is the power of your nintendo switch: Yttria[19:19]g: http://kland.smilebasicsource.com/i/tatza.png 12Me21[19:20]g: the fact that they've shared so little information is suspicious, I think Yttria[19:20]g: okay but we DID get the full instruction list, finally 12Me21[19:21]g: well except the instruction list looks nothing like the example code, maybe [funmodule][19:21]g: snail_ that image is literally sim.3d box o gems with better graphics Yttria[19:21]g: right Yttria[19:21]g: STRINGHASH 12Me21[19:22]g: any language without a 1 char print statement is automatically worse [funmodule][19:22]g: snail_ considering what we know about sb switch it's very possible we could just build an environment close to fuze in features some point after launch tbh [funmodule][19:23]g: snail_ if there's 3d support or sim.3d gets super good we could totally make a 3d asset browser like they have Yttria[19:23]g: the FPS starts wavering at 457 flat shaded(?) 24-gons Yttria[19:23]g: 24-hedrons I mean Yttria[19:23]g: ok what is the "dynamic 3D terrain" thing [funmodule][19:23]g: snail_ also all these hilarious long getter functions Yttria[19:23]g: because that's obviously a program and not like Yttria[19:24]g: a built in feature Yttria[19:24]g: and the caption doesn't even make sense 12Me21[19:24]g: doesn't the language supposedly have structs or something why does it need separate functions for every sprite attribute Yttria[19:24]g: I like to think that "1600 shapes" means that you can only draw 1600 different shapes Yttria[19:25]g: and then some models that they got an artist to make for their downloadable assets [funmodule][19:25]g: snail_ sprite objects are probably a lie and they all live in the interpreter Yttria[19:25]g: is it just me or does that asset menu slow down trying to scroll [funmodule][19:26]g: snail_ I was thinking the same thing 12, just use structs or like a computable property [funmodule][19:26]g: snail_ but the fact that DRAWALLSPRITES exists means they probably cant do that 12Me21[19:26]g: at like 4:52 it looks like the animations are slowing down 12Me21[19:26]g: too much alpha compositing xd Yttria[19:26]g: ugh I don't want to see menus Yttria[19:27]g: struct moves 12Me21[19:27]g: wait hold on what's this 12Me21[19:27]g: variable types 12Me21[19:27]g: oh it's in a struct hmm Yttria[19:27]g: vector isn't a built in type Yttria[19:27]g: umm wait Yttria[19:27]g: "array sequence[0]" 12Me21[19:28]g: I bet they don't even have struct or array literals just initializers or whatever maybe Yttria[19:29]g: you can see more code before the keyboard comes in 12Me21[19:29]g: oh also remember you can use < and > in youtube to skip forwards/backwards 1 frame [funmodule][19:29]g: snail_ this is the sbs version of smash bros trailer analysis Yttria[19:29]g: there's a float animlength and float animframe with no assignment and an int animID with no assignment Yttria[19:29]g: we're supposed to believe that this is the program for the robot demo that follows Yttria[19:30]g: struct segment is terminated with 'endstruct' Yttria[19:31]g: I bet setupBranding() is an internal function 12Me21[19:31]g: http://kland.smilebasicsource.com/i/kmvxl.png Yttria[19:31]g: hmm also why isn't brand being passed as an argument to it Yttria[19:31]g: have we seen any functions taking arguments? 12Me21[19:31]g: person doesn 12Me21[19:31]g: oops 12Me21[19:32]g: this person is using a struct as an enum for some reason Yttria[19:32]g: oh you're right Yttria[19:32]g: for the animation states 12Me21[19:32]g: have we seen any user defined functions Yttria[19:32]g: okay there are function calls in the instruction reference examples but those aren't convincing 12Me21[19:33]g: anyway this is literally just C without brackets or semicolons Yttria[19:33]g: (for reasons you stated earlier) Yttria[19:33]g: yeah Yttria[19:33]g: oh there wsa printat(20, i, "Hello World") in the first example screen 12Me21[19:33]g: no idea what "array sequence[0]" is Yttria[19:33]g: yeah what does that even mean Yttria[19:33]g: why is array a type identifier 12Me21[19:34]g: I mean maybe arrays are types 12Me21[19:34]g: a type Yttria[19:34]g: but who specifies them like that [funmodule][19:34]g: snail_ Struct? They stole myidea 12Me21[19:34]g: it's just an array of arrays with length 0 Yttria[19:34]g: lol Yttria[19:34]g: I don't see any global var initialization with types 12Me21[19:34]g: so I assume that means you can resize it? or replace it with a non empty array Yttria[19:35]g: obj = placeObject(cube, {0,0,0}, {2,2,2}) 12Me21[19:35]g: they should've wrote array sequence[] though I'm pretty sure Yttria[19:35]g: light = pointLight(...) Yttria[19:35]g: x = 0 Yttria[19:36]g: there's no scrollbar on the instruction reference Yttria[19:38]g: there's something weird at 1:54 12Me21[19:38]g: example not even finished lol Yttria[19:38]g: the 2D graphics instruction list fades in for 4 frames, Yttria[19:39]g: then the command reference top level menu appears and fades out for 8 frames as the 2D graphics list is desplayed again Yttria[19:40]g: but the listing shown from the top level frames is for CREATESPRITE() 12Me21[19:40]g: clearly spliced 12Me21[19:40]g: speedrun disqualified Yttria[19:40]g: which is not selected in either the before or after 2D lists Yttria[19:40]g: and doesn't match the selection of "Command reference" in the ghost frames Yttria[19:41]g: double forward slash for comments, according to ghost CREATESPRITE page 12Me21[19:41]g: http://kland.smilebasicsource.com/i/ecect.png auceps[19:42]g: are they using the same example for every entry randomous[19:42]g: it's easy to fork a C compiler randomous[19:43]g: bet they just forked it and changed the lexical analysis randomous[19:43]g: or did it the right way and changed syntax rules Yttria[19:43]g: Edit Program Info Set As Default Program Copy Program Delete Program Share Program Yttria[19:44]g: I found a global scope array declaration with the type Yttria[19:44]g: 2:47 Yttria[19:44]g: array az[38] = [.id Yttria[19:45]g: the time stamps are weird Yttria[19:45]g: Created: 01/14/2018 Yttria[19:45]g: Modified: 01/26/2018 Yttria[19:45]g: (they're weird on SB4S ""screenshots"" too though) 12Me21[19:45]g: ok I subtracted the frames and got the help page for createsprite 12Me21[19:45]g: http://kland.smilebasicsource.com/i/xuvfe.png Yttria[19:46]g: from an images randomous[19:46]g: nice Yttria[19:46]g: hmm Yttria[19:46]g: I can't tell if vectors are built in or not 12Me21[19:47]g: better: 12Me21[19:47]g: http://kland.smilebasicsource.com/i/eidtv.png Yttria[19:47]g: a lot of these functions, like... Yttria[19:47]g: seem to imply that? Yttria[19:47]g: since they're not typed Yttria[19:47]g: but also array and vector weren't highlighted like int and flat Yttria[19:47]g: *float 12Me21[19:48]g: extracted from http://kland.smilebasicsource.com/i/ennof.png Yttria[19:49]g: in the kart racing demo Mph is displayed as a decimal but only takes whole number values for some reason 12Me21[19:49]g: actually having functions to get the screen size is nice 12Me21[19:50]g: though why is it lastpos = {gwidth()/2,gheight()/2} and not just lastpos=gsize()/2 lol Yttria[19:50]g: the camera in the kart racing demo seems weird to me 12Me21[19:50]g: they have the != operator working on vectors so I assume / should work too 12Me21[19:51]g: anyway these are just minor complaints 12Me21[19:51]g: I still think the entire thing is a lie Yttria[19:51]g: the command list can't decide whether to call trig inputs are "arguments" or "numbers" Yttria[19:52]g: SIN returns the sine of the supplied argument. SINCOS Returns the sine and cosine of the supplied angle. SQRT Find the square root of the specified number TAN Returns the trangent of the supplied argument. Yttria[19:52]g: It also can't decide whether to end descriptions in a fullstop or not Yttria[19:53]g: FLOAT/INT refers to input as "value" 12Me21[19:53]g: ok but neither can we 12Me21[19:53]g: lol Yttria[19:53]g: HIDEKEYBOARD Show or the virtual keyboard SHOWKEYBOARD Show or the virtualkeyboard [sic] Yttria[19:54]g: *virtual keyboard 12Me21[19:54]g: anyway if SB on the switch doesn't have a key you can press to instantly end the program, I'm not buying it lol Yttria[19:54]g: SETPAN Change the audio stero [sic] position 12Me21[19:54]g: lol 12Me21[19:54]g: I wonder if the audio system sucks Yttria[19:54]g: TWIDTH Find the length of a string or array Yttria[19:54]g: well it doesn't have MML 12Me21[19:54]g: it's probably just going to be playing MP3s or something lame Yttria[19:55]g: just wave audio and individual notes 12Me21[19:55]g: no custom music unless you're a professional I guess Yttria[19:55]g: SLEEP Go to sleep Yttria[19:55]g: uhh wait how do you get a time value? Yttria[19:55]g: you can set start and stop Yttria[19:55]g: but Yttria[19:55]g: maybe it like Yttria[19:55]g: registers a variable to be automatically updated
Edit: the code scroll at the beginning is an oft-used sample from the linux kernel: https://github.com/torvalds/linux/blob/master/kernel/groups.c

Thanks for the clear screen shots and the chat analysis. I don't see anything z order based for sprites but the associative array type setup and struct keyword look promising. Maybe I can actually build a binary tree without creating a custom allocator. Hope they have push/pop/unshift/shift or similar. I wanted to play around with BSP trees. I hope the 3d engine isn't too constrained and that we can build or import our own 3D content. Here is hoping it is a bit like open gl instead of direct3d retained mode. The code looks mostly the same as the pc/pi version. Guess I shouldn't have put the book project on hold. Still have the same goofy loop repeat setup, and spectrum based ink/paper commands. I bet it is still RgbColour instead of just RGB too. I would also bet the pixel coordinates are still upside down from the norm too with 0, 0 at the bottom left.

Something strange: I believe the last line says vector pos[10][... We've seen array name[size] = ... before, and I think that's just a regular array no idea what the vector type means there. Anyway, It seems like { ... } is a vector literal, while [...] is an array or struct literal. You can see {x,y}, {x,y,z}, and {} in the screenshots. It appears that they're using 3D vectors to store RGB color values too. Interestingly, there seems to be little distinction between arrays and structs (probably they're both pointers), while vectors get their own symbol. array plr[4] = [.fwd = {}, .rgt = {}, .data = [], .newdata = [], .colour={}] I think data and newdata are pointers to either an array or a struct while the rest are the special vector type which is probably 3 double precision floats

I thought they were doing something like Javascript Object Notation (https://en.wikipedia.org/wiki/Json).
let person = {
  "firstName": "John",
  "lastName": "Smith",
  "isAlive": true,
  "age": 27,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  "phoneNumbers": [
      "type": "home",
      "number": "212 555-1234"
      "type": "office",
      "number": "646 555-4567"
      "type": "mobile",
      "number": "123 456-7890"
  "children": [],
  "spouse": null
It could also be some sort of struct initializer. So for instance, in GO you can do something like this:
package main

import "fmt"

// Position class for a two dimensional point on a cartesian xy grid.
type position struct {
	x float32
	y float32

func main() {
	q := position{4, 2}
	fmt.Println("x :=", q.x, "  y :=", q.y)

That makes a position struct and initializes the x and y with 4 and 2. So if you had a vector struct like
struct vector3
 x as double
 y as double
 z as double
end struct
maybe you could create and initialize one with something like :
Dim x as vector = {1.0, 2.0, 3.14159}
Of course that is all conjecture/wishful thinking and is probably at least half wrong.

What kind of FREEMEM size should we expect on the switch?

What kind of FREEMEM size should we expect on the switch?
Any kind of number I can give would be a literal wild guess, so "more, at least 64MiB."

New FUZE video: https://www.youtube.com/watch?v=wSPyWUhmM1o awful single line IF statements require ENDIF.... not sure how user defined functions work... function name() ... return void? how would you return in the middle of a function? Maybe user defined functions are just like GOSUB subroutines in SB (but maybe with arguments and a return value). If there's no function ending keyword, it wouldn't possible to tell which code is inside the function, so there can't be local variables.

If I remember right, functions in the pc/pi version on fuze basic ended with = and the return value. Looks like it got upgraded to the return keyword. They did allow local variables and recursion so it wasn't just a dressed up gosub. Hopefully it is smart enough to say a return outside of a loop or conditional by itself on a line is the end function marker. If not then we are stuck with single exit point functions which are annoying but not that bad. I am hoping we can feed the 3d engine arbitrary geometry, and not just prefab shapes and models. My real question is what on Earth are they doing still adding features this late in the process, they should be in bug fix only mode. I foresee another schedule slip. What they really need to add is allowing us to save and load to/from a share on the sd card or no one will ever be able to share programs reasonably, and the whole thing dies on the vine.

If I remember right, functions in the pc/pi version on fuze basic ended with = and the return value. Looks like it got upgraded to the return keyword. They did allow local variables and recursion so it wasn't just a dressed up gosub. Hopefully it is smart enough to say a return outside of a loop or conditional by itself on a line is the end function marker. If not then we are stuck with single exit point functions which are annoying but not that bad.
Oh, I hadn't thought about that. I guess it wouldn't be ambiguous, since a return outside of any conditional blocks will always end the function anyway. hmm... Lua does a similar thing, throwing an error if there is any code after return in a block. (But rather than being caused by the syntax itself, it's supposedly meant to prevent bugs) However, it's a huge pain when you're testing things and just want to skip all the code in a function. The same dumb trick of using if true then return endif will probably work, though.
My real question is what on Earth are they doing still adding features this late in the process, they should be in bug fix only mode. I foresee another schedule slip.
I suspect that it's probably nowhere near finished yet, given all the delays and the small amount of information that they've released.

https://twitter.com/notohoho/status/1111129926315339776 It seems user-defined constants are real?

It's interesting how I can watch the Fuze video show off 3D models and structs and all this stuff and go "Yeah, that's cool, I guess," yet show me user constants in SmileBASIC and I go "OH SHIT"