Page 2 of 4

Re: [javascript]Luv.js

Posted: Sat Apr 13, 2013 9:18 pm
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.

Re: [javascript]Luv.js

Posted: Sun Apr 14, 2013 9:51 am
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))

Re: [javascript]Luv.js

Posted: Sun Apr 14, 2013 12:25 pm
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

Re: [javascript]Luv.js

Posted: Sun Apr 14, 2013 12:37 pm
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 ?

Re: [javascript]Luv.js

Posted: Sun Apr 14, 2013 7:59 pm
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.

Re: [javascript]Luv.js

Posted: Mon Apr 15, 2013 8:29 am
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

^^

Re: [javascript]Luv.js

Posted: Mon Apr 15, 2013 2:08 pm
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/

Re: [javascript]Luv.js

Posted: Mon Apr 15, 2013 4:31 pm
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.

Re: [javascript]Luv.js

Posted: Mon Apr 15, 2013 8:24 pm
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.

Re: [javascript]Luv.js

Posted: Tue Apr 16, 2013 5:55 am
by Jasoco
Doesn't a JavaScript version of Box2D already exist anyway? It's even included in another JavaScript/HTML5 game creating API system.