Hacker News new | past | comments | ask | show | jobs | submit login
Liquidfun – 2D physics engine for games (github.com/google)
162 points by iamtechaddict on March 20, 2014 | hide | past | favorite | 63 comments



  For applications on Google Play that integrate this tool, 
  usage is tracked. This tracking is done automatically using 
  the embedded version string (b2_liquidFunVersionString),
  and helps us continue to optimize it.
Is this tracking functionality restricted to libraries by Google employees? Seems like it would be useful for all third-party library developers to see how their libraries are being used and can be improved.



    "For applications on Google Play that integrate this tool, usage is tracked."
Imagine if every open source library did that.


> Since this is open source, you are free to remove the version string but we would appreciate if you would leave it in.

It's easy to remove, and they only track which apps use it to gauge how popular it is. Hardly evil.


I'm not implying it is evil. I just imagined what would the world look like if everyone was doing that.


Oh sorry, I guess I read your comment before reading what the tracking is about and thought they tracked all usage (i.e. user actions, in-game).


What did you imagine?


Data. Data everywhere.


An interesting discussion came up after the .NET Glimpse library included opt-out analytics:

https://groups.google.com/forum/#!topic/getglimpse-dev/KA95n...

A big part of the decision is opt-out vs. opt-in, and how it would even be possible to make opt-in return meaningful results in a library. Also, one of the main problems was managing the expectations of the users of the library, many of whom would only install it through a packaging system which provides little means of documenting that tracking is included and enabled by default.

Here is the initial thread sharing a user's surprise:

https://groups.google.com/forum/#!topic/getglimpse-dev/7WgpX...


Popularity Contest?

http://popcon.debian.org/


Pretty sad they decided to do this, actually.


They're not the only ones to do this. Vuforia is worse, it's free, which is tempting, but then Section 8 (i) of the license agreement[0] states:

"each end user consents to the collection, storage, and use by QCE and its affiliates and service providers of Statistics from the Software and the transfer of Statistics between QCE and its affiliates and service providers (which may be in the United States or in other countries), in each case for the purposes of (a) facilitating the provision of new products, updates, enhancements and other services, (b) improving the Software, and other products, services and technologies, and (c) providing new products, services or technologies to You and customers of QCE and its affiliates;"

To be fair, they're giving away a great SDK for free that they've put a lot of effort into, so they can demand what they like from the license. Google can too - you don't have to use the free stuff they're giving away.

[0] https://developer.vuforia.com/legal/license/2-8


Hm, what are the data protection act implications of this ?


I think as long as you tell the user then you're ok. If the user wanted to find out what information the Vuforia guys have collected they would have to ask them, pay the £10 (in the UK), and then it would be up to the Vuforia people.

I use to be the "Data Protection Expert" at a firm a few years ago, but really all that happened was they sent me on a course and I read the rules. Never had to actually deal with a case.


Eh? It's not like they sneak it in.


They say that this is an extension of Box2D, not a really new engine. This is kind of important, because the simulation of soft spherical particles is a much easier problem than the simulation of rigid bodies. (Unless they are doing some fancy things I'm not aware of). Maybe, there is some complexity in handling both soft and rigid bodies, but I don't think that there should be a problem.


I wonder why they came up with a new library instead of contributing to box2d directly? Unless they had to break box2d's API (but off the top of my head, without looking at the code, it's hard to see why they would have to)


What's wrong with creating something new?

If someone decides to attempt something but there's already a similar project, why do so many think they should abandon their own to contribute to the other?

They can always contribute down the road.


Creating a large software project is hard and time consuming. Lets use an analogy to help visualize it: say, building Eiffel Towers.

If everyone collaborated on a few such projects, we'd have a few really great Eiffel towers scattered around.

If everyone started their own, we'd have a million piles of metal all over, and very few towers.


Coordinating with random people over the internet is also very hard and time consuming and fraught with all sorts of problems like NIH, bike shedding, etc, particularly if you're the "newbie" trying to get changes into the existing project.

Sometimes it is easier to work within an existing project and sometimes it is easier to just fork to meet your own needs, unimpeded by the pace of the original project's maintainers... neither choice (to fork or not to fork) is correct for all situations.


I think your analogy, while a good one, is quite a bit off on scale there.

But if I wanted to attempt to build my own Eiffel Tower in my backyard, why is it bad that I wish to do so? Maybe I just want to do it to see if I can accomplish it?


>I think your analogy, while a good one, is quite a bit off on scale there.

According to wiki.answers, it took 300 people just over two years to build the Eiffel Tower.

Now compare that to Linux, or Gimp, or any other large OSS project and tell me the scale is still off. Or were you claiming that I was off in the other direction? In which case... I might agree with you. ;-)

> But if I wanted to attempt to build my own Eiffel Tower in my backyard, why is it bad that I wish to do so? Maybe I just want to do it to see if I can accomplish it?

