lukecfairchild Posted July 29, 2016 Share Posted July 29, 2016 So I heard that they are going to support scripting in the game using LUA. I would like to suggest possibly a javascript api aswell. Why? I like javascript more than LUA. I know some people aren't going to support this, but I figured it wouldn't hurt to at least request something I like. FYI: I tried looking for javascript, but the forum won't let you search for that word. So if someone else has suggested this, sorry. Link to comment Share on other sites More sharing options...
Anaximander Posted July 29, 2016 Share Posted July 29, 2016 Your post reminded me of this.LUA works due to the game engine's heavy use of C++ code. Look up Unigine 2.They code an MMO, not a mobile game :V . Hunter, Nebenfigur, gyurka66 and 1 other 4 Link to comment Share on other sites More sharing options...
The_War_Doctor Posted July 29, 2016 Share Posted July 29, 2016 Your post reminded me of this. LUA works due to the game engine's heavy use of C++ code. Look up Unigine 2. They code an MMO, not a mobile game :V . well....I mean iv played at least 1 mmo that still exists coded entirely in java but im no professional. but I don't foresee them being able to support javascript and lua at the same time Link to comment Share on other sites More sharing options...
Anaximander Posted July 29, 2016 Share Posted July 29, 2016 well....I mean iv played at least 1 mmo that still exists coded entirely in java but im no professional. but I don't foresee them being able to support javascript and lua at the same time Which MMO is that? I always wanted to see something colossal held together by glue. Link to comment Share on other sites More sharing options...
The_War_Doctor Posted July 29, 2016 Share Posted July 29, 2016 Which MMO is that? I always wanted to see something colossal held together by glue. Runescape was a fully javascripted game up until recently. they recently switched to HTML5 but if you look at the oldschool runescape game they have from 07 that's a 3d game in java Link to comment Share on other sites More sharing options...
Anaximander Posted July 29, 2016 Share Posted July 29, 2016 Runescape was a fully javascripted game up until recently. they recently switched to HTML5 but if you look at the oldschool runescape game they have from 07 that's a 3d game in java It's also isometric and of far less mechanics though. Just saying. C++ is the real powerhouse for MMOs of insane scale and potentials. Javascript or Java on its own, it's not as tough as C++ is. And Unigine 2 was made in Russia. Rus-C-a. Can't blame them for it :V *BadPunSpreeContinues* Link to comment Share on other sites More sharing options...
The_War_Doctor Posted July 29, 2016 Share Posted July 29, 2016 It's also isometric and of far less mechanics though. Just saying. C++ is the real powerhouse for MMOs of insane scale and potentials. Javascript or Java on its own, it's not as tough as C++ is. And Unigine 2 was made in Russia. Rus-C-a. Can't blame them for it :V *BadPunSpreeContinues* hey for a game that's been around since 01 its not in bad shape though lol. Link to comment Share on other sites More sharing options...
Cybrex Posted July 29, 2016 Share Posted July 29, 2016 It's also isometric and of far less mechanics though. Just saying. C++ is the real powerhouse for MMOs of insane scale and potentials. Javascript or Java on its own, it's not as tough as C++ is. And Unigine 2 was made in Russia. Rus-C-a. Can't blame them for it :V *BadPunSpreeContinues* We aren't Putin up with your bad puns anymore. Anaximander 1 Link to comment Share on other sites More sharing options...
Anaximander Posted July 29, 2016 Share Posted July 29, 2016 hey for a game that's been around since 01 its not in bad shape though lol. Exactly. It was made for an era that internet connections were not that strong and Java suited them. The same reason why mobile games are mostly coded in Java as well. Limitations. A PC these days has no such limitations in place anymore. Link to comment Share on other sites More sharing options...
ShadowLordAlpha Posted July 29, 2016 Share Posted July 29, 2016 well might as well get in on this. Java and C/C++ have very little actual performance difference with the main difference being the garbage collection areas of both languages with C/C++ leaving it up to the developer and Java basically doing it for the developer. (some people seem to be ratting on Java for some reason so thats my rant ignore it if you want) Now I think there should only be one scripting language in the game though what it is I really don't mind as you would have to use their API for the most part anyway. I doubt there would be two as it doubles the work needed to maintain the scripting part of the game for no real gain other than make a few people happy so its not really worth it. LUA is actually a good one to use and many people can easily learn how to use it. Link to comment Share on other sites More sharing options...
Anaximander Posted July 29, 2016 Share Posted July 29, 2016 Here ye go. For the layman. Java is excellent for building in things like mobile phone games. C++ is for the real heavy duty. Directly interacting with the processor. Java is meant to stick, EVERYWHERE you put it into, like glue. C++ is duct tape. You can't use glue in space, but C++ is fair game.Argueing furthermore is pointless. Java is a good language, don't get me wrong, but it's not meant for the same heavy duty stuff C++ is meant for, likewise C++ is too heavy for some things that are meant to run light and on the fly. Like mobile phones. Try putting a C++ coded game in a mobile phone, it will run terribly. TL;DR : C++ and Java, to each its own. One language is meant to be written with a cup of coffee on the side and ther other is written with whiskey by your side. Link to comment Share on other sites More sharing options...
yamamushi Posted July 29, 2016 Share Posted July 29, 2016 I think this topic went way off track since Java and Javascript aren't really related other than by name. This StackExchange article lays it out pretty clearly: http://stackoverflow.com/questions/245062/whats-the-difference-between-javascript-and-java tl;dr - "Java and Javascript are similar like Car and Carpet are similar." That aside, exporting bindings from C++ to LUA is much easier than exporting from C++ to Javascript, lookup any binding library on Github and the differences are pretty clear. I would also argue it's probably much easier to integrate LUA into the game engine than trying to import a javascript engine (something like Google's v8 engine). Considering all of the posts that have been on the forum calling for an easier way to write code, expecting people to learn Javascript isn't going to be an easier sell by any stretch of the imagination over LUA either. Why? I like javascript more than LUA. I think you're going to need much more reasoning than this to try to get a javascript API built into the game. I'll tear down some of the major differences between the two languages (Javascript and LUA) here: Lua has native support for coroutines. Lua doesn't convert between types for any comparison operators. In JS, only === and !== don't type juggle. Lua has an exponentiation operator (^); JS doesn't. JS uses different operators, including the ternary conditional operator (?: vs and/or), and, as of 5.3, bitwise operators (&, |, etc. vs. metamethods ). JS has increment/decrement, type operators (typeof and instanceof), additional assignment operators and additional comparison operators. In JS, the equals and not equals operators are of lower precedence than less than et al. In Lua, all comparison operators are the same precedence. Lua supports tail calls. Lua supports assignment to a list of variables. While it isn't yet standard in Javascript, Mozilla's JS engine (and Opera's, to an extent) has supported a similar feature since JS 1.7 (available as part of Firefox 2) under the name "destructuring assignment". Destructuring in JS is more general, as it can be used in contexts other than assignment, such as function definitions & calls and loop initializers. Destructuring assignment has been a proposed addition to ECMAScript (the language standard behind Javascript) for awhile. In Lua, you can overload operators. In Lua, you can manipulate environments with getfenv & setfenv. In JS, all functions are variadic. In Lua, functions must be explicitly declared as variadic. Foreach in JS loops over object properties. Foreach in Lua (which use the keyword for) loops over iterators and is more general. JS has global and function scope. Lua has global and block scope. Control structures (e.g. if, for, while) introduce new blocks. Due to differences in scoping rules, a closure's referencing of an outer variable (called "upvalues" in Lua parlance) may be handled differently in Lua and in Javascript. This is most commonly experienced with closures in for loops, and catches some people by surprise. In Javascript, the body of a for loop doesn't introduce a new scope, so any functions declared in the loop body all reference the same outer variables. In Lua, each iteration of the for loop creates new local variables for each loop variable. local i='foo' for i=1,10 do -- "i" here is not the local "i" declared above ... end print(i) -- prints 'foo' The above code is equivalent to: local i='foo' do local _i=1 while _i<10 do local i=_i ... _i=_i+1 end end print(i) As a consequence, functions defined in separate iterations have different upvalues for each referenced loop variable. See also Nicolas Bola's answers to Implementation of closures in Lua? and "What are the correct semantics of a closure over a loop variable?", and "The Semantics of the Generic for". Integer literals in JS can be in octal. JS has explicit Unicode support. In Lua, ~ is used in place of !. (as in, if foo ~= 20 then ... end) (technically syntax, but it's easily overlooked and causes subtle bugs). In Lua, the not/or/and keywords are used in place of !/||/&& (also syntax but also easily forgotten). In Lua, any type of value (except nil and NaN) can be used to index a table; in JavaScript, object indexes are converted to strings. Depending on the tool used, the LUA interpreter or the LUA JIT Compiler, the performance over javascript can easily be 3x-100x faster according to some test results I've seen as well. I've not run any of those tests myself so I can't independently confirm them, but in a game like DU I imagine that performance needs to be squeezed out of every corner possible. gyurka66, lethak and Whalekit 3 Link to comment Share on other sites More sharing options...
Anaximander Posted July 29, 2016 Share Posted July 29, 2016 @YamamushiI think the whole derailing started from my meme post,where I parallelised switching LUA for Javascript to switching C++ for Java (Almost) everyone in coding knows Java and Javascript are different I take full responsibility for the derail Link to comment Share on other sites More sharing options...
GalloInfligo Posted July 29, 2016 Share Posted July 29, 2016 Language is Language, you learn one, you can learn more.... there are not many differences between these newer languages, its not like they are asking everyone to code it in Assembly! The_War_Doctor and Anaximander 2 Link to comment Share on other sites More sharing options...
zlynxx Posted July 30, 2016 Share Posted July 30, 2016 Everyone has a favorite scripting language but eventually we all have to write some of everything. LUA is not hard to learn and works perfectly well. Link to comment Share on other sites More sharing options...
rmhenn Posted July 30, 2016 Share Posted July 30, 2016 Seems to be a lot of discussion here about code, but I haven't seen any discussion about C#. I'm no code expert with any degrees but I would like to know if it would be possible to use C# as well as LUA to code scripts in the game(also due to its similarity with C++). also, considering it is quite similar to java it would be quite easy for people who know java to learn C#(that's how I learned it). Just posting my thoughts though. Link to comment Share on other sites More sharing options...
lukecfairchild Posted July 31, 2016 Author Share Posted July 31, 2016 @yamamushi, I guess the real reason I don't like LUA vs javascript is the syntax, I like javascripts syntax more. I know embedding it wouldnt be a issue. But if performance would be, well I guess that would suck for me. Really it is just my preference. Link to comment Share on other sites More sharing options...
Anaximander Posted July 31, 2016 Share Posted July 31, 2016 @yamamushi, I guess the real reason I don't like LUA vs javascript is the syntax, I like javascripts syntax more. I know embedding it wouldnt be a issue. But if performance would be, well I guess that would suck for me. Really it is just my preference. If they were to add Javascript instead of LUA, they could have simply extended the game engine's C# native API to the players. It's the same thing more or less. Apparently, the devs got a CSD major and a guy with PhD in CSD leading the project. LUA is accessible to everyone. You are not an exception. I would have preferred the scripts to be in C++ if possible, but I got to lay my CSD major's ego down for a moment and think of the community as well. Our Lord and Savior, Dennis Ritchie, shall guide you out of the darkness. Link to comment Share on other sites More sharing options...
Cornflakes Posted August 2, 2016 Share Posted August 2, 2016 Exactly. It was made for an era that internet connections were not that strong and Java suited them. The same reason why mobile games are mostly coded in Java as well. Limitations. A PC these days has no such limitations in place anymore. Java is no good thing in any way With more limitations you need less java Link to comment Share on other sites More sharing options...
Anaximander Posted August 2, 2016 Share Posted August 2, 2016 Java is no good thing in any way With more limitations you need less java Try making an mobile game in C++. Phone will explode xD Siri will come online on its own and it'll start chanting the call of C-thulu. Link to comment Share on other sites More sharing options...
Cornflakes Posted August 2, 2016 Share Posted August 2, 2016 Try making an mobile game in C++. Phone will explode xD Siri will come online on its own and it'll start chanting the call of C-thulu. loolwut? nooo? thats not how programming works there are even frameworks for wrapping your C++ program into a thin layer of java that your android can run that without headache same for iOS you also have exactly one try to guess in what language the operating systems themself are written Link to comment Share on other sites More sharing options...
Anaximander Posted August 2, 2016 Share Posted August 2, 2016 loolwut? nooo? thats not how programming works there are even frameworks for wrapping your C++ program into a thin layer of java that your android can run that without headache same for iOS you also have exactly one try to guess in what language the operating systems themself are written You missed the point :V I said on C++ alone. Requiring Java to boot it up is a given, as android is built on Java. And writing an app for Android in C++ and using Java to boot it up, clearly shows a man or a woman of conviction to get C++ to excel in a field it shouldn't be even involved into. It's like taking a nuke into a gunfight, or asking for an expansion on a procedurally generated world. Sure, but... why? Link to comment Share on other sites More sharing options...
Cornflakes Posted August 2, 2016 Share Posted August 2, 2016 sometimes you need a real language to get things done, for example when you need some real performance Link to comment Share on other sites More sharing options...
Hrafna Posted January 11, 2017 Share Posted January 11, 2017 My first encounter with LUA was last night, and it's deliciously simplistic. C#, on the other hand, is just awful. It looks awful, and worse, runs awful. It's repetitive and un-intuitive, spite having been created to be the opposite. gyurka66 1 Link to comment Share on other sites More sharing options...
gyurka66 Posted January 11, 2017 Share Posted January 11, 2017 Which MMO is that? I always wanted to see something colossal held together by glue. Puzzle pirates anyone? A hardcore game with casual mechanics. It's pretty stable but have horrible graphics and bad walk controls. By the way DU should use that game as an example for it's economy. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now