whats this im hearing about reciver being written in javascript? im currently working on a game in webgl but I had know idea you could port it too the desktop? is that what that resolution configurer thing at the start the im seeing more and more frequently in games is? like tale of tales: "the graveyard" has the same menu, is it an engine im seeing?

Yeah I opened the project, it is Javascript.
But this is well known amongst people who know what engine it uses.
Essentially, it's sort of like modding Unity. (Not really, but it's the only possible way I can explain it to who's new to these things)

Think of Garry's Mod: You can script stuff for it in Lua, but the core game surely wasn't written in Lua.

andrikaa wrote:What exactly is javascript? and is there a way I can enable it on my computer because when I'm on different websites I keep getting pop-ups saying that I need javascript to continue.

Not really relevant to the discussion but I'll answer you anyway.

Javascript is a interpreted programming language, meaning it is used to create software or webpages on the fly, which are compiled when you run the scripts.

Javascript should run by default if you have a modern browser. If you're using a browser like Internet Explorer, Safari, or Opera, you'll want to upgrade to a more consistently updated (and better) browser like Mozilla Firefox or Google Chrome.

In both Unity and your web browser (assuming your browser uses Gecko (e.g. Firefox) or WebKit (e.g. Chrome)) you can program things using JavaScript (Trident (e.g. Internet Explorer) for example implements JScript instead, but see the next sentence).
Actually, Unity does not implement JavaScript, but an ECMAScript dialect (one of which is also JavaScript).

That does not mean that you can easily execute code written for the one with the other.
While the language itself stays the same (assuming you use the same dialect or restrict yourself to the common elements), the execution environment changes.

will only work in your browser (unless Unity has/adds it own alert-function).
The alert-function is not part of JavaScript itself, but is provided by the browser as an environment so you can interact with it.
Likewise, Unity will provide things to interact with the game engine.

Some libraries providing additional functionality could be used in both of them, perhaps something like Box2D, if it is written purely in a compatible dialect without using any 'external functionality'.

And you can theoretically implement a JavaScript engine anywhere. You could use it as the default shell of an operating system if you wished to do so. You can write web servers in Javascript, see node.js.

Unity also allows use of other languages, like C# and a Python-dialect called Boo.

APsychonaut wrote:

Razor wrote:
Think of Garry's Mod: You can script stuff for it in Lua, but the core game surely wasn't written in Lua.

off topic: Source is either in C or C++

Source is written in C++, though some code fragments look like C and there are a few lines inline assembler.
The build-system also used to have some Perl, not sure if it's still there.
And Shaders are written in HLSL, though maybe they switched to GLSL or something for OS X and Linux, or perhaps they use a HLSL->GLSL translation tool.
And you could argue that they've implemented a programming language for use in mapping, that is their I/O system. I have no reference to back this claim, but my guess is that it's even turing complete with the entities provided by default. It's a stretch to call that a programming language anyways.

UnityScript as it should be called, has some slight syntax similarities to JavaScript and that's where the similarities end.
It's horribly confusing for anyone trying to learn UnityScript or actual JavaScript, especially if you come across documentation on the wrong one.

What is UnityScript?
It's a Mono/.NET Common Language Infrastructure language ( just like C# or Boo) that was designed to be used with Unity3D. It's compiled into Mono CLI bytecode; Unlike JavaScript it's not an interpreted language. Unlike JavaScript it's a statically typed language.
Its syntax more closely resembles JScript.NET than JavaScript.
It seems to have simply sprung into existence from Unity's development and has no official language specification. I personally hate it for this.
That said, it's fairly easy to use and an OK language. Until you need to manually type cast something or actually want to know what features you can expect from your programming language.

JavaScript is a disgusting waste of time that some guys threw together in a back room when they realized they needed something for webpage programming. They told themselves "We'll fix it later, this is only temporary." but before they could rectify their abomination by inventing HTML5 on the spot, a unicorn pranced in and impaled them all, leaving us stuck with JavaScript.