[javascript]Luv.js

Discuss any ports of LÖVE to different platforms.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

osa1 wrote:Just wanted to say I'm using Luv.js for a Real Project™ and it's great, thanks.
Wow, that's very nice! However, I have the moral obligation to warn you that I don't consider it finished yet. You might find some rough spots, and the API might still change (a little). The version number has stayed on 0.1.0 for that reason. Please do keep me posted if you have troubles.
When I write def I mean function.
osa1
Prole
Posts: 29
Joined: Sat Jun 30, 2012 7:51 am

Re: [javascript]Luv.js

Post by osa1 »

I realized that, one of the reasons I'm using luv.js is that it's simple and small, so that I can dive into the source and understand what's happening quickly(on a side note: I really hate literal programs, my editor doesn't have comment hiding option). My game's drawing parts are simple and no input handling is required.

Basically it's a game that some stuff on the screen is controlled by programs written by player. Player is writing programs in CodeMirror(a JavaScript text editor) and then screen is being updated accordingly. No dynamic input handling, and for now only some rectangles are drawn.

If I hadn't seen luv.js I would be using canvas API, my standards are already low :ultraglee:

(one another reason I choose luv.js is that the love style API I already know and use well, so I didn't have to wrap my head around another API or another style of writing games (like component based game frameworks))
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

osa1 wrote:I really hate literal programs, my editor doesn't have comment hiding option
Oh. I didn't even consider that could be an issue for anyone.

I've added a new option that generates a comments-free (illiterate) version of luv.js when luv.min.js is created. Would this help you?

https://github.com/kikito/luv.js/blob/m ... iterate.js
When I write def I mean function.
osa1
Prole
Posts: 29
Joined: Sat Jun 30, 2012 7:51 am

Re: [javascript]Luv.js

Post by osa1 »

Thant's really helpful, thanks!

What editor/IDE are you using that have comment hiding ? Or are you programming with that huge blocks of comments ?
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

Hi osa1,

I use vim, with the comments turned on. Once you get comfortable with vim movement commands, moving around from one function to the next is fast. That said, getting used to vim is a huge investment in time.

Lately I've been recommending Sublimetext to people asking me about a new editor. It's very good. And it seems that there's a comment toggler.
When I write def I mean function.
osa1
Prole
Posts: 29
Joined: Sat Jun 30, 2012 7:51 am

Re: [javascript]Luv.js

Post by osa1 »

I use vim, with the comments turned on. Once you get comfortable with vim movement commands, moving around from one function to the next is fast. That said, getting used to vim is a huge investment in time.
Heh. I'm a vim user too, here's my config: https://github.com/osa1/rcbackup

^^
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

Oh, in that case, folding the comments shouldn't be too difficult.

Here's a ruby version. JS is a matter of changing the regexp.

http://travisjeffery.com/b/2012/01/auto ... ts-in-vim/
When I write def I mean function.
osa1
Prole
Posts: 29
Joined: Sat Jun 30, 2012 7:51 am

Re: [javascript]Luv.js

Post by osa1 »

Do you have any plans on adding love.physics module? I think we can implement it using this https://code.google.com/p/box2d-html5/ or any other good physics engines.

I can help for implementation.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [javascript]Luv.js

Post by kikito »

osa1 wrote:Do you have any plans on adding love.physics module?
Box2d is out of the question. For two reasons: First of all, it's too big. It would end up taking 90% of my codebase. Second, it's too specific. I want to make a library that most games use, and I don't think most games need a physics module (at least not a realistic one like Box2d).

That said, I'm making Luv.js open an modular enough so that if someone wants to integrate it with Box2d, they can. Its objects hierarchy will not "get in the way". I'm also thinking about adding some basic collision detection facility, but something smaller than box2d. Maybe similar to bump.lua. But we'll see.
When I write def I mean function.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [javascript]Luv.js

Post by Jasoco »

Doesn't a JavaScript version of Box2D already exist anyway? It's even included in another JavaScript/HTML5 game creating API system.
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests