Area for general discussions, where people can rant and chat about anything.

Duktape Embeddable Javascript Engine

Duktape Embeddable Javascript Engine

Postby StevenP » 14 Apr 2015, 21:21

Not sure where to put this post either but I was wondering what the Devs thought about Duktape? This is an embeddable Javascript engine that's really compact (200kb of code.) Skyline uses Lua so it's not necessary but since I came across it I figured I'd share the link:

"Duktape is an embeddable Javascript engine, with a focus on portability and compact footprint.

Duktape is easy to integrate into a C/C++ project: add duktape.c and duktape.h to your build, and use the Duktape API to call Ecmascript functions from C code and vice versa."


http://duktape.org/
User avatar
StevenP
Skyline Apprentice
 
Posts: 46
Joined: 07 Jun 2014, 21:19

Re: Duktape Embeddable Javascript Engine

Postby SolarPortal » 15 Apr 2015, 09:46

we have thought about a JavaScript integration. But the next language we will introduce for scripting will be c#.
At some point we are looking at having a full c++ SDK.

We chose lua over JavaScript because its an industry standard and very friendly language to program in. It does have its downsides, such as tables( i personally don't like them to much ). But once you get your head around the language, its not bad for scripting and is quick to make things happen. Plus they already have a huge base library of commands.

Adding another scripting language at this point would not be beneficial as we will have to create a full API from the get go, which will take a lot of time away from other required tasks.

Maybe's we can look at adding JavaScript in the further future after all the major tasks have been taken care of. ;)
Good ideas though.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Duktape Embeddable Javascript Engine

Postby StevenP » 15 Apr 2015, 14:49

I agree with your decision. Although I personally think Javascript is a pretty cool language (as long as you use the good parts and stay away from the bad ;) .)

C# has been my primary language for many years now. I remember the old days when I jumped around from different languages (VB, C\C++, VBScript, Assembly, etc.) Now I pretty much just use TSQL, C# and Javascript (not including libraries or frameworks like AngularJS, JQuery, Silverlight, etc.)

I remember the days when I moved from C to VB 4 (the version at the time) and I hated it compared to C. I felt it took my power away but then I started to learn it can be a nice lazy language. :lol: The last time I used C++ was using MFC and creating ActiveX controls. :roll: Man I'll be rusty by the time the C++ SDK comes out. ;)
User avatar
StevenP
Skyline Apprentice
 
Posts: 46
Joined: 07 Jun 2014, 21:19

Re: Duktape Embeddable Javascript Engine

Postby StarFire » 15 Apr 2015, 14:55

We are looking for the best solution, so far C# mono is leading but there are a few other runtime versions which have a smaller foot print. We will have to see how the next few months of development go as to planning in an alternative script. ;)
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Duktape Embeddable Javascript Engine

Postby StevenP » 15 Apr 2015, 15:34

How would C# work when you start going cross platform (ex. Android)? I would hate to rely on Xamarin.
User avatar
StevenP
Skyline Apprentice
 
Posts: 46
Joined: 07 Jun 2014, 21:19

Re: Duktape Embeddable Javascript Engine

Postby StarFire » 15 Apr 2015, 16:13

There should not be any difference to using lua due to Skyline interpreting the code not a compiled c#. But this is a bridge we can cross a little later. ( I hope we are not overlooking something) :?
Dream the Journey, Live the Experience!
User avatar
StarFire
Skyline Founder
Skyline Founder
 
Posts: 1678
Joined: 03 Jan 2012, 18:50
Location: UK
Skill: Great creative
Skill: Programmer
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer

Re: Duktape Embeddable Javascript Engine

Postby StevenP » 15 Apr 2015, 16:18

Interpreting can be slow. Have you considered LLVM for compiling the LUA (which also works for C#)?

It's not like you don't already have your hands full :lol: but it might be worth looking into sometime. (I feel so guilty making these posts.)
User avatar
StevenP
Skyline Apprentice
 
Posts: 46
Joined: 07 Jun 2014, 21:19

Re: Duktape Embeddable Javascript Engine

Postby SolarPortal » 15 Apr 2015, 16:55

No worries. If skyline can be improved. Shouldn't it? lol hehe :P
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 7 guests