Homebrew RELEASE Brew.js - Make homebrew apps with JavaScript!

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,230
Country
Spain
Awesome! Been messing around with PyNX lately as I have an idea for a homebrew app, might give it a go using this as well!

Quick question though: I’ve noticed that you’re supporting some really old consoles, even back to the GBA. Any reason why WiiU support is not planned? Feels a bit odd. Also any plans to add support for non-Nintendo consoles?
I've planned support for all Nintendo platforms that devkitpro supports for the moment.
Maybe, after finishing support for all of this platforms, I'd consider developing for other platforms.

--------------------- MERGED ---------------------------

does it work on 5.0.x?
It's important to know that the engine Brew.js uses to parse JS doesn't support node.js API, I think only a few things of it are supported. So, basically, pegaswitch scripts are not supported.
I'll see how could I make things like dumping NCAs or game carts, but Pegaswitch and and this project can't work together (for the moment)

BTW, all the tests have been done with my 5.0.2 Switch.
 
Last edited by XorTroll,

AileenLumina

Python main, software engineer and API designer
Member
Joined
Sep 27, 2015
Messages
631
Trophies
0
Age
26
XP
614
Country
Germany
Awesome! Now Switch homebrew can be written in C, C++, Lua, Python and JavaScript. (Did I miss any? No, Brainfuck doesn't count. :P )

It will be amazing to see how many people will learn to code to create homebrew, and how the scene will flourish due to the variety of languages you can write homebrew apps in.
 

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,230
Country
Spain
Awesome! Now Switch homebrew can be written in C, C++, Lua, Python and JavaScript. (Did I miss any? No, Brainfuck doesn't count. :P )

It will be amazing to see how many people will learn to code to create homebrew, and how the scene will flourish due to the variety of languages you can write homebrew apps in.
Well, I didn't know Lua could be used to make Switch homebrew...
Now it's our turn to extend our interpreters :yayswitch:
 

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,230
Country
Spain
Current graphic functions and variables are still experimental and are only useful for drawing simple bitmaps, so I just recommend you using console printing until I improve this.
 
  • Like
Reactions: H1B1Esquire

Naked_Snake

Constant Miscreant
Member
Joined
Oct 6, 2013
Messages
1,765
Trophies
0
Age
38
Location
Hyrule Field
XP
1,749
Country
Australia
I ran the carddumper.js and it just went to this screen I’m guessing that’s not normal
 

Attachments

  • 2AD854BE-C86C-4C64-B0E0-8BC8BF665AE1.jpeg
    2AD854BE-C86C-4C64-B0E0-8BC8BF665AE1.jpeg
    1.4 MB · Views: 258

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,230
Country
Spain
I ran the carddumper.js and it just went to this screen I’m guessing that’s not normal
If that script is from Pegaswitch I've already said that Brew.js is not suitable with Pegaswitch.
Error handling is still a bit poor, so it displays that when any errors happen at executing.
I would like to embed Brew.js to Pegaswitch, but it will take me a while to do that.
 

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,230
Country
Spain
I've been working and searching these two days, and here it goes. I've released a new version. (0.2)

The difference between the old UI and the new UI:

2018052015194100-DB1426D1DFD034027CECDE9C2DD914B8.jpg

2018052015194900-DB1426D1DFD034027CECDE9C2DD914B8.jpg


Release info:

Using the interpreter
Just copy the switch folder to your SD card (sdmc:/switch).
In this version Brew.js requires some extra files, so copy everything, not just the NRO ROM.

Change Log
Wow, it's been just two days and a lot of changes have been done:

  • New UI! No more console, now beautiful backgrounds.

  • Some new functions and vars added, check the API guide. (README.md file)

  • Console printing has been disabled due to problems with graphics.

  • Result saving! When a project's execution finishes, it's output is saved to a log file.
    If it gets an error while executing, the project exists and the error's output is saved to the log file.

  • Three new examples were added, and the Hello World one was updated according to the new API.
Important!
If you have any projects with the previous API, read the documentation carefully and update it, because a few functions are deprecated or their names have been changed.

Link: https://github.com/BrewJS/Switch/releases/tag/0.2
 

Fadi5555

Well-Known Member
Member
Joined
Jan 3, 2018
Messages
499
Trophies
0
Age
35
XP
2,394
Country
United States
I've been working and searching these two days, and here it goes. I've released a new version. (0.2)

The difference between the old UI and the new UI:

View attachment 124187
View attachment 124188

Release info:

Using the interpreter
Just copy the switch folder to your SD card (sdmc:/switch).
In this version Brew.js requires some extra files, so copy everything, not just the NRO ROM.

Change Log
Wow, it's been just two days and a lot of changes have been done:

  • New UI! No more console, now beautiful backgrounds.

  • Some new functions and vars added, check the API guide. (README.md file)

  • Console printing has been disabled due to problems with graphics.

  • Result saving! When a project's execution finishes, it's output is saved to a log file.
    If it gets an error while executing, the project exists and the error's output is saved to the log file.

  • Three new examples were added, and the Hello World one was updated according to the new API.
Important!
If you have any projects with the previous API, read the documentation carefully and update it, because a few functions are deprecated or their names have been changed.

Link: https://github.com/BrewJS/Switch/releases/tag/0.2
Thanks for your efforts.
Just a question please.
Can we take the advantage of LibNX on 3.0.0? Because LibNX has JIT which is more better than interpeter?
 

XorTroll

Switching between my 2DS and my Switch
OP
Developer
Joined
Dec 28, 2017
Messages
642
Trophies
1
Location
Nowhere
Website
github.com
XP
4,230
Country
Spain
Here you have the new version!

Using the interpreter

Just copy the Brew.js.nro ROM to your SD card, no matter the location.
Remember that Brew.js searches for projects at sdmc:/switch/Brew.js!

Change Log:
  • The UI has been improved, and it doesn't require those attached files from the 0.2 release.

  • All the graphic system has been updated, adding lots of features. Too many functions and elements to talk about... Now games can be easily made using Brew.js API!

  • Now the result of an execution is not just saved, now it's also displayed in the screen. (it might give some problems due to large results)

  • The examples have been updated according to this version's API, and some new examples were added. Wow! A PONG example to see how graphics work! (despite it's very poor)
Important!
If you have any projects with the previous API, read the documentation carefully and update it, because a few functions are deprecated or their names have been changed.

Video showing keyboard example: (yay, new YouTube channel for my projects)


Link: https://github.com/BrewJS/Switch/releases/tag/0.3
 
Last edited by XorTroll,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Nut on the hill