Moonshine - A lightweight Lua VM for the browser

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Moonshine - A lightweight Lua VM for the browser

Post 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 :neko: 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).
scrolly
Prole
Posts: 5
Joined: Thu Feb 27, 2014 6:10 am

Re: Moonshine - A lightweight Lua VM for the browser

Post 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... ?
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Moonshine - A lightweight Lua VM for the browser

Post 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
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Moonshine - A lightweight Lua VM for the browser

Post 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.
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Moonshine - A lightweight Lua VM for the browser

Post 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
User avatar
Tanner
Party member
Posts: 166
Joined: Tue Apr 10, 2012 1:51 am

Re: Moonshine - A lightweight Lua VM for the browser

Post 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.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Moonshine - A lightweight Lua VM for the browser

Post by T-Bone »

PixiJS' multitouch implementation doesn't work on Windows Phone though :roll: But from a graphics point of view it does work great.
Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests