1

Topic: Major complaint

Please. Teeworlds engine is too *person*-orientated. Nodes - died, starwars - never released, watermod - laggy, aviator-laggy.

It's impossible to augment the protocol, add new entities for example or new tuning parameters. Last time I tried to do my Aviator I made a custom client with correct prediction for jetpack but realized that no one will download it. C++ programs have full access to computer, so people worry about viruses in custom clients. Custom clients also need to be compiled for different platforms. And they take long time to download. So it's hard to get users to download custom clients.

Please port Teeworlds engine to JavaScript, it's a language of Web 3.0, Cloud and Web Apps, soon Qt (KDE5), already used by GNOME, used by Windows(R) for desktop widgets and will be used by Windows Metro, used in Apple(R) iPhone, Android, the language endorsed by the Global Government and that will soon be the official language of the Earth! Secure and very fast engines for JavaScript are being developed by Google(R), Mozilla(R), Apple(R), Microsoft(R), so JavaScript is a reliable language in long-term! It's so common that virtually anybody knows it! It's also platform-independent! Come on, it's used not only in free software, but also in proprietary software you all love so much!

As for client mods, we could make client mod downloading. Client mods will not be given any privileges in system, so they will be safe to download. Also we could make it possible to download them from in-game.

2

Re: Major complaint

And the troll strikes again. Javascript Teeworlds. Woohoo!

Not Luck, Just Magic.

3

Re: Major complaint

People actually still use Javascript? Lol.

4

Re: Major complaint

Nilaya wrote:

People actually still use Javascript? Lol.

What do you think, how many of the websites you regulary use, don't use JS? smile

5

Re: Major complaint

Let me state a few things that are completely my opinion. Firstly porting teeworlds engine to JS would probably make it harder to mod then ever and most importantly the only advantage I could see in porting tw engine to JS after reading your post is safety. Well safety is a concern but it doesn't matter if the engine is in JS. The security measures you've mentioned like client mod downloading can be implemented in C++ too.

So after all first porting teeworlds to JS I don't think its worth the effort (btw I am not even sure if there is a way to port something that complex to JS). Secondly I honestly don't see any profit in it as Teeworlds doesn't actually care about mods. Try not to flame smile

I just code and play DDRace nothing fancy smile

6

Re: Major complaint

Learath2 wrote:

Try not to flame smile

Try not to feed the trolls...

Not Luck, Just Magic.

7 (edited by lamefun 2012-07-07 16:47:24)

Re: Major complaint

Learath2 wrote:

Let me state a few things that are completely my opinion. Firstly porting teeworlds engine to JS would probably make it harder to mod then ever and most importantly the only advantage I could see in porting tw engine to JS after reading your post is safety.

Harder to mod O_o? Well, I don't mean that it should be a browser game. I meant to make JS like QVM in Quake. Teeworlds engine will run JavaScript and export functions into it. QVMs contain most of Quake game logic while the engine implements basic functions (virtual file system, graphics, or things that are just too slow if implemented within QVM like collision detection). Think of it like: Teeworlds browser! It won't be a Web 3.0 browser, so we could omit restrictions that make modding hard (like same-domain rule) or move performance-critical features to C++.

Learath2 wrote:

Well safety is a concern but it doesn't matter if the engine is in JS. The security measures you've mentioned like client mod downloading can be implemented in C++ too.

Yes, but we'd have to make a C++ virtual machine, like QVM in Quake.

Learath2 wrote:

So after all first porting teeworlds to JS I don't think its worth the effort (btw I am not even sure if there is a way to port something that complex to JS).

It's certainly possible, since JS is turing-complete. The only concern is speed, but Google(R), Apple(R), Mozilla(R) and Microsoft(R), Web 3.0, Cloud, Web Apps ensure that it'll be quite fast. If it's still not fast enough, we could move performance-critical features to C++.

Learath2 wrote:

Secondly I honestly don't see any profit in it as Teeworlds doesn't actually care about mods. Try not to flame smile

They don't care but I do!

EDIT: I can also consider LuaJit, But I doubt in security of Lua (well, they placed dangerous function dofile in the same library as important function pairs, so they can only be loaded together and I have to whitelist functions).

EDIT: C++ is also hard to learn. JavaScript maybe isn't quite easy too (because of prototype system), but it's used in Web, so anyone who make web pages should be familiar with it. It's also finding use in desktop applications, so it's going to be quite popular.

8 (edited by Learath2 2014-10-29 13:52:41)

Re: Major complaint

lamefun wrote:

Harder to mod O_o? Well, I don't mean that it should be a browser game. I meant to make JS like QVM in Quake. Teeworlds engine will run JavaScript and export functions into it. QVMs contain most of Quake game logic while the engine implements basic functions (virtual file system, graphics, or things that are just too slow if implemented within QVM like collision detection). Think of it like: Teeworlds browser! It won't be a Web 3.0 browser, so we could omit restrictions that make modding hard (like same-domain rule) or move performance-critical features to C++.

The things you have stated above will make the code ; Firstly hard to read, probably non-understandable and ultimately make things more complex then ever.

In teeworlds code there is a pretty well designed memory management and while coding we always use the lighter functions that give more performance. Separating functions in to two separate languages will most probably break the memory management and performance badly.

lamefun wrote:

EDIT: C++ is also hard to learn. JavaScript maybe isn't quite easy too (because of prototype system), but it's used in Web, so anyone who make web pages should be familiar with it. It's also finding use in desktop applications, so it's going to be quite popular.

It took me a total of one week to teach someone basics of C++ completely. So nope i don't think C++ is hard to learn. If you are making desktop games (in my opinion) C++ is a MUST.

Ultimately, both Lua and JS needs to be correctly implemented if will be at all implemented. /me votes for Lua smile

I just code and play DDRace nothing fancy smile

9 (edited by lamefun 2012-07-07 23:33:54)

Re: Major complaint

Learath2 wrote:

The things you have stated above will make the code ; Firstly hard to read, probably non-understandable and ultimately make things more complex then ever.

JavaScript game code doesn't have to be unreadable. Also, JavaScript engines I've tried have pretty clean APIs, so the engine code will likely be readable too.

Learath2 wrote:

In teeworlds code there is a pretty well designed memory management and while coding we always use the lighter functions that give more performance. Separating functions in to two separate languages will most probably break the memory management and performance badly.

There's even no "management" to speak of, Teeworlds just allocates most of things on stack and uses fixed buffers. Yes, that's very fast. Peformance will degrade, but unknow to what extent. Web 3.0 Apps and Flash are pretty fast.

Learath2 wrote:

It took me a total of one week to teach someone C++ completely networking to graphics. So nope i don't think C++ is hard to learn. If you are making desktop games (in my opinion) C++ is a MUST.

I can't believe this. Did you teach templates? Pointers? Classes, copy constructors, operators overloading, stack allocation vs. heap allocation?

Learath2 wrote:

Ultimately, both Lua and JS needs to be correctly implemented if will be at all implemented. /me votes for Lua smile

Me too, but they make security harder than JS engines (for example, they put a dangerous function dofile in the same library as important function pairs, so they can only be loaded together and I have to remove dangerous functions manually). As one part of the idea is downloading untrusted code to the client, we need good sandboxing.

10 (edited by ghost 2012-07-08 09:17:05)

Re: Major complaint

After reading through the whole thread, I still don't see one reason do do this. Almost every "pro" you mentioned for javascript can also be mentioned as a "pro" for C++. On the other hand, java script is not designed to write fast programs, that use opengl rendering. As you mentioned, it's a language used for websites, and that's what it does best. C++ on the other hand works very well with opengl and that stuff. One big problem for example when trying to port tw, is the fact that tw heavily relies on SDL, which is not available for javascript, if I am not completely mistaken, so a huge amount of code would need to be rewritten completely. Also take this fact into account: Most known security holes in Web browsers are closely linked to JavaScript.

Learath2 wrote:

It took me a total of one week to teach someone C++ completely networking to graphics. So nope i don't think C++ is hard to learn. If you are making desktop games (in my opinion) C++ is a MUST.

I completely agree to this. Of course, you don't learn C++ that good in that time, but you can easily learn the basics (and if you are familiar with programming already, you might learn more). However, I really don't see where C++ is a difficult language. Actually I think it's one of the easiest ones.

lamefun wrote:

Secure and very fast engines for JavaScript are being developed by Google(R), Mozilla(R), Apple(R), Microsoft(R), so JavaScript is a reliable language in long-term! It's so common that virtually anybody knows it! It's also platform-independent! Come on, it's used not only in free software, but also in proprietary software you all love so much!

I need to comment on this, because it's just so absurd:

So you say, those engines are very fast and secure, did you ever ask yourself why? Well, the SquirrelFish Extreme, the WebKit JavaScript-Engine (apple) and V8 JavaScript-Engine (Google) are written in C++, maybe that's the reason? That also makes me believe, that C++ is even much more reliable in the long term. About platforms: teeworlds is platform independent, guess why: C++ is platform independent... And why the hell, are you saying we all love proprietary software? And why is the fact, that js is used in proprietary software a reason for us to port tw to js? "Let's just do it, because the commercial softwares do it, so it must be good!!!1!"? Just no comment on this.

Now let's stop this senseless discussion. It won't be done by us. you know tw code is opensource and all that stuff, so if you want it to be done, do it yourself.

11 (edited by lamefun 2012-07-08 14:56:03)

Re: Major complaint

ghost wrote:

tw heavily relies on SDL

TW doesn't rely on it as much as you said, it wraps it in an abstract graphics class and uses interface provided by that class.

ghost wrote:

which is not available for javascript

Nothing is available in JavaScript besides Object, Math, Array, Date and some others. Engine still must be written in C++ and graphics functions exported to JavaScript.

ghost wrote:

Most known security holes in Web browsers are closely linked to JavaScript.

True, because JavaScript is a programming language and browsers download untrusted code. Teeworlds doesn't suffer from it simply because it doesn't download any code at all, but it severely limits what modders can do.

ghost wrote:

So you say, those engines are very fast and secure, did you ever ask yourself why? Well, the SquirrelFish Extreme, the WebKit JavaScript-Engine (apple) and V8 JavaScript-Engine (Google) are written in C++, maybe that's the reason?

Well, the engine of Teeworlds will still have to be written in C++.

ghost wrote:

That also makes me believe, that C++ is even much more reliable in the long term.

Never said it isn't.

ghost wrote:

About platforms: teeworlds is platform independent, guess why: C++ is platform independent...

C++ is platform-independent, but it has to be compiled for different platforms. JavaScript has an advantage that it can be loaded from source directly.

ghost wrote:

And why the hell, are you saying we all love proprietary software?

Well, you're an exception then.

ghost wrote:

And why is the fact, that js is used in proprietary software a reason for us to port tw to js? "Let's just do it, because the commercial softwares do it, so it must be good!!!1!"? Just no comment on this.

Well, why not?

12

Re: Major complaint

lamefun wrote:

It's certainly possible, since JS is turing-complete.

Seriously... Being turing complete isn't an argument for a language, just because you can prove that you could implement things in it, it doesn't say that it has a sense - turing complete doesn't say something about the speed either (except that the execution time mustn't be infinite iirc). Brainfuck is turing-complete, a variant of Befunge aswell, so this is just stupid. :<

(Turing complete is no help for the output either, it just has to have an output iirc.)

13

Re: Major complaint

Benefits of JavaScript for Teeworlds:

