Giter Site home page Giter Site logo

ghoulsblade / love-webplayer Goto Github PK

View Code? Open in Web Editor NEW
239.0 239.0 33.0 2.9 MB

WebPlayer for Love2D engine games (webgl+javascript)

Home Page: http://ghoulsblade.schattenkind.net/wiki/index.php/Love-WebPlayer

License: zlib License

Lua 5.50% Logos 3.88% PHP 0.76% JavaScript 89.85%

love-webplayer's Issues

Pysfs

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.

Get Clouds example to work with Weblua

I'm breaking up #17 piece by piece, since it's such a massive refactor. So for the first thing, I'm going to try to get the Clouds example working with weblua. I want to do the simplest ones first, working my way up the complexity chain until all existing examples work.

Port Hawkthorne to Weblua

Biggest, longest, most extensive porting project that we'll ever do with love-webplayer. Might as well get started now.

how about pixijs + love?

I was wondering if it were possible to use pixijs as the renderer for love-webplayer. pixijs uses webgl and has a backwards compatibility to canvas and pixijs is faster.

"Pixi.js is a rendering library that will allow you to create rich, interactive graphic experiences, cross-platform applications, and games without having to dive into the WebGL API or grapple with the intricacies of browser and device compatibility. Killer performance with a clean API, means not only will your content be better - but also faster to build!"

pixijs: http://www.pixijs.com/

Single file / require

Hi,

I think requiring the files like this just doesn't cut it:

<script type="text/javascript" src="../js/lua-parser.js"        ></script>
<script type="text/javascript" src="../js/lua-parser-utils.js"  ></script>
<script type="text/javascript" src="../js/gamepad.js"      ></script>
<script type="text/javascript" src="../js/jquery.js"      ></script>
<script type="text/javascript" src="../js/jquery.hotkeys.js"      ></script>
<script type="text/javascript" src="../js/utils.js"         ></script>
<script type="text/javascript" src="../js/utils.webgl.js"       ></script>
<script type="text/javascript" src="../js/love.render.js"       ></script>
<script type="text/javascript" src="../js/main.js"          ></script>
...

I see two options:

  • Using a tool like Uglify to bundle all the js files into a single one (maybe as part of a "push" task, so it is done automatically every time you push new stuff to github)
  • Including a lib like requirejs so that a single file (love.js) can use it to require all the files it needs.

Switch from existing Lua parser to Emscripten-based one

lua-parser.js sucks, and it's too much work for us to fix it on our own.

My current porting project for Hawkthorne is a nightmare thanks to the multitude of "unfinished business" in the current Lua parser. In order to get vendor libraries to work, someone would have to implement string.match, at least far enough for the following line to work:

local _PACKAGE = (...):match("^(.+)%.[^%.]+")

No. Fuck that. I'm done.

There's a better way, just waiting for us to use it.

People have compiled Lua to JS with Emscripten. This is a legit compilation of the actual C source code into Javascript. The interpreter acts the exact same way as the "real deal," because it pretty much is. There are no surprises, no unimplemented features, no parser-specific craziness to waste days debugging.

We switch our internal parsing and compilation to that, and we get a fast and accurate Lua base on which to build our kingdom.

Will this be hard?

Some parts yes, some parts no. The basic architecture should be easy to switch out, but it's the surrounding stuff (especially our customizations to the old lua-parser.js code) where we will likely run into trouble. All our existing code is built on lua-parser, and examples may temporarily break during the transition.

That said, the change is really, really worth it. A consistent, correct, and uncrippled Lua parser is essential to porting any sort of advanced game to Webplayer.

Who will do it?

Probably me. I'm the most highly motivated, all my work can happen in a toy branch over in my repo while we get it up to snuff for merging, etc. But with the satellite concerns, such as supporting other demos, it's more than a one-man job.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.