GoLÖVE?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
stcredzero
Prole
Posts: 11
Joined: Fri Apr 05, 2013 1:10 am

GoLÖVE?

Post 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/
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: GoLÖVE?

Post 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.
Help us help you: attach a .love.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: GoLÖVE?

Post 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.
When I write def I mean function.
stcredzero
Prole
Posts: 11
Joined: Fri Apr 05, 2013 1:10 am

Re: GoLÖVE?

Post 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.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: GoLÖVE?

Post by kikito »

Mmm I think you haven't thought that through. I was talking about channels and goroutines.
When I write def I mean function.
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: GoLÖVE?

Post by slime »

I believe LÖVE 0.9.0's new Channel API for threads is somewhat based on Go's channels.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: GoLÖVE?

Post 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.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: GoLÖVE?

Post 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.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: GoLÖVE?

Post 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:
When I write def I mean function.
stcredzero
Prole
Posts: 11
Joined: Fri Apr 05, 2013 1:10 am

Re: GoLÖVE?

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests