All Uzebox Games Online! (Cuzebox and Emscripten)

The Uzebox now have a fully functional emulator! Download and discuss it here.
User avatar
Artcfox
Posts: 932
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by Artcfox » Sat Jan 12, 2019 1:31 pm

What I have done in the past is to download the Git repo as a .zip file, and then extract only the part of the zip file where the games and data files are stored, telling my zip program to not create directories when extracting. That quickly put everything in the same directory for me, though it doesn't solve the issue of duplicate incompatible files.

Just the games libraries with subdirectories seems like the best option, then the user can choose the games they want by hand, or extract all (or a particular selection) using the "do not create directories" option in their zip program.

User avatar
nicksen782
Posts: 602
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by nicksen782 » Sun Jan 13, 2019 8:56 am

I've merged the new Online Emulator into master and it is available online.

There were 3 versions of the Online Emulator live. The original one, the newer one that I put in place for a couple months, and the new one. I disabled the older versions and configured them to do a redirect to the new version URL. If a gameid was passed on the URL then it will be passed too. So, old links should continue to work and did when I tested them.

I also went through each game on the Uzebox wiki and updated the "Play In Browser" link to point to the new URL.

This is version 1.9.0. I want to release 2.0.0 when I have all features completed. I still have some work to complete concerning the delegation of games database tasks to people other than myself. I'll talk about that later when it is closer to being done.

Okay, the new feature list is pretty long. Here we go!
  • Can run independently of UAM. Or, if you have a UAM login you can get some additional features depending on permissions.
  • The Emscripten instance does not use an iframe anymore. Speed?
  • The buttons you press in the games will be displayed on the two on-screen gamepads.
  • The on-screen games work!
  • Supports gamepads! You will need to configure your gamepad button mapping at least once. After that, those settings are saved to LocalStorage for next time. Configure gamepad link is at the bottom of the page. The dev console will report if your gamepad connected. I don't have that displayed in the GUI.
  • Gamepad configurations can be uploaded or downloaded from the gamepad config view.
  • The EEPROM file is saved to LocalStorage when the emulator stops (stop, reload, unload, page refresh.) It is loaded each time you load a game. This means that you can keep your hi scores. Also, the Emuze program can be used to edit that EEPROM data. This all happens automatically.
  • Fixed a bug with the Play In Browser links where the game sound would not start. This is a default browser config. The solution is to have you click the screen to actually start the game. The emulator canvas will let you know if you need to do this. This isn't a problem with games loaded in other ways.
  • There are now 2 emulation "cores" available. Web Assembly and ASM.JS. If your browser supports WASM then that will be used. Otherwise the ASM.JS core will be loaded. If you want, you can toggle which core you use.
  • The Emscripten CUzeBox will start with the lower resolution and the debug view off by default.
  • I made a few small modifications to CUzeBox (on-the-fly at compile time) that allows the Online Emulator to "ask" CUzeBox what the current buttons pressed are and some of the flags. This means that the application can display your keypresses (keyboard and gamepad) for some visual fun and the indicator buttons above the emulator canvas will always show the correct state. Concerning player 2, ALT+A and ALT+SPACE cannot be used by the keyboard because they are reserved by the browser. Normally you hold either ALT to redirect input to player 2. I added in BACKSPACE as an additional player 2 modifier key.
  • If you load a game from the database selector you will be provided with a game files list below. You can click any file to download it individually or you can click the download as .zip button to download all game files as a zip. The Direct Play In Browser link is in that section too.
  • There is an optional "Auto-Pause" feature that you can turn on. If enabled and your mouse cursor is not over either the on-screen gamepads or the emulator canvas the Emscripten instance will pause. This is NOT the CUzeBox pause. This actually pauses Emscripten. Move your mouse over to one of those areas to unpause the game.
  • A game can be cached. This is due to how I load the files. Upon selecting a game they are downloaded and stored in RAM. If you stop the game you can use the reload button to start the game again without another download of the game files. Or, you can just press the reload button and the game will just restart. This is handy for some games that do not allow you to return to the main screen... and it is convenient. If you click the unload button then the game will be stopped and the files in RAM will be removed. The cache only applies to the current game. Any new game is a new download.
There is still room for missing features. If you have a good idea please share it with me and I'll see what I can do.

User avatar
Jubatian
Posts: 1277
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by Jubatian » Wed Jan 16, 2019 4:59 pm

Huh, great progress here, too! I particularly like that you added high score saving.

However now I am certain whatever method you are currently using for the interface doesn't work at me at all. The database is emty (only the "choose a game" entry is in it), and neither of the buttons do anything when I click it (I can not import file or whatever). Firefox 60.4.0esr (64-bit) on Debian Linux.

User avatar
nicksen782
Posts: 602
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by nicksen782 » Wed Jan 16, 2019 5:11 pm

... I just downloaded 60.4.0 and I can confirm what you have found. I'll look into this.

*EDIT*
Okay, the bug was due to a polyfill that did not succeed. It was for the Full Screen effect. I disabled the polyfill. The polyfiller is designed to fail if a loaded polyfill does not actually work. In Firefox ESR 60.4 it fails. Please try again. The full screen feature will not work right with ESR but it won't throw an exception anymore either. Actually, online gconvert doesn't actually use that feature, but the online emulator does.

User avatar
Jubatian
Posts: 1277
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: All Uzebox Games Online! (Cuzebox and Emscripten)

Post by Jubatian » Wed Jan 16, 2019 6:18 pm

Thanks, it works now!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest