According to the porting examples and demos page, the entire Unreal Engine 3 was ported in 4 days, and as of May last year they got the Unreal Engine 4 working. Asking it to render and display a single scaled texture for Uzem should be peanuts compared to running Unreal Engine 4!uze6666 wrote:Pretty awesome stuff, thanks for the explanation. I had heard about it and asm.js, but it's the first I see something out of it.
Uzem ported to HTML5/JavaScript
Re: Uzem ported to HTML5/JavaScript
- nicksen782
- Posts: 714
- Joined: Wed Feb 01, 2012 8:23 pm
- Location: Detroit, United States
- Contact:
Re: Uzem ported to HTML5/JavaScript
This is awesome! I tried to set this up some months ago but I couldn't get it to compile (probably because of the environment that I was using.)
Thanks for this.
Thanks for this.
Re: Uzem ported to HTML5/JavaScript
No problem! If you have the RAM (my desktop has 32 GB), I recommend doing it inside a Debian Live CD (I used debian-live-8.2.0-amd64-gnome-desktop.iso). The Emscripten website has great instructions for getting the environment setup for Linux. The next time I reboot my computer I'm going to lose the environment, but now that I know it works I'll take notes the next time I set it up from scratch, and those notes should be good for both the Live CD, and for a normal hard drive install of Debian.nicksen782 wrote:This is awesome! I tried to set this up some months ago but I couldn't get it to compile (probably because of the environment that I was using.)
Thanks for this.
Re: Uzem ported to HTML5/JavaScript
For my next trick I merged Uze's recent speed improvements to the uzem140 branch with Jubatian's crazy speed improvements on his uzem140-hacks branch, and then figured out how to get an SDL2 app to compile using Emscripten.
And then I figured out the real trick!
Don't use Chrome. Use Firefox on a fast computer.
Firefox is capable of playing it at full speed.
There is still a slight audio static sound going on, but it's not too terrible.
And then I figured out the real trick!
Don't use Chrome. Use Firefox on a fast computer.
Firefox is capable of playing it at full speed.
There is still a slight audio static sound going on, but it's not too terrible.
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: Uzem ported to HTML5/JavaScript
Yes - Firefox does it.
3.6ghz quad core i7 wont run full speed in Chrome
Has no problems in Firefox.
This is awesome having the emulator in a browser. As you said - you can put playable versions of the games on the wiki page
3.6ghz quad core i7 wont run full speed in Chrome
Has no problems in Firefox.
This is awesome having the emulator in a browser. As you said - you can put playable versions of the games on the wiki page
Re: Uzem ported to HTML5/JavaScript
Won't run full speed on my other machine, a 3ghz Core2 duo. Firefox is indeed faster than chrome by perhaps 20%. Almost there!
Re: Uzem ported to HTML5/JavaScript
Based on the stuff going on in the other optimization thread, I think it might be possible with some more algorithmic improvements.uze6666 wrote:Won't run full speed on my other machine, a 3ghz Core2 duo. Firefox is indeed faster than chrome by perhaps 20%. Almost there!
Re: Uzem ported to HTML5/JavaScript
Using Jubatian's newest uzem140-hacks-01 branch (since it's even faster now that write_io and read_io have been optimized, and the pixel output has been inlined, and the timer code has been optimized!) I went back and re-packaged and re-uploaded all of the Asm.js games I had posted in this thread. The sounds are much improved now, and the speed is phenomenal!
I also added Joyrider.
Here are the games all together in a convenient list:
Lode Runner
Megatris
Bugz
Joyrider
Alter Ego
And both Firefox and Chrome can run them well!
Edit: I fixed the undefined behavior in SDEmulator.cpp, and now Alter Ego works!
I also added Joyrider.
Here are the games all together in a convenient list:
Lode Runner
Megatris
Bugz
Joyrider
Alter Ego
And both Firefox and Chrome can run them well!
Edit: I fixed the undefined behavior in SDEmulator.cpp, and now Alter Ego works!
Last edited by Artcfox on Mon Oct 12, 2015 2:23 am, edited 2 times in total.
Re: Uzem ported to HTML5/JavaScript
Not sure if it will help, but I think it it still one of the few things that actually uses PetitFS. SD ERROR should give a number which will tell where it failed, if it is 0 then it failed to mount if I recall.Artcfox wrote:(Unfortunately, when I tried to package Alter Ego, all it says is "SD ERROR" despite including the aedat.bin file along with the ROM and the eeprom.bin file. I'm not sure what that's about, as everything runs fine when using the native build.)
Off the top of my head, the only other thing using PetitFS is this, I wonder if that works?
Edit-did some optimizations get done to the SPI code at all?
Re: Uzem ported to HTML5/JavaScript
Awesome!!! That's a big thing. When announcing a game, folks will be able to play it on the spot in their browser. Really cool.
I suspect this have to do with the sd card and SPI emulation. Can emscriptem enulate those? You can try any game with sd requirements like Uzeamp, Uze8 etc. I assume they won't work either.(Unfortunately, when I tried to package Alter Ego, all it says is "SD ERROR" despite including the aedat.bin file along with the ROM and the eeprom.bin file. I'm not sure what that's about, as everything runs fine when using the native build.)