Showing posts with label smileboom. Show all posts
Showing posts with label smileboom. Show all posts

Saturday, June 05, 2021

Nintendo Switch lite - SmileBASIC4 - Coding Console Calculator


Nintendo Switch Lite - Blue

Hey guys,

Check it out!

One of the things I like about my Nintendo Switch lite is that I'm not just using it for gaming. I like watching videos on Youtube and also listening to music. No Netflix? No Spotify? Well, you just need youtube. Once awhile, I'll post pics and short clips videos on Facebook or Twitter.

Another thing I like is the software SmileBASIC4 and FUZE4. Although, I mostly spend my time with SmileBASIC more. You can learn to code games and play them on your own Switch. What I really like about SmileBASIC is that it's not just for games. The language is pretty much similar to BASIC and Python.



Nintendo Switch Lite - Blue

I'm more into Python because of Raspberry pi. I had always wanted to learn to code but didn't get the chance when I was in school. I only saw that you can create your own smart car robot with Raspberry Pi and Arduino that I was interested in. That's where I started to learn to code with Python.

The kids nowadays got the chance to learn about programming with Microbit. I actually got it for myself too. Playing with them is really fun. And, of course, it's more fun learning to program with 'toys' like this. Where you can literally see things work.



Adeept BBC Micro:bit Sensor Starter Kit | Microbit Programmable Starter Kit for Micro:bit with 35 Projects PDF Tutorial Book | Micro:bit and Expansion Board Included

Anyway, I played with Microsoft Visual studio and followed a tutorial to create a console calculator with C++. There's also a tutorial for C#. Instead of following the tutorial, I was wondering if I could take some of the code and create a console calculator on my Switch lite with SmileBASIC4.

I thought the core of the code in C# which is the calculation is pretty simple enough to redo with SmileBASIC. This is the part where knowing Python actually helps me. The fact that SmileBASIC is similar(almost) to BASIC and Python makes it much easier.



Learn C++ Quickly: A Complete Beginner’s Guide to Learning C++, Even If You’re New to Programming (Crash Course With Hands-On Project)

I was actually stuck with the INPUT problem in SmileBASIC 4. In python, I could easily let a user input to choose an option and then Print whatever I want. It keeps coming out with all the answers for plus, minus, multiplication, and divide.

I thought to just let it be. I don't think there's any calculator in the world that gives out an answer all at once. Lol. In the end, I decided to ask @notohoho, the CEO of Smileboom on Twitter. He was kind enough to answer my question the last time. Thankfully, he was also keen to help me this time around too.


I was stuck trying to print the option of the user with the INPUT command.


Probably, one of the @notohoho students or SmileBASIC users gave me a solution of using the command OPTION aka opt$.


While @notohoho gave me this solution of using the command INSTR(OPT$,"").

I tried both of the solutions and it didn't work at first. It was only when I realized that I had put the endif at the wrong place. You can see the pics of my earlier code where I've placed all the endif at the bottom, instead of after every if. That's basically how I learn, from trial and error.


I decided to add an option "x" where the user can get all the calculation answers at once. Kinda cool!

       

The second part of the final code. Of course, you can copy these. Add anything you want to it. I was even thinking of adding background music. I can even upload it to the SmileBASIC server but I'm lazy. There are others that already upload better calculator apps.

You can watch the video and see how it works here



Nintendo Switch with Neon Blue and Neon Red Joy‑Con - HAC-001(-01)

If you had gone to visit the C# tutorial page, you'll see that the console calculator looks similar to the one I created using SmileBASIC 4. There's actually more to the C# tutorial and personally, the code is more 'cumbersome' to me. While with SmileBASIC4, it looks much simpler.

That's part of another reason why I like SmileBASIC. It's simplicity. I guess it's meant to be easy. For learning purposes. For a newbie like me? Also, with the Nintendo Switch, its portability meant, you can bring it and code anywhere. I actually code this calculator while in bed using the on-screen keyboard.

I'm self-learning coding just for fun and basic knowledge. Like I've said, I've been wanting to learn to code since I was a child. The kids nowadays are so fortunate that there are many programs suited for their age to learn. The good thing is that because of the Internet, it's much easier to research and learn online.

If you're interested, come join the fun!

What you guys think?

Help support this blog and youtube channel. Buy me Coffee @

https://www.buymeacoffee.com/W04oadL

*Shop the latest deals from Amazon via our links to support us. Tq!

Subscribe to our blog and youtube channel for the latest post and video upload!

Happy coding!


P.S. Nintendo Switch Lite - Blue




Sunday, September 20, 2020

Nintendo Switch lite Smile BASIC 4 Center Your Text And Background Image


Nintendo Switch with Neon Blue and Neon Red Joy‑Con - HAC-001(-01)

Hey guys,

Check it out!

I've been trying to figure out how to center my text in the middle of the screen and also putting a background image. For the life of me, I thought it would be pretty simple. Well, actually it is if you know how to code. So, I decided to try my luck and send a twitter message to SmileBoom CEO via his twitter account @notohoho.


I didn't really think he would actually reply. It is a newbie question after all. But, he did and say he'll help me. To tell you the truth, I'm not really sure if the CEO himself replies to me. He could have easily asked his worker or students to help me. Either way, it's like attending one of his coding classes.


Of course, this is good info. That's why I'm sharing these tips right from the horse's mouth. So, I'm posting his explanation and also include the sample code. If you're interested, take out your Nintendo Switch/lite and follow the code. It works for me.


Right here, you can copy the code for centering your text in the middle of your Nintendo Switch/lite screen. Change the 'TEXT' to anything you want to post or print on the screen. Every time, I learn a new code, I'll play around with it. You can do the same, like changing text color or making it blink!


The code for a background image. You can choose any CHR$(&HE8C3) by using the F9 Key or on the on-screen keyboard. I was lazy to set up my keyboard so, I just use the on-screen keyboard to type out the code. That's why I like smilebasic 4. The ability to just play with code anytime and anywhere! 


After I tried out the image background code, I send @notohoho the image above. Finally, I can set up my own in-game backgrounds. I already followed his tutorial on the jumping king game. But, I changed the image to a princess and put this background.


I'm a little lost on these codes though. Haven't tried it yet. I told him, this isn't exactly what I meant about the background image. Anyway, the important thing for me is that I finally know how to center the text and also set up my own background image. 



Nintendo Switch with Neon Blue and Neon Red Joy‑Con - HAC-001(-01)

You can get SmileBASIC 4 on their main website or on Nintendo eShop. While you're at the eShop, look up Fuze 4 too. It's almost the same as SmileBASIC 4. But, for some reason, I like playing with the latter more. You can download Fuze 4 on the eShop via this link.

What I like about SmileBASIC 4 and Fuze 4 is that they're almost the same as Python (Official website). A bit different here and there but pretty minor. You can quickly figure out the difference after playing with it for a while. That's why I'm thinking, those who already know Python (Amazon link) can easily create their own game fast!



I'm really loving my Nintendo Switch lite. I got my first Nintendo Switch for gaming but after discovering SmileBASIC 4, I love it even more. It's a great portable gaming device and now I can learn coding on the go and even create my own games to play on it. How much cooler can it get?

Well, I hope you guys find this SmileBASIC 4 text and image code useful. It certainly is for me. Tq to @notohoho-san. By the way, yesterday I found this site on learning Quite Basic. You don't have to download anything. It's an online simulator. The link is not secure but it's safe to visit.  

What you guys think?

You can buy me Coffee + Pizza if you like my Blog and Youtube Channel @

https://www.buymeacoffee.com/W04oadL

*Shop the latest deals from Amazon via our links to support us. Tq!

Subscribe to our blog and youtube channel for the latest post and video upload!

Happy portable gaming console computing!


P.S. Nintendo Switch Lite - Turquoise