123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|374|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Nintendo -> Petit Switch

Page : 1 2 Next 3 4
Prev
Posted : Sunday, 17 June 2018, 06:13
Jayenkai

Petit Switch


Google Translate

Scheduled for a Fall release, in Japan.. no idea if it’ll be here, though it does state "sales area : Japan", so.. hmm...

Release Date for Japan, 23rd May 2019
Release Date for US/UK, currently unknown.

-=-=-
''Load, Next List!''
Posted : Sunday, 17 June 2018, 09:45
spinal
Cool!
Posted : Sunday, 17 June 2018, 16:20
rockford
SMILE Basic took forever to come to the 3DS, but it did in the end. I suspect Petit Switch will be the same.
Posted : Friday, 17 May 2019, 02:56
Jayenkai
Hmmm..

https://petc4.smilebasic.com/

https://twitter.com/notohoho/status/1129308645265592330

Next week..?



Bah, humbug!!

-=-=-
''Load, Next List!''
Posted : Friday, 17 May 2019, 05:37
rockford
I guess the original "Fall Release" was a tad optimistic for Japan. Maybe we'll at least get it this Autumn. I doubt it, but we might
Posted : Friday, 17 May 2019, 06:08
Jayenkai
...
So.. Um.. I've set up a Jap-Account on my Switch..