It depends entirely on your motive and goal. If your goal is to build it yourself, if your motive is just "see if I can build this with my own power" then there is nothing at all bad. I applaud that. If your goal is to make the best software to fill a certain gap, if it's to make the world a better place with the highest change/effort ratio, then I would argue that adding your knowledge & power to an already existing project is the better way.


Because my todo list finally gets it right.


And it's the best todo list ever.

Until I make mine...


Because if everyone did that, there would be so much noise that any signal would be lost.


Welcome to open source.


i'm guessing this lets them both build on top of box2d and experiment/iterate more rapidly than waiting for patches to be integrated would.


It's interesting how much Google is using Github. Will we see an acquisition of Github in the near future?


There was a time I would have really hoped for that. When Github was still new and the only, pathetic, alternatives were SF and Google Code. But back then, Google had its head stuck all the way up SVN's trunk.

Now I really hope they don't acquire Github. No website I know of has improved in such a consistently good way. Pure UI improvements, awesome new features and no feeling of feature creep on the user side (I don't feel overwhelmed by Github's features at all, I just want to try them all!).

Google does a decent job on their apps but I honestly think Github is a much higher quality shop: do one thing and do it extremely well.

With all that said, how much Google uses Github has little to do with acquisitions. They also use Twitter and you won't see them acquiring that.


+1 for "had its head stuck all the way up SVN's trunk"

Awesome phrase that I shall steal for myself. Like, "the team wanted to use Git but management had their head stuck all the way up SVN's trunk."


> I honestly think Github is a much higher quality shop: do one thing and do it extremely well.

You're saying this because you haven't heard about or used atom.io ;)


I've heard about it. I have an invite left in fact if anyone wants. As a linux user though it's useless to me currently.

But atom.io is not part of Github. Sure, it's made by them, but when I talk about Github I mean the website.


If you still have the invite I'd love it. Email's in my profile.


Ung. Imagine having to use your Real Name with Google Plus to use GitHub.....


It reminds me of the YouTube story. Google tried to do the same with Google Video and finally gave up and bought YT.

Google tries with Google Code now, but GitHub has probably much more traction. So, you may be right. I'm just not sure if they would do it, because the monetization is different. Or will we see AdSense inside GitHub pages for open repositories ;)

Probably does not make sense to them, most GitHub users are programmers who surf the web with ads disabled.


Github has lots of paying users too.


Regardless, I bet Google Code will be shut down soon.


I didn't spot a liquid (without particles) looking demo in the videos - would that be easy to make? Would you be able to make visuals look like Wii's Fluidity game using this easily?


Yes, you basically render the particles as metaballs for that sort of effect. Should be doable in glsl, though I haven't personally done it.

Edit: here's a video showing the technique: http://vimeo.com/4391370


Yep, those kind of 2d metaballs are indeed doable in GLSL - I have a WebGL proof-of-concept lying around. I really struggled to get good performance, though my shader-fu isn't up to much.


Metaballs are too expensive for more than a few particles. There are probably some other algorithms that would work better, or not doing metaballs strictly.


I found metaballs as very efficient when using pixel shader. I did port my js fluid simulation to C++ and used cocos2dx with shaders to do it for iphone. Works good.


Rendering rigid bodies as metaballs is a big step away from buoyancy


Looks like:

- OE-CAKE[1]

- Phun/Algodoo[2]

Which may give some examples of what could be done with this.

[1]http://www.teq.com/blog/2010/03/oe-cake-physics-simulator/

[2]http://www.algodoo.com/what-is-it/


How long before an emscipten js version?


For what it's worth, Magnum integrates Bullet and can target Emscripten, NaCl and Linux/Win/OSX PCs.



Every time I see code.google.com my brain anticipates the pain and it actually hurts. Please don't do that again. Even Google is using Github now.


I assumed it was a js lib when I saw it. Made me kind of confused when there were no live examples, only videos.


Good to know there are still people out there that code in something other than Javascript.


afaik there is a javascript port of Box2d, the engine this is based on - so it wouldn't be too difficult to add the particle code to it.


It's surprisingly reasonable that they did not use Python or JS for it. I wonder how they came up with this project though - do they want to boost Android/NaCl games?



It's pretty cool, but not useful for games due to performance limitations (especially for mobile devices).


Shamelessly plugging my library for js : https://github.com/asadlionpk/SPHjs


The liquid seems a bit compressible, more like balls of jello or rubber than water. Is that a difficult or costly problem to resolve when simulating liquids?


Anyone see the Strandbeest in the video?


Well, it said "Theo Jansen's Walker" so it was kinda hard to miss :)


Oh, I found the other stuff too cool to notice any text :p


The music fits surprisingly well, its Interstate by The Juice To Make It Happen, whoever they are.


I somehow expected JS...


I expected Dart...


Someone make a realistic surfing game!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: