Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Platform Request] Web Version #17

Open
Loonie-Toons opened this issue Oct 15, 2020 · 13 comments
Open

[Platform Request] Web Version #17

Loonie-Toons opened this issue Oct 15, 2020 · 13 comments

Comments

@Loonie-Toons
Copy link

This randomizer is great, but mobile users don't get to experience this. So you should consider making a Web Version so mobile users can enjoy this. SMB3, SMW, and SM64 each have a Web Version so SMB1 should too.
And I do understand that it is planned that Level-headed will gain support for more than just SMB1. I just think a Web Version should be available.

@Coolcord
Copy link
Owner

I have considered a web version of Level-Headed, but it's easier said than done. There's 3 main ways that this could happen.

Option 1: Javascript Port/Rewrite

You might notice that all of the randomizers you listed (SMB3, SMW, SM64) are written in Javascript (or have Javascript ports) and are not capable of generating their own levels. In fact, most of what they're randomizing really boils down to simply changing a few byte values here and there in the ROM. For example, most people enjoy playing the original levels with new enemies using these randomizers. These randomizers typically accomplish this by simply going through each enemy and changing the enemy ID for each one. This basically translates into changing values at specific, unchanging offsets. This works great in Javascript.

Level-Headed is written in C++. Its core feature is a level generator that generates human readable level scripts. These level scripts are then compiled into the ROM. I've never heard of anyone writing a compiler using only Javascript. While it is theoretically possible to rewrite it in Javascript, it would be a nightmare. It would be much more difficult to get the project to scale well in Javascript. This would also double the workload for introducing new features. If someone else was willing to step up and maintain a Javascript port, I wouldn't mind. However, I personally wouldn't want to develop it myself, as it would likely end up being a mess to maintain.

If you simply want a web-based SMB1 randomizer that has features similar to these other randomizers, I'd recommend abstrakct's SMB1 randomizer. Like the other web-based randomizers, it is written in Javascript and does not include a level generator.

Option 2: Host Level-Headed on a Website/Server

This solution would be the most flexible overall.

Level-Headed does have basic command line support. Leveraging this, a web-based front end could be created. Level-Headed could then run on a server somewhere and be called from this web-based front end. Implementing this wouldn't be too difficult, but the main thing stopping me is the fact that servers cost money to maintain. The Javascript ports can get around this financial issue, since GitHub Pages allows users to host basic web sites with Javascript for free.

Up to this point, I have not accepted any donations for Level-Headed, as I consider it a passion project. However, if this changes in the future, it would be to pay off the costs of maintaining a server. If people are interested in donating to this cause, I would consider starting a website for Level-Headed. However, this isn't something I'd personally use, so I wouldn't want to spend money on it out of my own pocket.

Option 3: "ROM of the Day" Website

While this still requires a server, there might be a way for me to do this without it costing anything. Using this solution, a new game would be automatically generated every night at midnight and uploaded somewhere for download. It would be easiest to distribute this as a patch. Unfortunately, a patch would require the users to apply it to a ROM before playing, which may be more difficult on mobile devices. Alternatively, it could be distributed as a ROM, but there would need to be a way to verify that the users have an SMB1 ROM before downloading.

Doom random level generators such as Oblige and Slige are in the same boat as Level-Headed. This solution was implemented for Slige years ago, and is still running to this day on Soulsphere.

@Epictyphlosion
Copy link

Surprised to see an Oblige namedrop. I wish Fragglet set up one for that as well, lol

@LiterallyLegendary
Copy link

Chromebook users can't use Level-Headed either, so please make a web version.

@pooppp3
Copy link

pooppp3 commented Feb 25, 2021

RE: Chromebook users can't use Level-Headed either, so please make a web version.

ok

Chromebook users can't use Level-Headed either, so please make a web version.

ok

@hhkcu
Copy link

hhkcu commented Apr 22, 2022

RE: Chromebook users can't use Level-Headed either, so please make a web version.

