Love2D WebPlayer (WebGL)

Discuss any ports of LÖVE to different platforms.
Post Reply
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

Re: Love2D WebPlayer

Post by ghoulsblade »

loading doesn't seem to continue during the freeze, at least the javascript image objects .isloaded (or so) var isn't updated it seems =(
maybe because js is singlethreaded
i still have to test more, but first few experiments looked bad.
love-android - gamejams
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Love2D WebPlayer

Post by tsturzl »

I was wondering if anyone was currently tackling the implementation of physics. I was considering it since I'm pretty well versed in Box2D, as well as the flash/Javascript implementation of it. I'd hate to start work on it and find out that someone already started one and have my work go to waste.

The only problem I see thus far is the flash version of box2D is beyond that of love 0.7.2, thus Fixture objects have been implemented which breaks backwards compatibility. Maybe I can dig through the repositories of the box2d flash implementation, find a suiting implementation and compile the AS to JavaScript, then implement that into Love2D WebPlayer? What say you guys/gals?
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Love2D WebPlayer

Post by slime »

LÖVE 0.8.0, which uses Box2D 2.2 rather than 2.0, is planned to be released within the next few days.

(famous last words.)
User avatar
TechnoCat
Inner party member
Posts: 1611
Joined: Thu Jul 30, 2009 12:31 am
Location: Milwaukee, WI
Contact:

Re: Love2D WebPlayer

Post by TechnoCat »

slime wrote:LÖVE 0.8.0, which uses Box2D 2.2 rather than 2.0, is planned to be released within the next few days.

(famous last words.)
I've heard that one before. :roll:
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Love2D WebPlayer

Post by tsturzl »

TechnoCat wrote:I've heard that one before. :roll:
So we've got a few months to worry about implementing webplayer up to Love2d 0.7.2...

I'd say that it might be a wasted effort porting box2D 2.0 to the webplayer if we're just going to end up having to rewriting it once 0.8.0 comes out.

However, there isn't any 0.8.0 love.physics docs(or at least not that I know anymore), and sorry if I don't want to dig through the source of 0.8.0 to find out. That is after all the reason documentation exists...

Why not document before implementing... I could never develop without prior documentation. I document almost every variables and method in almost every object in projects before I start coding. Seems like better practice(also more timely).
User avatar
tsturzl
Party member
Posts: 161
Joined: Fri Apr 08, 2011 3:24 am

Re: Love2D WebPlayer

Post by tsturzl »

ghoulsblade wrote:
tsturzl wrote:This could possibly kill the Love Android project then. If ishkabible is right about the performance, then I see no perks of Love Android over this
but! but! but the awesome thing about android/smartphones are multitouch and sensors (tilt/gravity, compass,...) ;)
There are javascript APIs for basically all phone functions. PhoneGap, Titanium/appcelerator, Mobl, many many more.

You don't really need to worry about it then, just kind of direct the developer to those libraries/frameworks.
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

Re: Love2D WebPlayer

Post by ghoulsblade »

i'd prefer a pure javascript box2d without adding flash as dependency if it isn't needed.
This way it might even work on some newer smartphones that might not have flash (iphone? but i don't know much here)
I think there is one implementation for js but it's low prio for me.
Let's aim for the 0.7.2 api for now where we have docs and stable release.
If you want to make the box2d binding in js/love.physics.js please do, i'd be a big help, and noone is working on that yet afaik =)
I'm often in love irc as ghoul/ghoulsblade if you need some help how to make the js-lua binding, also love.audio.js/love.graphics.js/love.font.js have examples of how to bind objects.
love-android - gamejams
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

Re: Love2D WebPlayer

Post by ghoulsblade »

keyboard+joystick support from technocat merged,
preload for images added, and annoying alert box removed. example for preload list in index.html :

Code: Select all

<body onload="MainOnLoad(['body.png','cloud_plain.png','ear.png','face.png','love.png'])">
a warning including preload-list instructions will be printed if the error is detected at runtime, but this might not happen if your browser loads fast enough so try not to forget ;)
love-android - gamejams
User avatar
SiENcE
Party member
Posts: 806
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

Re: Love2D WebPlayer

Post by SiENcE »

I talked with ghoulsblade about an future Webplayer integration into this forum or a special löve website to upload and play löve games via webplayer. You can think of a comments and rating section. It could also be added to the löve gamejam site.

What you think?
User avatar
ghoulsblade
Party member
Posts: 111
Joined: Sun Oct 31, 2010 6:11 pm

Re: Love2D WebPlayer

Post by ghoulsblade »

added josefnpat tutorials, they basically work after i added conf.lua loading to get a global var init.
Rectangle and text are missing still, but meh, you can shoot XD

http://ghoulsblade.schattenkind.net/lov ... 0-%20info/
http://ghoulsblade.schattenkind.net/lov ... 42gb_v1.0/
http://cupm.net/public/love2dtutorial/

"Webplayer integration into this forum or a special löve website to upload" : would be cool, i won't have time to make one =)
it'd need to unpack an uploaded .love file, and add a index.html + js/ folder from lovewebplayer,
would also need to secure against unpacking .php or similar during unzip that could be "executed" on the server by viewing later.
prolly limit to ".lua,.png,.gif,.jpg,.ogg,.wav,.mp3,.xm" etc.. files
love-android - gamejams
Post Reply

Who is online

Users browsing this forum: Google Adsense [Bot] and 0 guests