Pages: [1]
|
|
|
Author
|
Topic: UQM port for Chrome (using Native Client) (Read 5349 times)
|
davidben
Zebranky food
Offline
Posts: 6
|
Hi all,
I've ported UQM to Native Client so you can run it in Chrome. If you're not familiar with Native Client, it's a way to securely run native code in your web browser.
The code's on Github. The vast majority of the changes are buildsystem-related. Once it actually builds, the game basically just works. It works by setting up a virtual filesystem where user data is backed onto an HTML5 filesystem, and game data is downloaded on-demand and also cached locally. The game itself runs largely unmodified. The files themselves are separated into packs provided by the nacl-mounts library. I'm not using the built-in zip mounting system for now as I want the data split into more files; in particular, you only have to download each alien's voice files as you meet them, so the initial download's not too bad. Perhaps a future version could reuse the zips (the main requirement is that you know what files are in what pack without reading them).
I put it at http://uqm.davidben.net/ for now if anyone wants to try it. You'll need to enable Native Client in about:flags to run it. (This won't be needed once it's in the Web Store.) (Edit: It's in the Web Store now. Install it here.)The front-end HTML around the port is extremely basic and needs styling. I just put in the bare minimum needed to show download progress and the like for now. But for the most part, it should work. The github page has a list of some known issues.
I'm posting this here to gauge interest in this sort of thing, and also to see if upstream would be interested in taking the changes. I'm envisioning that a future versions could do things like sync your saved games on the server, maybe even support network play over WebSockets. (So no mucking about with IP addresses or routers.) The other question is hosting. I'm happy to find a place to host this and submit it to the Web Store, but I wanted to see if upstream would prefer managing the hosting and Web Store submission.
So, what do people think? Is there interest in having this maintained by UQM?
|
|
« Last Edit: March 10, 2012, 04:30:14 am by davidben »
|
Logged
|
|
|
|
|
Spurk
*Many bubbles*
Offline
Posts: 115
|
You are awesome!
I have started using a chromebook rather heavily at home and when I want to play a game, there are never many choices. But UQM for NaCl is great! I am totally in favor of putting that in the Web Store, but I'll be bookmarking your page in the meantime.
As for the web trimmings, I think they're fine. I'm sure you could probably make things less spartan on one hand, but at the same time, it serves its purpose and gets out of the way otherwise. I especially like the use of the progress bar to let me know when things are loading.
I quite understand your desire to see if the upstream people want to manage the Web Store submission and/or code, though I note the Android port is not maintained by them.
|
|
|
Logged
|
|
|
|
Megagun
Enlightened
Offline
Gender:
Posts: 580
Moo
|
Hah. Nice. This is definitively something I'd want to look into for Project 6014.
|
|
|
Logged
|
|
|
|
|
|
|
|
davidben
Zebranky food
Offline
Posts: 6
|
Yeah, for some reason the filesystem setup is all rather on the slow side. I haven't really figured out what's up there. It might just be slow. I am planning to make one change to how nacl-mounts buffers things that should help a lot though. The current setup isn't being anywhere near as effective as it should be.
That said, downloading game data (any time there's a progress bar at the bottom) should be a one-time cost. That all gets cached locally. Edit: To clarify, downloading each individual hunk of game data is a one-time cost. To avoid a 150MB up-front cost, things get loaded on-demand. Most notably you only download a race's voice files when you first meet them.
|
|
« Last Edit: March 10, 2012, 10:12:33 am by davidben »
|
Logged
|
|
|
|
|
davidben
Zebranky food
Offline
Posts: 6
|
Indeed they did. I wanted to base the port off 0.7.0 just so I had a stable base to work off of. I rebased the changes on top of trunk before filing bug to merge them. (See branch rebased or link below.) I resolved the conflicts between our changes (had to adjust them slightly). If only I had noticed the change when I started.
https://bugs.uqm.stack.nl/show_bug.cgi?id=1162
(Yeah, I know how to pull trunk. That's a git-svn clone you're looking at there. )
|
|
« Last Edit: March 11, 2012, 08:47:54 am by davidben »
|
Logged
|
|
|
|
dczanik
*Smell* controller
Offline
Posts: 306
|
Awesome!! Fantastic job. Yeah, the loading time is a little slow. I personally would prefer to download the game files up front before playing. I hate load times
I posted the news on moddb.com too. I'm amazed at how many platforms the game is available on. Now we just need HTML 5 programmers to port the game...
|
|
|
Logged
|
|
|
|
davidben
Zebranky food
Offline
Posts: 6
|
I've fixed a lot of low-hanging fruit in nacl-mounts (turns out it implements a LOT of filesystem operations slow) and updated the build. If you visit the page now, the startup time should be comparable to the desktop version.
|
|
|
Logged
|
|
|
|
Pages: [1]
|
|
|
|
|