Hacker News new | past | comments | ask | show | jobs | submit login

>I'm wondering if it's a common practice to write UI code in games in javascript

It's becoming more common. Libraries like Awesomium[1] make it trivial to render browser content to an in-game texture and the V8 engine, while not 'easy' to integrate, is quite empowering in that you can have the UI code call directly into your compiled code.

>does SimCity have some type of v8 or other js engine packaged with it?

Very probably. Most games have some scripting layer in their engines to simplify implementing non-performance-critical game logic. Lua and JS are two of the most popular languages for achieving that these days.

[1] http://awesomium.com/




FWIW, we were much happier with Chromium Embedded [1] than Awesomium. Awesomium is not free for non-commercial use (something like $8,000+ if you wanted source code included, the price of the software isn't even listed on the site now), the support was terrible, and the product seemed to be not nearly as fleshed out at Chromium Embedded. The website is prettier though...

We switched to using Chromium Embedded 6-8 months ago and haven't regretted it a bit.

[1] https://code.google.com/p/chromiumembedded/


We are starting to use Chromium Embedded for all of our in-game UIs, after going through Flash and (for a brief period) CEGUI. No major regrets here. In fact, we like HTML so much that we are considering moving our game tools (level editors, etc) to HTML as well, ala Insomniac [1].

[1] http://www.insomniacgames.com/new-generation-of-insomniacgam...


I am at the moment evaluating various browser components for headless browsing and based on my own brief tests, the two best ones seem to be Chromium Embedded and QtWebKit (I would prefer to have C/C++ solution, so PhantomJS and alike are unfortunately out of question).

Does anyone have any experience / is Chromium Embedded any better than using the WebKit component that is part of Qt 5.0 (QtWebKit)? Both seem to use same JavaScript engine (V8) and it seems that using QtWebKit in headless browser scenarios in Linux environment seems to be a bit easier, but I'm kind of wondering why there seems to be more buzz around CE than QTWK. On obvious reason of course is that using QTWK in app "forces" you to use Qt in other parts of the app that can be a good / bad thing depending on the details.


That was also my experience with Awesomium. It was buggy and support is awful. I actually tried to contact them for a company which was interested in buying a commercial license -- blows my mind that they'd get emails basically saying "we want to give you thousands of dollars" and not even answer. It may have improved since then but I'd be wary of introducing a dependency on it...




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

Search: