Jump to content
  • Advertisement
Sign in to follow this  
Nanook

lua vs v8

This topic is 1795 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm been working on a engine for about 3 years, but had a break from it for some months now. Diving back into it now and I'm going to embed some scripting language for it. I thought I had decided on JavaScript with V8, but now I'm thinking maybe I want to use Lua instead. I'm having trouble making up my mind.

 

I'm intrested to hear from people using either of them and why you chose the one you did. Does someone know of some engines that uses either of them that I can look at some examples on how it used?

 

 

Share this post


Link to post
Share on other sites
Advertisement

Lua is used more widely for scripting, so there's a lot of knowlege and third-party systems for making integration easier. For myself I'd actually prefer javascript (ecmascript, actually) -- there's nothing wrong with Lua though, I just feel that ecmascript is a more useful skillset all-around. Unfortunately the knowlege and tooling for integrating v8 isn't really there, so you're on your own for the most part. To its benefit, ecmascript is also easy for people with a background in flash or front-end web development to 'transition' to, which could be a way to differentiate your engine from all the rest.

Share this post


Link to post
Share on other sites

I'm interested in the same topic and made some research.

First of all, v8 is faster than pure Lua but slower than LuaJIT. I know that both Lua and LuaJIT successfully implemented in different engines and games. I haven't heard of a decent engine\game that implements v8 though.

 

Lua is a very cute language, I had some experience with it. Its widely used in games, so there should be a lot support for it.

JavaScript on the other side is getting very popular now because of web developers who uses it, node.js. So consider this if you are planning to find people who have experience in JavaScript. However there are no documented experience of using v8 as a game scripting language, so consider this as well.

 

my 2 cents

Share this post


Link to post
Share on other sites

Lua is very easy to implement and to bind to other languages. I'm guessing that's a large reason as to why it's mainly used in AAA games. It's also a small footprint which I've heard Javascript engines are not compared to Lua.

Edited by rpiller

Share this post


Link to post
Share on other sites

Does it make sense to use stuff like node.js in the scripts to write a server all in js? I've never used node.js before so not sure how it would work, but a friend of mine said that could work? 

Share this post


Link to post
Share on other sites

Nanook,

Node.js is just a software platform written in C, C++ and JavaScript. The core of node.js is written in C and C++ with bindings to JavaScript. And yes, it is possible to create a web server entirely with node.js. I'm not going to say you should do that before I'll know what your needs are.

 

As for scripting, I wanted to create scripting engine with JavaScript, simply because I love JavaScript, but I assume its easier and more common to use Lua because it was already tested and proved to work. And I agree with previous comments, Lua is very lightweight.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!