Signed up to My.Nintendo.Com with a different email address, (used AL's email), then simply added a new user account to the Switch with that Nintendo Account.
Nothing broke. *phew*
I know others have done this in the past, and it's fairly common, but.. I know how often simple things completely fuck up for me!!

I seem to be able to access the Japanese-eShop just fine, but haven't yet attempted to add funds to the account.
Will wait until next week, and .. Guess we'll see if that works!!

-=-=-
''Load, Next List!''
Posted : Friday, 17 May 2019, 06:58
rockford
I have accounts for nearly all regions. Easy.

Word of warning though - You'll soon get pissed off with loads of adverts on the Switch and emails from each region, most of them very similar.
Posted : Monday, 20 May 2019, 05:18
Jayenkai
Been Amazon-Shopping!!


Keyboard and Mouse
Cheaptastic "iChoose" brand. Amazon Link
It's an OK'ish keyboard. Not very "tappy". Very cheap. The mouse also feels like it's probably going to break fairly soon. If I find myself using the keyboard and mouse a lot, I might upgrade them to something a little less. .. um..
But given I haven't had to own a keyboard/mouse combo since about 2012, I don't actually own a USB Keyboard anymore! All my keyboards are now Bluetooth. (The one I use for my MacMini is in fact the Bluetooth keyboard that came with Pokemon Typing!!)
My only USB Mouse, meanwhile, is connected to the Amiga, but after years of none-usage, all the rubbery grip stuff has become that horrible sticky gooey crap.. Eeeuww..
So.. Yeah, new keyboard and mouse.

Lenovo USB Hub
Has a few USB ports, and connects to USB-C Amazon Link
I'm currently hoping that I can use the Switch undocked with a keyboard shoved up it's arse, whilst using Petit Switch, rather than having to keep it plugged into the downstairs telly, where the Dock is, in order to use it.
I grabbed a USB Hub, not even really knowing if the Keyboard and Mouse will connect to it at all, but thankfully, they do at least hook up!!


The keyboard navigates all the menus, and can be used to type.
The mouse ... Well, at least it lights up!! No idea on whether it works, as apparently the only "test" thing is Fortnite, and they can fuck off if they think I'm downloading that bucket of crap again!!

So, yeah, seems like the combo might work, but... will Petit Switch work, whilst undocked?!

3* USB-A to USB-C dongles
I bought these in case the Lenovo Hub doesn't work with the Switch.
Amazon Link
Plus, I figure these will actually come in handy for many things, since I also have a Samsung Galaxy Tab that uses USB C.


Cost so far : £33.88

-=-=-
''Load, Next List!''
Posted : Monday, 20 May 2019, 06:06
Jayenkai
Found a nice Famitsu article. https://www.famitsu.com/news/201905/20176399.html

(Google translated)

It supports USB keyboard mouse
A beginner's guide equipped with interactive teaching methods from keyboard input and editing
You can list the published works in order of popularity and download the works
Metadata function that allows you to add your own icons and descriptions to your published work
Evaluation function to put "Like" to your favorite work
Favorite function that you can register your favorite work on the top screen and start immediately
Customizable function assignment of USB keyboard and controller button
Update function of published work (can be updated while maintaining the public key and the number of likes)
You can download the petitcon 3 public key (you can load the program and data created with petit 3 but you need to change the program to execute it because the instructions are incompatible)


強化 Enhancements to SmileBASIC Ver. 4

Reconfiguration of language specification and instruction set
Error message refinement and localization
Any screen resolution from 128x128 to 1280x720 can be used
Expand the number of colors that can be handled from 16 bit color to 32 bit color
Expanded graphic screen size to 2048x2048
Special effects such as blur and mosaic
Significant expansion of image materials
Enhancement of sound material (embedded SE, BGM expansion, GM sound source brush-up, drum set greatly expanded)
Joy-Con, HD vibration, motion IR camera support
Toy-Con support (piano, house, fishing, bike, robot)
Multi-interpreter (simultaneous execution of multiple programs)

Detailed information
Product name Petitcon 4 SmileBASIC (petitcon Four Smile Basic)
Release date May 23, 2019
Sales form from Nintendo e-Shop Download as software dedicated to download
Price 3000 yen (including tax, one server ticket included)
number of players 1 to 4 people
Sales area Japan

-=-=-
''Load, Next List!''
Posted : Monday, 20 May 2019, 08:51
rockford
Sounds good and looks like you're all set and cooking on gas
Posted : Wednesday, 22 May 2019, 09:06
Jayenkai
PetitCon4 is out.
PetitCon4 is on my Switch!!
Posted : Wednesday, 22 May 2019, 14:07
Jayenkai
Copy+Pasted from AGameAWeek
-=-=-

Today marks the initial Japanese release of Petit Computer for Switch (PetC4) and .. well, I'm a coding addict, so you know I HAVE to at least get SpikeDislike up and running.

There's a few stumbling blocks.. well, one, really, and that is that I don't know any Japanese whatsoever.

I'm going to be relying heavily on Google Translate's "camera" functionality, which lets you translate text in real-time. It isn't perfect, but I'm hoping that I can use it to navigate my way through most of the menus that the interface is going to have.

Between that and my own decades worth of coding, as well as my previous experience with both the DSi and 3DS versions of SmileBASIC, I'm fairly confident that I should be able to get the basics of the game up and running.

At the end of the day, the code will still be just that. Traditional BASIC, which thankfully tends to be in English'ish. Commands, variables and symbols are pretty much a constant in the world of code.
.. usually!
There may be a few pratfalls, and I'm hoping that if there are, I can manage to avoid them.

But other than that, I'm going to be going into this blind, and .. honestly, I've no idea how well it'll go.

Although I'll try to remember to take screenshots and the like, and try to help fellow coders understand what they're doing with Petit Switch, please don't consider this to be a tutorial.
If you're going to attempt to use Petit Switch without understanding coding basics, this won't help you. This is more a guide to the software, than a tutorial of how to code.

Preparations/Setup


Before buying Petit Switch, I ensured I had everything necessary.
A USB keyboard and mouse, along with a USB-C hub to hook them up to an undocked Switch, were all purchased.


Exact items purchased and Amazon links are available in this post.

The USB-C hub might not be any useful to you, but I typically tend to sit in bed at night, coding, and the Switch hub is downstairs connected to the telly!! So.. um.. yeah!
The USB hub works great for hooking up the keyboard and mouse to the Switch, without the thing having to be docked.


Next, I added a new Nintendo Account to my Switch. Using the Nintendo website, I registered anew with a secondary gmail account, ensuring the Nintendo Account was set to Japanese. Then I added that account in the Switch, and from now on if I open the eShop, I can select between my English Account, or my Japanese one, to navigate to the two different eShops.

After that, I needed some cash in my Japanese Account. Heading to Play-Asia.com, I bought a 5000 Yen card for £40. (Petit Switch costs 3000 yen, which works out at around £25.)
Play-Asia sent over the eCode via email, and I typed that into the Japanese eShop Account on the Switch. This was a LOT easier than I expected it to be!! Bravo, Nintendo!

After that, a simple purchase of Petit Computer, and then waiting for the download...

Learning to Navigate


The first thing I did was try to figure out the interface.
The top menu has a set of 9 buttons that you can (I'm guessing) set to your favourite projects, then on the right are six main menu buttons.



The middle right button is File Management, if you go in here, you get to the "New Project" button.



Hit that, then "edit the project information" to give the project an icon.

You can also edit the Title and Memo (description?) on the top right.
At any time, hit the Switch's (-) button to bring up an onscreen keyboard, or.. .. plug in a USB, instead!

Don't forget to save, then head back to the main menu.

Next, head to the upper right.
I'm not 100% sure that this is how things work, but click on your new project, and hit A. I *think* that selects it as the current project.
It'll try, and fail, to load anything at this point, since there's no Main.prg to load.



Back in the main menu, the bottom right button launches the code interface.
Hit X to flip between "direct" and "code" modes..
(Direct = type commands and they execute immediately, whereas Code is for .. um.. coding!)



You should see a default Hello World style program, which opens a dialogue, and then not much more.

Toggle back to Direct mode and type Save "Main.prg", which will save the program to your new project.

Head back out. (Hit The Switch's - button, then the pink Home button on the onscreen keyboard.)
On the main menu, we'll head back to the topmost projects button, select our project and hold down A, then choose the topmost "favourites" option, which will add your icon to the program's home screen buttons.



Job done!

Now, back to the code side of our project.

Shortcut Combos


A couple of quick keyboard shortcuts.
If you're familiar with most recent languages, those should be fairly familiar.

Ctrl-S saves
F5 runs your code
Ctrl-C breaks execution

F1 is help. Hitting this whilst the cursor is over a command will bring up the quick help for that command, and can include examples, or much needed information.

F7 switches to Edit mode whilst F8 switches to Direct mode, whilst F4 will toggle between the two.

F3 is find, useful in Edit mode.
F2 will zoom in on the editor, which is handy when you're looking at the switch in handheld mode, and it's behind the keyboard!

F9 brings up a list of sounds, music and other audio things. This will come in handy later!
F10 brings up the sprite editor! Also handy!!

... that oughta be enough for now.

Buttons


The Button() function seems to do an awful lot!
Type the command and F1 it, to bring up a chart of all the different buttons that it can analyse, as well as the option to either detect "Is held" or "Is pressed".. An important distinction!
For now, I'm using #B_RRIGHT for the A button and #B_RLEFT for the Y button.
A to start, and move the ball.
Y to quit back to the menu.

The button code can also detect all kinds of buttons, but not the thumbsticks, so I'll need to look into that, later.

Arrays


In this language, we need to define our arrays using DIM VariableName[LengthOfArray], then dumping values in and out using simple functionality. Remember to use square brackets to work with arrays.
The arrays are zero based, but I think they also include the top-value, but don't quote me on that!!

Sprites


Hitting F10 brings up the sprite editor. I'm currently unsure how to create a clean image, so we'll first use the scrubber to scrub out a bunch of stuff, then draw some spikes and ball, and lastly save the file.
This didn't go well for me, as I appear to only be able to "plot" a 4x4 square, and that takes AGES since the spritesheet is bloomin' huge! I'm left with tons of "mess" in my spritesheet..

Don't forget to save, often..!
Also, the interface is a little glitchy, so you might end up drawing "through" the GUI, where your mouse pointer's slightly missed the button.. I've done this a number of times.

Once saved, you can load the spritesheet in your code using Load "filename",4
4 seems to load into the Sprite buffer.
0 loads to the background, so I'll have to use that for stars and floor, later.
I'm not sure if you can change these layers. I'm sure you can, but.. *shrugs*

Set a sprite's sprite number with SPSET n,ImageNum. You NEED to set a sprite number BEFORE moving the sprite, otherwise the code will crash with an "unknown sprite" error.
There are more complex SPSET functions for exact co-ordinates, but by default it seems to be assuming each sprite is a 32x32 pixel chunk of data from the Spritesheet, running horizontally.

SPOFS n,x,y will move the sprite to the specified location.
As mentioned above, be sure you've created the sprite with SPSET first.

With all of these elements in play, you should hopefully find that you can now run a nice loop, navigate between Game and Not-Game/Menu, as well as move various sprites around on the screen.

Twitter Video


Now I need to stop, as the Switch (It's undocked, in handheld mode) is whinging that the battery needs charging.

Boooo!!

In my next session, I'll see about getting the background layers working, then add some simple collision, before tackling the scoring.
With any luck, I should be ready to upload the game to the Petit Switch online server, some time tomorrow.

-=-=-
''Load, Next List!''
Posted : Thursday, 23 May 2019, 00:49
rockford
I had a lot of fun with the original release on the DS. Bought the app on the 3DS nd never touched it. I hope to get back to coding (on some format!) soon, so I can easily wait for the official English version.

But Spike Dislike on Switch. Good stuff!
Posted : Thursday, 23 May 2019, 01:19
Pakz
@jay
nice post you made here, very enjoyable read!

They sell powerbanks for extra battery life. I have one with 10.000 mah that cost me 20Euro. Not sure if this is possible with keyboard connected though and if/with hub.
Posted : Thursday, 23 May 2019, 04:59
Jayenkai
Powerbank's no good as the keyboard and mouse is plugged in.
I would attempt plugging a USB charger into a spare socket on the hub, but I'm not sure if a USBA charger will send a charge through a USBA hub to the USBC socket..!!
Anyone?
I know some Switches have been killed with dodgy chargers, so I don't think I'm willing to try it, right now!!

-=-=-
''Load, Next List!''
Posted : Thursday, 23 May 2019, 05:15
AndyH
Sounds very interesting. I will have to read the above in full after work. My son is learning Japanese as it happens and can read a lot but i think I’ll wait for a uk release to avoid all that set up. So this is capable and fast enough to make reasonable games?

-=-=-
Andy H
A cartoon a day at awful.ovine.net
8-bit games at hewco.uk
Posted : Thursday, 23 May 2019, 06:33
Jayenkai
WAAARRRNIIIIIIING

If you set up a Japanese account to download Petit Switch, be absolutely sure that you continue to use the Japanese account when coding your game.

DON'T do what I did, and go "Well, it works in my Jayenkai account.. I'll carry on with that"

Because, when you go to upload your finished game, you hit a great big wall..
The account you bought it with gets (I think) 10 "Upload" slots.
You can "purchase Slots" for other users.. .. Except my default account can't do that, because it can't access the Japanese eShop, so can't upload ANYTHING!!!

*screenshots the entire code, and prepares to 1980's style "Type-in" type it all back in again, using the other account.

...
FFS..

-=-=-
''Load, Next List!''
Posted : Thursday, 23 May 2019, 08:45
Jayenkai
Ok, the entire thing was retyped, and all the sprites redrawn.. what a pain in the arse that was!!

The game can be downloaded using the Public Code 424JQK3NJ



Head into the top right projects thing, then hit R twice to access the Online games, then hit X (iirc!) and enter the PublicCode.

Job done!

SPIIIIIiiiIiike!!!

-=-=-
''Load, Next List!''
Posted : Friday, 24 May 2019, 09:57
Jayenkai
So, today I wrote a basic minimal Framework in PetItC4 with simple enough functionality, but hopefully enough to allow for lots of variety in future projects.

I've added a basic DrawImg thing, along with my usual set of SetCol, SetAlpha, SetSize and SetRot commands.
I've created a sprite loop to draw sprites when required, and blank out any unused sprites at the end of the loop.
I DID originally try adding a SPCLR (clear all sprites) at the top of the loop, but that flickered horribly. You're not meant to do it like that
A little optimisation and things seem to be running smoothly.

Findings

Sprite ZOrder
Sprites with a lower ZOrder draw on top.
You can specify the ZOrder using SPDef x,y,z where x,y are obvious, and Z is between 4096 and -4096, with the lower value being "on top"

By default Sprite 1 is above Sprite 4000, so "normal" drawing needs to be done with their sprite values set to reverse. I.e. since I typically draw backgrounds, then characters, then foregrounds, I need to start at sprite #4000, then go down to 1. It's quicker to do it that way, than to have to respecify the ZOrder, all the time.


Screen Size
The XScreen Width,Height command can seemingly take anything from 128x128 to 1280x720, but I've stuck to 424x240 which seems to fill most of the screen, whilst keeping things "chunky" enough that a standard set of unscaled 16x16 sprites are all recognisable on the screen.
There are additional parameters to XScreen, adding different graphic scaling techniques to the engine.
Have a play, and see what looks best for your game.

The TScreen function will change the text size.
Select a font size (8 or 16), then the size of each grid point on your screen.
It's kinda quirky how that works, and I broke it quite a few times, but if you're using a large screen size (eg the full 1280x720) then you're probably going to need to look into this.

FWI : My defaults are
XScreen 424,240,2
TScreen 16,8


Controller Quirk
The left JoyCon's dpad doesn't seem to let you hold left and right at the same time..
This kinda makes sense, since.. you know.. it's meant to be a DPad, innit!!
But.. if you're doing a 2 player, 2 JoyCon game, you might need to be able to hold those buttons together.
Probably best to keep this in mind when making some games.
Further experimentation will be required, methinks!


Clearing the Spritesheet
Finally figured this bit out!!
Start a new project, hit F4 to go to Direct mode, type
GTarget 4
GCLS
Then hit F10 and you'll have a blank spritesheet to start with, instead of that giant sprawling sheet full of default sprites..
Save it, and then you're dealing with that, instead!

I think that's pretty much all I've learned, today.
Been a fun day of experimentation!

-=-=-
''Load, Next List!''
Posted : Monday, 27 May 2019, 15:10
Jayenkai

View on YouTube

Spent the past day or so replicating JMTrackr's functionality within Petit Switch..
So far, so good!!

Input = 3 patterns of melody, plus a couple of drum tracks.
Output = choonage.

Now I need to get it to be a little less chaotic, and .. should be ready for ingame usage!

-=-=-
''Load, Next List!''
Posted : Monday, 27 May 2019, 15:27
rockford
That's cool
Posted : Wednesday, 29 May 2019, 09:46
Jayenkai
JMTrackr is done, and available if you want to try it.
4E3E33P5Y

Meanwhile..
Started this.



-=-=-
''Load, Next List!''
Posted : Wednesday, 29 May 2019, 14:08
spinal
Have to wait until the uk store has it
Posted : Wednesday, 29 May 2019, 14:14
rockford
Have to wait until the uk store has it

Yep. Like wot ^ ee ^ sed.

Looks like you're making great progress with PS though
Posted : Wednesday, 29 May 2019, 15:13
Jayenkai
But...... coding!!!!!!
Page : 1 2 Next 3 4
Prev