Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 program rewritten to Android
#11
(03-20-2024, 08:38 PM)Pete Wrote: Okay, using the browser as the display surface. So how do we load the JavaScript to the phone and get the browser to execute it?

Pete

Ultimately, it needs to be hosted somewhere.  Thankfully, this is a lot easier today with app/game sharing sites like itch.io.  So, you can export the "compiled" javascript/html version from QBJS as a zip file.  Then upload that as a web app or game to itch.io (or your favorite similar site) and share for fun and profit.

Here's an example that I did recently for a game jam that was built entirely in QBJS an uploaded to itch.io.  It should work on most devices:

https://boxgm.itch.io/roz
Reply
#12
I looked through the HTML source. It looks like the game was embedded in the JS play_url tag on the server. So why couldn't the same method be used as a local link, so the game could be run just on your own computer browser, offline?

Pete
Reply
#13
(03-16-2024, 05:45 PM)MasterGy Wrote: Hello ! I want to make programs for android. Unfortunately, I've been programming in Basic for 30 years, and it's hard for my brain to switch to object-oriented programming. I don't see and understand at all how they are built on each other, how things can be connected. A week ago, I tried the development system called B4A (https://www.b4x.com), which is in principle written in Basic, but in practice it could be anything due to the lack of simplicity.

What would be cool would be a compiler or transpiler or whatever that let you compile QB64PE code into an working JAR file that could run on an Android tablet or phone or even Java on a PC or in a browser.
With all the ai stuff out there, can't we find something to design these tools for us? LoL
Reply
#14
(03-20-2024, 09:51 PM)madscijr Wrote:
(03-16-2024, 05:45 PM)MasterGy Wrote: Hello ! I want to make programs for android. Unfortunately, I've been programming in Basic for 30 years, and it's hard for my brain to switch to object-oriented programming. I don't see and understand at all how they are built on each other, how things can be connected. A week ago, I tried the development system called B4A (https://www.b4x.com), which is in principle written in Basic, but in practice it could be anything due to the lack of simplicity.

What would be cool would be a compiler or transpiler or whatever that let you compile QB64PE code into an working JAR file that could run on an Android tablet or phone or even Java on a PC or in a browser.
With all the ai stuff out there, can't we find something to design these tools for us? LoL
I tried using the new FreeBASIC AI to make a Hello World program, but all it did was complain about how it wanted to KILL itself.

Pete Big Grin
Reply
#15
(03-20-2024, 09:47 PM)Pete Wrote: I looked through the HTML source. It looks like the game was embedded in the JS play_url tag on the server. So why couldn't the same method be used as a local link, so the game could be run just on your own computer browser, offline?

Pete
For the most part it can be run locally just from the generated HTML and Javascript... and there are several tools and frameworks out there now to wrap an HTML application in a mobile native-app shell for Android and/or iOS.

I'm curious though, in the context of deploying your app to Android, what would be the advantage to that approach if it is running in a browser either way?  Offline access for your mobile device?
Reply
#16
Quote:I'm curious though, in the context of deploying your app to Android, what would be the advantage to that approach if it is running in a browser either way?  Offline access for your mobile device?
I guess I have some loose concept of someday putting together an HTML page I can run locally, with various input fields and boxes to click, which would run programs that would interact with the html page, itself. That way I get the beauty and ease of HTML/CSS pages with the mechanical functionality of QB64.

Pete
Reply




Users browsing this thread: 2 Guest(s)