Comments (4)
Hi Enrique,
As far as I know, someone on the forums released a Love-WebPlayer loader,
which loaded the .love file, and ran it, in the browser. Not sure if it's
being actively developed anymore, but you can check it out here:
https://love2d.org/forums/viewtopic.php?f=5&t=8487&start=130
Thanks,
Ciprian
On Fri, Oct 26, 2012 at 1:29 PM, Enrique García [email protected]:
Hi,
This is the first time I look into this project. First thing I noticed is
that you need to uncompress the .love file in order to play games.I think it would be a very nice change if the player could directly read
.love files instead.Ideally I'd like to have an index.html with just one line:
<script href="love.js" data-love="http://your.game.url/game.love"></script>I think one of the missing pieces for setting this up would be having
physfs working in js. It might be possible to bind it to javascript just
like the Lua interpreter has been. I don't know for sure though.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/11.
-- Blog http://www.zapakitul.wordpress.com/ |
Twitterhttp://www.twitter.com/zapakitul| LinkedIn
http://ro.linkedin.com/pub/constantin-ciprian-bacioiu/25/14b/476
~ Bacioiu E. Constantin Ciprian
~ My latest blockbuster http://www.youtube.com/watch?v=UZIcFNBiadc.
from love-webplayer.
That's not the same thing. That uploader (probably done in PHP or other server-side language, I could not find the source code) takes a .love and generates a love-webplayer compatible file/folder structure, uncompressing the .love file.
What I'm talking about is changing love-webplayer so that it loads a .love file, uncompresses it (probably in memory) and then plays it, without having to manually uncompress anything.
from love-webplayer.
Hi!
as far as i know accessing binary (non-plaintext) data like .love/.zip with javascript alone is not possible.
Specifically javascript can use XMLHttpRequest (js/utils.js UtilAjaxGet) to load plaintext files from urls dynamically.
The result by the api is a string, and not binary safe.
So as soon as a zero-byte occurs in the middle somewhere, it fails / ends.
You'd either need flash, some other plugin, or something on the server to send to send it as plaintext hex-like instead of binary, e.g. base64.
If you need serverstuff anyway, it would best to just unpack the .love on the servers.
That's what i'd suggest anyway, easiest and cleanest.
I see problems with getting useful lua error messages when using something other than unpacked file structure on the server.
The way i see it, the two main reasons for physfs is
a) giving the player a single file rather than a file structure, to make it more comfortable and increase target audience.
b) sandboxing the game for security so it cannot read/write on the users harddisk
For web, a) the player just needs the url in the browser,
and b) javascript is sandboxed and cannot access the harddisk anyway.
Note that player is not hoster, it does not makes sense that everyone who wants to play installs a webserver,
that would be done once by the author of the game, and the players would just need the url.
So, what goal are you trying to achieve by using physfs ? Maybe there's a different approach to get there easier.
And are you willing to work on it yourself ? because due to lack of community contributions i'm just implementing what i need myself usually ;)
from love-webplayer.
Hi, regarding the binary reading problem, I found this:
http://nagoon97.wordpress.com/2008/04/06/reading-binary-files-using-ajax/
I've also read that decent browsers (not ie) have easier ways to read binary data now.
The main reason I see for having physfs (or similar) is making love-webplayer binary-compatible with love. I think that would be very cool indeed.
But no, I'm afraid I can't contribube to that myself. The project does not interest me that much. If I had to write that much javascript, I'd probably just make a love-inspired javascript game engine instead (the whole point was not having to write javascript, which I enjoy less than Lua).
So I understand your arguments. I'll close this issue.
from love-webplayer.
Related Issues (15)
- Single file / require HOT 1
- love.graphics.rotate doesnt work HOT 3
- Switch from existing Lua parser to Emscripten-based one HOT 10
- Get Clouds example to work with Weblua HOT 3
- Get IYFCT game working with Weblua HOT 1
- Get 'no' example working with Weblua HOT 4
- Port Hawkthorne to Weblua
- ReferenceError: MainOnLoad is not defined onload()
- how about pixijs + love? HOT 1
- Request: Integrate with Nextcloud & Owncloud
- love.thread with "web workers"
- love.image with 2d canvas contexts
- love.graphics.draw(bg) does not draw anything
- love.graphic.draw() not working exactly as it should. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from love-webplayer.