ok

Chromebook users can't use Level-Headed either, so please make a web version.

ok

I am trying to build Level-Headed for Android using Termux and Qt Creator, and even though I haven't included the writers, it's going pretty well:
Screenshot_20220422-163211_VNC Viewer

@hhkcu
Copy link

hhkcu commented Apr 22, 2022

RE: I seem to be having a problem with the program flatout not running when the plugins are added. Maybe I should try fixing the built .so files.

@hhkcu
Copy link

hhkcu commented Apr 22, 2022

Final update!!!

I finally got it working, it seems there was an issue with QT Creator's build process that was breaking it. Using the Build Script worked correct.
At the moment, a lot of requirements are needed due to certain Android limitations.

  1. Level-Headed requires root permission in order to both run and to read files.
  2. You need a VNC viewer, you can get that from the store.
  3. You need a terminal emulator to run it.

Other than that, it works just as it should.
I'll post the 32 bit version soon, here's the 64 bit version:
Level-Headed-ARM64.zip

@hhkcu
Copy link

hhkcu commented Apr 22, 2022

Small warning:

The play store version of Termux is outdated, use the one from F-Droid instead: https://f-droid.org/en/packages/com.termux/
Before running it, take these steps:

  1. Run pkg install root-repo
  2. Run pkg install tsu
  3. Then, run the "setup-permissions.sh"
  4. Finally, you can now run "run-vnc.sh", connect to the server, and run Level-Headed
    Sorry that this is all so complicated!

@hhkcu
Copy link

hhkcu commented Apr 22, 2022

sad news

It saddens me to tell you that the 32 bit build is not possible.
It just refuses to work without a proper working core SO file.
Sorry.

@hhkcu
Copy link

hhkcu commented Apr 22, 2022

This randomizer is great, but mobile users don't get to experience this. So you should consider making a Web Version so mobile users can enjoy this. SMB3, SMW, and SM64 each have a Web Version so SMB1 should too. And I do understand that it is planned that Level-headed will gain support for more than just SMB1. I just think a Web Version should be available.

Technically, I could use Qt5's web VNC to launch it, but there wouldn't be a way to get the ROM on the filesystem. Plus the fact that my private files also would be available. Maybe I could run it on replit.

@hhkcu
Copy link

hhkcu commented Apr 22, 2022

Final update!!!

I finally got it working, it seems there was an issue with QT Creator's build process that was breaking it. Using the Build Script worked correct. At the moment, a lot of requirements are needed due to certain Android limitations.

  1. Level-Headed requires root permission in order to both run and to read files.
  2. You need a VNC viewer, you can get that from the store.
  3. You need a terminal emulator to run it.

Other than that, it works just as it should. I'll post the 32 bit version soon, here's the 64 bit version: Level-Headed-ARM64.zip

With this in mind, if anyone would be so kind to tell me if it is possible to convert an app that was built for Linux (in this case, my Level-Headed arm build), into an APK file, which I can put a VNC receiver inside and have LevelHeaded run as an Android app. But unfortunately both Android and my skill in programming cripple me from doing this.

@hhkcu
Copy link

hhkcu commented May 17, 2022

Kay, sorry if I'm tiring you out by now, but I'm not gonna focus on and android port and instead I'm going to make a web port

@Nanospark53
Copy link

Coolcord said:
Option 3: "ROM of the Day" Website

While this still requires a server, there might be a way for me to do this without it costing anything. Using this solution, a new game would be automatically generated every night at midnight and uploaded somewhere for download. It would be easiest to distribute this as a patch. Unfortunately, a patch would require the users to apply it to a ROM before playing, which may be more difficult on mobile devices. Alternatively, it could be distributed as a ROM, but there would need to be a way to verify that the users have an SMB1 ROM before downloading.

The A Link to the Past Randomizer site has a ROM verification process on their website so there is a way to do it. The interesting thing is that it requires the V1.0 (J) ROM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants