123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|568|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Nintendo Gaming -> SmileBASIC4/Petit Switch

Page : 1 2 3 Prev 4 5 Next
Sun, 01 Mar 2020, 10:40
spinal
I do hope so
Sat, 11 Apr 2020, 16:27
Jayenkai
I've written 47 games, so far, (every week!!) so there's 5 weeks until the 1st anniversary of the Japanese release.

About a week ago, I unceremoniously posted a rather brief tutorial over at AGameAWeek.com
It's a very basic tutorial, going over the absolute basics, but were you to get hold of SmileBASIC 4, it might help you figure out enough to do, say a Pong, or something.

Figured I should post some waffle here, to accompany it.

Note about the quick-help. Hit F1 to bring up help for the current command, and scroll about using the onscreen up and down buttons (on the bottom right) since the keyboard/dpad doesn't seem to scroll properly.
Note that there are often multiple forms of a single command, which you'll access using the left and right buttons in the help file.
eg, SPSet tells you about all the different methods of using the command.
Can be a bit "engrish" at times, but you should be able to cope with it all. The code is in code, and since there's TONS of examples in the help file, that's all that really matters!


VSync is your framerate limiter doohickey, by the way.


Controls
Controller inputs are either port 1 to 4, or you can request "Port 0", which will always return values from any and all currently connected controllers, as if they're two joycons in handheld mode.
Buttons have fairly easy to remember names, once you get to grips with them.
Button(0,#B_LDown) is the down dpad button on the left hand joycon, whilst Button(0,#B_RDown) is the B button on the right joycon.
Similarly, Stick is used for the two sticks, 0,0 = left thumb, 0,1 = right thumb.
In all instances, replace port 0 with a specific port if you're doing multiplayer code.
If you want to do Vibrate feedback, play with ToyCon support, or use the IR Camera, then you HAVE to start using proper port numbers, instead of relying on the Port 0 shortcut.


Drawing

Colours are 32-bit ARGB values, which you can either code yourself, or make use of either the Color=RGB(128,255,0,0) (Bright red, half transparency) or Color=HSV(0,255,255,128) (Also red, half transparency)


You're able to "on-the-fly" define images/positions/rotations/recolouring for any/all sprites, but sprites are setup such that if you draw one, it'll stay there until you move it.
Sprite functions start with SP, eg, SPSet, SPOfs, SPCLS, etc
There are two forms of the SPSet command, one to say "Use spritesheet frame x" (where frames are 16x16 tiles), the other being much more complex, but allowing any size, and reading from a specified offset in the spritesheet. (You can also change the SPDef settings, too, but I've not fiddled about with that!)

In my framework, I've coded a "DrawImg" function that sets image/postion/etc of "the next sprite", then bumps up the spritecount by one.. At the end of my main loop, it passes through any leftover sprites and clears them out of the way, then resets "Next sprite" back to 0.
This has been absolutely effortless, and is all nice and silky smooth, but can get a little glitchy after about 2000 images per frame.
.. But that's 2000 images per frame!!! That's more than enough!


Primitive drawing occurs to a graphic layer, chosen by GTarget. By default, Layer 0. (Layer 4 is the spritesheet, and... yes.. you can realtime draw onto the spritesheet, impacting sprites in realtime)
All "Graphic Drawing" functions start with a G, eg GLine, GPSet (Point Set, plot!), GCLS, etc
For scrolling backgrounds, I've found it best to draw to Layer 1, then GCopy the scrolled area from layer 1 to layer 0, which should be in the screen.
This is probably dumb, but I haven't yet found a good way to scroll a layer.
... Having said that, the instructions are now all in English, so.. I should read up on that!!
You can also move layers atop each other, and shift sprites between layers too, but ... Again.. I haven't, yet!


Print/Text stuff occurs on another separate layer, within a grid, at a certain resolution, and in a single colour. If you need more advanced text stuff than that, have a read at the GPutChr function, which lets you write with the font onto the current Graphic Layer.
By default, Graphic Layer 0 is at the back, Sprites default to the middle, and Text goes in the foreground.

Audio

Sounds are played using the Beep command. Hit F9 and you'll be able to see a myriad of sounds that you can play, and each can be played with pitch, volume and panning.
BGMPlay plays the many pieces of music (also available in the F9 tool) or you can use MML to create your own music.


um... yeah, I think that's all the important stuff.

Kewlykewly!!

-=-=-
''Load, Next List!''
Wed, 15 Apr 2020, 16:47
Jayenkai
Linkage

-=-=-
''Load, Next List!''
Thu, 16 Apr 2020, 03:18
Jayenkai
Incoming!!!

23rd of April.
Next Thursday.
Mark it in your diaries.

-=-=-
''Load, Next List!''
Thu, 16 Apr 2020, 03:56
Jayenkai


It's in the eShop, and everything!!!
Next week!
Get your USB Keyboard at the ready! (USB if connecting to the Switch Hub, or a USB-C converter dongle thing if you want to use it in handheld mode)

-=-=-
''Load, Next List!''
Thu, 16 Apr 2020, 06:16
rockford
About fecking time!
Sun, 19 Apr 2020, 04:14
AndyH
Wooo! Looking very much forward to this.
Wed, 22 Apr 2020, 01:35
Jayenkai
They've uploaded a "QuickStart" form of the manual, in pdf format

https://sup4.smilebasic.com/en/doku.php?id=download

-=-=-
''Load, Next List!''
Wed, 22 Apr 2020, 03:11
rockford
That'll probably help once I get around to using it
Wed, 22 Apr 2020, 12:36
AndyH
What’s the deal with server tickets? IAP - how much? Any ideas?

It seems to say you have to buy them to download games?

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Wed, 22 Apr 2020, 12:45
Jayenkai
You need service tickets to upload, and they're an IAP of 10 at a time.
You CAN download, but only one project every 12 hours or so. Buying your first service ticket unlocks the full download-as-you-wish ability.
The service tickets should be relatively cheap, and you can reupload into an old slot, so even though it says "10", think of it more like reusing a floppy disk over and over. I've, obviously, had to buy a bunch of these over the past year.. I doubt others will need more than about 20 slots, total.


There should be two versions available in the eShop., one with a bundle of 10 slots, and one cheaper version without.
I apologise, but my system isn't telling me any prices. It knows it's the same app that I've already bought from the Japanese eShop, so is refusing to show me prices, and is just saying "purchased" everywhere!!

If you can see the prices, post 'em here!

-=-=-
''Load, Next List!''
Wed, 22 Apr 2020, 16:39
AndyH
Ah I see. The English translation describing them is not very clear. That sounds ok.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Thu, 23 Apr 2020, 01:54
AndyH
£5 per ticket. But two and number of slots increase to 10 per ticket. Can buy smile basic and a server ticket in a bundle but same price to buy separately.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Thu, 23 Apr 2020, 03:07
Jayenkai
Server Tickets clarification.

First purchase unlocks downloads completely.
ALL purchases give you 10 upload slots.

-=-=-
''Load, Next List!''
Thu, 23 Apr 2020, 04:08
AndyH
On the ticket description in the eshop it mentions buy two or more tickets and uploads increase by 10 per ticket. The English translations are interesting

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Thu, 23 Apr 2020, 04:24
Jayenkai
Expect a lot of engrish along the way.
Part of the charm

-=-=-
''Load, Next List!''
Fri, 24 Apr 2020, 09:39
Jayenkai
How's everyone getting on with this?
Any super-awesome results, yet?

-=-=-
''Load, Next List!''
Fri, 24 Apr 2020, 09:48
rockford
Ha Ha Ha!
Sat, 25 Apr 2020, 06:24
AndyH
Well I've been playing a couple of your games. Getting used to the interface. I like the sprite editor.

Huge apologies for a possible answered this already but is there a printable command reference somewhere? Also, is there a key or function to quickly jump to a procedure or subroutine label in the text editor?

BTW, I read your getting started.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Sat, 25 Apr 2020, 08:15
Jayenkai
I don't *think* the IDE does that. I might be wrong.. I had to figure most of this stuff out whilst it was all in Japanese! I really need to sit and read through everything properly

I've been using the F3 search for jumping about.
Use good names for variables, then hit F3 and type "f functionname"
Assuming you coded it as "Def functionname" then the f will pick that up.. Or you could be less lazy and type def, I suppose, but who does that!?! The f is quicker!!!


As for "printable", the whole thing is available, here, but this page in particular, is a huge list of all commands, along with examples for most.
It's kinda big!!

-=-=-
''Load, Next List!''
Sat, 25 Apr 2020, 08:32
AndyH
Magic. That helps a lot.
Sat, 25 Apr 2020, 09:11
Jayenkai
My second "OneScreen" tutorial* post is up. And, again, I've done a=a+1 instead of Inc a... old habits..

https://agameaweek.com/?Blog=9741


* don't learn from me!!

-=-=-
''Load, Next List!''
Sun, 26 Apr 2020, 05:12
AndyH
Useful to get started.

Here's random comments of state of play (for me) so far...

Managing slots - I'm getting confused. Somehow, I play Blockman Gets with wrong sprites. That 3D shooter that is popular stopped playing (I had to delete it and download again). Starting a new project from the File Operations menu brought over all the code (I was in the 3D shoorter) which I guess is useful. NEW command saves the day!

There are program slots - CTRL+0 - 5 keys let you change. That 3D shooter uses a P3D library in slot 4.

Found OPTION STRICT. This makes me happy.

Found can define my own CONST #THIS_IS_MY_CONSTANT = 1. This also makes me happy.

Found ENUM's.

Your two getting started guides are very useful for pointing in the right direction with the common commands I need to know about.

Next: I want to draw some sprites (instead of the strawberry) - need to figure out how and how to save?!

View so far: Pretty fun. Quirky.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Sun, 26 Apr 2020, 05:31
Jayenkai
F10 opens the image editor.

Also, why would you write THIS_IS_MY_CONSTANT instead of just 1?! Silly modern day coding! We don't want none of those crazy newfangled ideas around 'ere!!

To "just play" a game, open it from the "See Works" menu. Just tap on one and it'll open as it should do.
In the command line/direct mode, use the "Project" command to move to the project you'd like to code in.

-=-=-
''Load, Next List!''
Sun, 26 Apr 2020, 05:41
AndyH
Thanks. Very helpful, bear in mind I will make weird mistakes or just not get something that is obvious once you know - so appreciate the help (and patience)

Constants are good. 1 - what does that mean? 1 strawberry? Where I might use constants - player Id's, screen bounding boxes, speed, movement resolution modifiers. Can use variables right? Yep, but that's using memory. Use variables if it will change during the program, use constants when not. Constants good for changing a value once at the top and everywhere below updates. Also good for saying what 1 is, or not needing to do 240-8 for example in the main code, #LEFT_MAX_SCREEN might be better? Well that's how and why I use them.

And BTW, damn this SmileBasic - I should be coding my Vic 20 game ...

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Sun, 26 Apr 2020, 07:15
Jayenkai
I tend to use jscrw and jscrh for screen size. I wouldn't dream of making myself type anything longer than that in!!

-=-=-
''Load, Next List!''
Page : 1 2 3 Prev 4 5 Next