http://moonshinejs.org/
I haven't had a chance to play with this yet but I would be interested to see if this could be leveraged to really get Love2D in the browser. Most of our SDL calls could be replicated through a JS API. I'll probably do some benchmarks and practical tests tonight if nobody beats me to it.
Moonshine - A lightweight Lua VM for the browser
Re: Moonshine - A lightweight Lua VM for the browser
The company responsible for it actually wants to port the LÖVE webplayer to it I think. They did a talk a while ago, let me find it...
http://2013.capitoledulibre.org/confere ... e-web.html
http://2013.capitoledulibre.org/confere ... e-web.html
- master both
- Party member
- Posts: 262
- Joined: Tue Nov 08, 2011 12:39 am
- Location: Chile
Re: Moonshine - A lightweight Lua VM for the browser
OMG, It's true, it says at 24:03 in the video and it look really promising.
Re: Moonshine - A lightweight Lua VM for the browser
Hey, that's cool! I should maybe contact him to see if he's done anything on that front.OttoRobba wrote:The company responsible for it actually wants to port the LÖVE webplayer to it I think. They did a talk a while ago, let me find it...
http://2013.capitoledulibre.org/confere ... e-web.html
In the meantime, this is what I did last night: https://github.com/TannerRogalsky/moonshine-love2d
It's not much. Essentially just the load, update and draw callbacks hooked into the luv.js callback loop. It's not really a benchmark but the delta times in the update loop look good, you know, for doing nothing. The main issue I've run into is that, because of the ways in which javascript and lua prototypes differ, calling out into a javascript prototypes function can result in the scope for that js function being wrong.
For example: upon calling
Code: Select all
love.canvas.setBackgroundColor(255,0,30)
Code: Select all
love.canvas:setBackgroundColor(255,0,30)
Re: Moonshine - A lightweight Lua VM for the browser
I really wish Love games could work in the browser. I know work has been done in the past but as I understand, it is out of date and I don't have the skills to contribute in any meaningful way. I've spent so long waffling back and forth between platforms to learn to make games on without making any progress, but I've come back to Love due to the great community here and open source, cross platform nature of the framework. The recent work on android has been super exciting to watch too! It would be so much simpler to show off my work if I could put it on a webpage. I think it would hold me more accountable to making progress.
Re: Moonshine - A lightweight Lua VM for the browser
That's my intention with this. Project's like luv.js are great but in order for it to really work, I think, it needs to work with existing Lua code and without browser plugins.Reef wrote:I really wish Love games could work in the browser. I know work has been done in the past but as I understand, it is out of date and I don't have the skills to contribute in any meaningful way. I've spent so long waffling back and forth between platforms to learn to make games on without making any progress, but I've come back to Love due to the great community here and open source, cross platform nature of the framework. The recent work on android has been super exciting to watch too! It would be so much simpler to show off my work if I could put it on a webpage. I think it would hold me more accountable to making progress.
Unfortunately, it looks like there is definitely a problem with Moonshine respecting a prototype instance function's scope. I've opened an issue here: https://github.com/gamesys/moonshine/issues/12
We'll see if anyone picks it up. It doesn't seem like it would be easy for me to fix by myself.
Re: Moonshine - A lightweight Lua VM for the browser
The moonshine-love2d project is actually pretty neat!
I got my project up and running really quickly: https://twitter.com/qw00k/status/464147673990561793
I'll be down to contribute when I have more time.
I got my project up and running really quickly: https://twitter.com/qw00k/status/464147673990561793
I'll be down to contribute when I have more time.
Re: Moonshine - A lightweight Lua VM for the browser
Very cool, the readme is a bit confusing.
Re: Moonshine - A lightweight Lua VM for the browser
This looks really cool! Can confirm that it runs quite well on IE on WP, which is nice. I agree with the goals of getting a plug-in free LÖVE solution in the browser, that would be a huge step forward in comparison to what we're doing now.
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.
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.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: Moonshine - A lightweight Lua VM for the browser
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.jjmafiae wrote:Very cool, the readme is a bit confusing.
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.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.
Who is online
Users browsing this forum: No registered users and 2 guests