Page 2 of 2
Re: Moonshine - A lightweight Lua VM for the browser
Posted: Fri May 16, 2014 5:13 am
by T-Bone
Tanner wrote:jjmafiae wrote:Very cool, the readme is a bit confusing.
Yeah, the project isn't really in a state where I'm ready for other people to be using it. It's exciting to me that qwook got stuff up and running but there's a bunch of stuff missing that I consider necessary for an alpha release.
T-Bone wrote:Wouldn't it be easier to use WebGL for graphics though, rather than a regular Canvas? There are OpenGL ES versions of LÖVE now that seem quite stable, and as far as I know WebGL is really similar to OpenGL ES.
This is very true. WebGL will be necessary to fully implement Love's graphics API. Unfortunately it doesn't work on mobile so what I'm currently working on is using WebGL with the 2D canvas as a fallback, while using Love's GLES branch as an example. It's looking like a lot of work, though, so I'm considering moving it into a second beta milestone. Feel free to add any comments on
the related issue.
WebGL works on Windows Phone 8.1
And many Android phones as well if you use a compatible browser (like Firefox, and I think Chrome should work too but I'm not sure).
Re: Moonshine - A lightweight Lua VM for the browser
Posted: Fri May 16, 2014 11:29 pm
by scrolly
This is very true. WebGL will be necessary to fully implement Love's graphics API. Unfortunately it doesn't work on mobile so what I'm currently working on is using WebGL with the 2D canvas as a fallback, while using Love's GLES branch as an example. It's looking like a lot of work, though, so I'm considering moving it into a second beta milestone.
Instead of trying to port Love's graphics code, what about making a lightweight wrapper around the Pixi.js library?
It seems to be the fastest 2D library out there, has very active developers, and they've already worked out all the browser-specific kinks and quirks. It's really impressive.
"2D webGL renderer with canvas fallback" -
http://www.pixijs.com/
It seems it should be possible to keep the Love API and have it call Pixi, with minimal overhead... ?
Re: Moonshine - A lightweight Lua VM for the browser
Posted: Sun May 18, 2014 3:37 am
by bobbyjones
Isn't possible to convert lua to php and just run that on the server and use ajax to communicate with the server thus making it cross compatible or am I missing something
Re: Moonshine - A lightweight Lua VM for the browser
Posted: Sun May 18, 2014 4:00 am
by ejmr
bobbyjones wrote:Isn't possible to convert lua to php and just run that on the server and use ajax to communicate with the server thus making it cross compatible or am I missing something
That server-side application could not forcibly draw anything inside of the browser. Instead it would have to return client-side JavaScript telling the browser how to perform the rendering, which brings us back to the original challenge. So offloading the code to the server would not give us any benefits in terms of cross-compatibility.
Re: Moonshine - A lightweight Lua VM for the browser
Posted: Sun May 18, 2014 7:40 pm
by bobbyjones
But one of the main concerns is not using plugins
And why not try flash. I'm pretty certain most people on here has experimented with flash so support in developing that would be high
Look up lua-alchemy
It uses a mit license
Re: Moonshine - A lightweight Lua VM for the browser
Posted: Sun May 18, 2014 9:56 pm
by Tanner
scrolly wrote:Instead of trying to port Love's graphics code, what about making a lightweight wrapper around the Pixi.js library?
I've actually been using Pixi as a reference for how to best implement certain things! But I'm skeptical about directly using another large library when the primary goal here is exactly replicate Love's API. I don't want to be a slave to two masters here, so to speak. There are a number of things that, while they could probably be made to work, would present a strange mental disconnect between the two frameworks. I'm reluctant to add that cruft to the project when it's already fairly unidiomatic JavaScript necessitated by the interop between it and Lua.
But like I said, I've definitely been using it as a reference. It does a lot of things very well and I really value it as a resource but I do not think it's a good idea to use it directly.
Re: Moonshine - A lightweight Lua VM for the browser
Posted: Mon May 19, 2014 8:04 am
by T-Bone
PixiJS' multitouch implementation doesn't work on Windows Phone though
But from a graphics point of view it does work great.