Page 1 of 1

GoLÖVE?

Posted: Tue May 14, 2013 12:39 am
by stcredzero
Would it be difficult to combine LÖVE with the Go programming language? Is LÖVE heavily dependent on dynamic language properties? I note there was a lov8 project that used Javascript and V8 instead of Lua https://code.google.com/p/lov8/

Re: GoLÖVE?

Posted: Tue May 14, 2013 2:58 pm
by Robin
I'm not an authority on this subject, but I don't think it would be easy, at least not if you want to keep it lovely.

Re: GoLÖVE?

Posted: Wed May 15, 2013 7:56 pm
by kikito
Go is an awesome language and I think it has big potential for games.

Pros:
  • The roots are clean and small (a bit like Lua on that regard)
  • Creating & using libraries is simpler than in Lua
  • Go does some extremely interesting stuff with threads. Lua's concurrency model can't really hold a candle to that. Games could benefit from this in a number of ways.
  • It's quite fast. I can't say for sure, but I think it is faster than Lua.
Cons:
  • Go is not designed to be as embeddable as Lua. Creating a "love-like" program in Go, which accepted zip files, would be messier. It would probably be much simpler to create a library instead of a runtime.
  • Go is not available in many platforms: mac, win, linux, and that's it. I realize that LÖVE is the same, but Lua exists in mobile phones.

Re: GoLÖVE?

Posted: Wed May 15, 2013 9:33 pm
by stcredzero
kikito wrote:
  • Lua's concurrency model can't really hold a candle to that. Games could benefit from this in a number of ways.
If one can dump one's own events on the LÖVE event queue, then you can get "reasonably close" to a concurrency architecture close to Go's.

Re: GoLÖVE?

Posted: Wed May 15, 2013 10:11 pm
by kikito
Mmm I think you haven't thought that through. I was talking about channels and goroutines.

Re: GoLÖVE?

Posted: Wed May 15, 2013 10:17 pm
by slime
I believe LÖVE 0.9.0's new Channel API for threads is somewhat based on Go's channels.

Re: GoLÖVE?

Posted: Wed May 15, 2013 10:49 pm
by bartbes
I'll freely admit I may have borrowed some ideas from go for that...
Which is also, coincidentally, the reason why there's a blocking send in that api.

Re: GoLÖVE?

Posted: Thu May 16, 2013 6:10 am
by T-Bone
Go is still relatively new, isn't it? It's developed by Google, so it wouldn't be all that surprising if Android got Go support at some point.

Re: GoLÖVE?

Posted: Thu May 16, 2013 7:45 am
by kikito
bartbes wrote:I'll freely admit I may have borrowed some ideas from go for that...
Which is also, coincidentally, the reason why there's a blocking send in that api.
That is so cool! :ultrahappy:

Re: GoLÖVE?

Posted: Thu May 16, 2013 9:57 pm
by stcredzero
kikito wrote:Mmm I think you haven't thought that through.


Ditto.
kikito wrote:I was talking about channels and goroutines.
Me too. If you have some kind of asynchronous queue that you can dump stuff into and set up callbacks on, then you effectively have channels. In fact, you could have the queue serve as all the channels, so long as you're careful. (No functions that run for long at all.) Also that fancy concurrent switch thingy Go has, you can implement the equivalent that way. It's all a bit more verbose and less elegant. Lua has coroutines. That about covers it, I think. It's not as elegant or as bulletproof as what Go gives you, but it's workably close enough.