1. JavaScript is language for people. C++ is language for hackers.
2. JavaScript is supported by major corporations like Google(R), Microsoft(R), Apple(R), Mozilla(R).
3. JavaScript is used in Web 3.0.
4. JavaScript is also used in Windows 8, soon KDE 5, GNOME 3 for programming applications.
5. Web 3.0 is the future. Don't deny facts. Soon there'll be hardware that will only allow you to use HTML, CSS and JS. It'll be easier to port Teeworlds to it if it's written in JS.
6. We could implement secure client mod downloading (it's also possible in C++, but it's hard. Quake AFAIK uses C for it's mod downloding system by emulating some simple CPU and compiling code with GCC into it).
7. Because of 1, 2, 3 and 4 JavaScript is a very popular language.
8. Because JavaScript is dynamic langague with garbage collector, it's easy to start programming in.
9. Because of 7 and mostly 2 there are fast implementations of JavaScript and they are becoming faster and faster.
10. Because of 7, 2 and because JavaScript usually executes untrusted code, JavaScript engines are pretty secure.

14

Re: Major complaint

lamefun wrote:

Benefits of JavaScript for Teeworlds:

1. JavaScript is language for people. C++ is language for hackers.
2. JavaScript is supported by major corporations like Google(R), Microsoft(R), Apple(R), Mozilla(R).
3. JavaScript is used in Web 3.0.
4. JavaScript is also used in Windows 8, soon KDE 5, GNOME 3 for programming applications.
5. Web 3.0 is the future. Don't deny facts. Soon there'll be hardware that will only allow you to use HTML, CSS and JS. It'll be easier to port Teeworlds to it if it's written in JS.
6. We could implement secure client mod downloading (it's also possible in C++, but it's hard. Quake AFAIK uses C for it's mod downloding system by emulating some simple CPU and compiling code with GCC into it).
7. Because of 1, 2, 3 and 4 JavaScript is a very popular language.
8. Because JavaScript is dynamic langague with garbage collector, it's easy to start programming in.
9. Because of 7 and mostly 2 there are fast implementations of JavaScript and they are becoming faster and faster.
10. Because of 7, 2 and because JavaScript usually executes untrusted code, JavaScript engines are pretty secure.

quote:

1. I believe JS was the language for people
(those who will make the new cool mod +EliteXXLDDRace**)
C++ is langauge for hackers
(those who usually know how to do stuff in a good way)
2. JS is supported by major corporations
(List of companies who don't produce games)
3. JavaScript is used in Web 3.0
Have you ever played a good game in the "Web 2.0" (you call it 3.0)
4. JS is used in (list of desktop environments)
5. I believe JS is the future
6. I believe we could do great client modding.
That's actually a good point, though I would prefer that to be done for LUA, as it is THE scripting language for gaming. (Many examples, look into the wikipedia article, name me any game for JS).
7. I believe JS is the future
8. Garbage collector (-> LUA)
9. Fast (-> LUAJit)
10. JS engines are pretty secure. (haha, as if you could say secure to execution of non-simple programming languages from a remote, same applies for LUA of course, but this argument is lame, becuase noone searches for bugs in LUA, rather for JS, so we would have to update the interpreter frequently)

15

Re: Major complaint

lamefun most of the reasons you mentioned are as to why JS is better generally. You said little about how it would be good for/in teeworlds.

1. A lot of "people" don't know how to program. And there are multiple types of "hackers" ;D I imagine C++ as the most reliable for this job.

2. So what?

3. Afaik "Web 3.0" is still in development.

4. JS is more of an automation (automatic +ion) tool rather than being made to create complex programs on it's own.

5. HTML,CSS and JS are markup languages. (Write a program with markup language o.O )

7. So? C++ is also very popular

9. Maybe... But still you can't know that the future will look like. Maybe major corporations will see that C++ is better tongue

Bottom line: JS is good for Web development and as a automation tool in some complex programs. C++ is good for making games (notice the limitations of Minecraft?)

Once in a century...

16

Re: Major complaint

Another drawback of Lua: it's mostly used in proprietary games that are released and then aren't actively developed and Lua interpreter in them isn't updated, so Lua developers don't have motivation to keep Lua stable (they often rename functions and so on), while JavaScript powers the whole Web, so any incompatible changes will break a lot of websites all over the world, so JavaScript has more motivation to be stable.

17 (edited by theanomaly 2012-07-10 15:55:31)

Re: Major complaint

And JS wouldn't be here if it wasn't for C and C++. So just stop.

18

Re: Major complaint

DARK HUNTER wrote:

5. HTML,CSS and JS are markup languages. (Write a program with markup language o.O )

JS isn't a markup language, seriously. smile

Full Face Tee wrote:

And Java wouldn't be here if it wasn't for C and C++. So just stop.

Well, C wouldn't be here if it wasn't for B, so we should really use B. - And don't confuse JS with Java please. smile

19

Re: Major complaint

As you said JS is a web language and not a gaming one. Lua is a popular scripting language in video games. (http://en.wikipedia.org/wiki/Category:L … ideo_games)

If lua and javascript are implemented the right way they are both secure. The function do_file that you've mentioned is just a include which is actually not a security risk. Some functions in lua should be disabled, but this is quite easy. (e.g. dont load the os lib)

Another point is that lua support multiple return values which makes some request very east.
local x, y = GetCharacterPos(id)

So if a scripting language would be implemented in the official teeworlds than i would vote for lua!

To conclude: There is already a non-official clientmod by me which supports lua. https://github.com/MAP94/teeworlds/
The project needs much more work but as you can see it is possible.

20 (edited by lamefun 2012-07-11 16:42:36)

Re: Major complaint

MAP94 wrote:

As you said JS is a web language and not a gaming one. Lua is a popular scripting language in video games. (http://en.wikipedia.org/wiki/Category:L … ideo_games)

Well, it's already spreding itself to other areas: KDE 5 applications will be written in part JavaScript, GNOME 3 shell is already written in JavaScript, even Windows® 8 by Microsoft® will offer JavaScript for Metro interface.

MAP94 wrote:

The project needs much more work but as you can see it is possible.

Well, my idea is to rewrite everything in game/ directory in Lua. I doubt it'll be fast enough without LuaJit and I doubt that LuaJit is a stable project to rely on (basically one-man project). What if it stops development? Then Teeworlds will effectively die.

21

Re: Major complaint

To rewrite the whole engine and the whole upper level code would make the game slow. even if you use the fastest javascript engine (v8 at the moment) it'll never reach the performance you'll get in c/c++. Because compiled code will ever be faster then interpreted code. Even java which had a very good jit is often more then 3 time slower then c/c++.
Due to this reason and due to the design of teeworlds it wont be possible. The only ability to support mod is an embeded scripting language or an pluginsystem (dll-plugins[dont know how it works on unix] for example)
dll-plugins can contain every type of code and can harm your system so this would be a bad idea. and such plugins are not platformindependend

Lua/Javascript as embeded language is a better solution for modding.

You said that KDE and some other window manager support javascript AS SCRIPTING language. This is the point. Javascript is just used for scripting and MINIMAL games. You can't realize teeworlds onto of such an engine.

22 (edited by lamefun 2012-07-11 18:30:51)

Re: Major complaint

MAP94 wrote:

To rewrite the whole engine and the whole upper level code would make the game slow. even if you use the fastest javascript engine (v8 at the moment) it'll never reach the performance you'll get in c/c++. Because compiled code will ever be faster then interpreted code. Even java which had a very good jit is often more then 3 time slower then c/c++.

3x slower isn't much. Besides, we'll still have to code C++ base engine, so we can move performance-critical parts into it.

23 (edited by MAP94 2012-07-11 22:43:08)

Re: Major complaint

java is often MORE THEN 3 times slower c++
javascript is much SLOWER then java so this would slow down the whole game. some computer have a cpu load of 100% when they run tw. With a javascript core they can't play the game.

But if you want a javascript teeworlds. Do it your self. maybe this would be merged into the main branch!

24

Re: Major complaint

MAP94 wrote:

But if you want a javascript teeworlds. Do it your self. maybe this would be merged into the main branch!

Yea seriously. Stop posting these annoying threads you troll and do something if it concerns you so much.