| View previous topic :: View next topic |
| Author |
Message |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Nov 21, 2008 11:13 pm Post subject: So I herd C++ has no runtime enviroment. |
|
|
This means it's faster than Java and C#, correct?
So you could either make a game in Java or C# and it'd be cross platform so you could release a universal executable.
OR, you could make it in C++, and compile individual executables for different platforms.
It'd be a TINY inconvenience for the player, and the game would run faster overall.
And I don't see how that would affect online play, you could still build a MMO.
Amrite?
Just started reading my book on C++ so I'm learning...
Also, what's the best compiler for just typing in notepad and saving as .cc?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Nov 21, 2008 11:22 pm Post subject: |
|
|
It can be faster because it's straight up native code.
C++ can be cross platform, just look at the Quake games for example. They are absolutely everywhere, on phones, on all kinds of OS's... but you'll be using OpenGL for the renderer.
Also, there is a runtime of sorts, but it's usually distributed, or statically linked. You do not NEED to use it... but you'll be left handling some things your self. (and you get the added bonus of a ridiculously small executable)
Java and C# can be plenty fast, I wouldn't doubt that good Java / C# code could outpace shit C++. There's a Java version of Quake 2 somewhere, which is pretty close to the original C code in terms of speed, not to mention there's probably assembly code everywhere in the original code, since speed was so important then.
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Fri Nov 21, 2008 11:30 pm Post subject: |
|
|
But there is a difference.
Which means I'm learning something.
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Sat Nov 22, 2008 3:42 am Post subject: |
|
|
C#/Java are interpreted languages which means they are nothing but scripts that run of programs.. java programs run of java.exe and C# runs of .NET framework runs on your pc 24\7 as a service (hidden exe) and scripts just load on it when you open your programs written in C#.
Now C++ if you write a program in that it aint a script anymore it gets translated into assembly and runs straight to CPU and a few common runtime dll files for api calls but those are just for wrapping for functions to write text on console and stuff..
anyways C++ is much faster and cannot be compared to C#/Java as those are not really programming languages.
But Java has applets which work in browsers and C++ doesn't but.. you could still code your own applet (DivX on website player was coded in C++).
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Nov 22, 2008 4:00 am Post subject: |
|
|
| pkedpker wrote: | C#/Java are interpreted languages which means they are nothing but scripts that run of programs.. java programs run of java.exe and C# runs of .NET framework runs on your pc 24\7 as a service (hidden exe) and scripts just load on it when you open your programs written in C#.
Now C++ if you write a program in that it aint a script anymore it gets translated into assembly and runs straight to CPU and a few common runtime dll files for api calls but those are just for wrapping for functions to write text on console and stuff..
anyways C++ is much faster and cannot be compared to C#/Java as those are not really programming languages.
But Java has applets which work in browsers and C++ doesn't but.. you could still code your own applet (DivX on website player was coded in C++). |
.NET languages are JIT compiled to machine code all the same. If you feel so inclined, you can even look at the generated assembly. You can even run them through NGEN to avoid the JIT compilation.
The CRT does a lot more than just wrapping a few functions...
Java / managed code really isn't as slow as you might think.
http://bytonic.de/html/benchmarks.html
http://www.vertigosoftware.com/Quake2.htm
What.
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Sat Nov 22, 2008 4:38 am Post subject: |
|
|
| pkedpker wrote: | C#/Java are interpreted languages which means they are nothing but scripts that run of programs.. java programs run of java.exe and C# runs of .NET framework runs on your pc 24\7 as a service (hidden exe) and scripts just load on it when you open your programs written in C#.
Now C++ if you write a program in that it aint a script anymore it gets translated into assembly and runs straight to CPU and a few common runtime dll files for api calls but those are just for wrapping for functions to write text on console and stuff..
anyways C++ is much faster and cannot be compared to C#/Java as those are not really programming languages.
But Java has applets which work in browsers and C++ doesn't but.. you could still code your own applet (DivX on website player was coded in C++). |
If they aren't programming languages then what are they?
|
|
| Back to top |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Nov 22, 2008 6:22 pm Post subject: |
|
|
| nog_lorp wrote: | Slov, Quake2 and Quake3 are pure C fyi . |
I know, and lots of assembly bits, if I remember right (especially within the renderer). Point still stands though.
|
|
| Back to top |
|
 |
Cryoma Member of the Year
Reputation: 198
Joined: 14 Jan 2009 Posts: 1819
|
Posted: Sat Nov 22, 2008 6:34 pm Post subject: |
|
|
| So arrite.
|
|
| Back to top |
|
 |
pkedpker Master Cheater
Reputation: 1
Joined: 11 Oct 2006 Posts: 412
|
Posted: Sat Nov 22, 2008 11:09 pm Post subject: |
|
|
I can tell you right of the bat why you are wrong and yes the Java/Perl/C# (all .NET's) are interpreted and are scripting languages.
There is a simple way to test this out..
All interpreted languages stay the same when you press the compile button they just get compressed into bytes so it would look like machine code.
But all interpreted languages such as Java Perl C# all have decompilers which means you could easily decompile it back to source code.. by a use of these public software.
Now can C/C++ be decompiled I haven't seen any thats bacause C/C++ does it differently it transforms it into CPU language not just into unreadable symbols so you pretty much got a new language from that point on.
And to decompile that language would be only possible if you could program a human brain into the computer to do your tasks of decompilng assembly code to C/C++.
Now for Java/C#/Perl you don't need to program any brain to do that because all the parts are still they are just compressed.. so how do you decompress a winrar file? you run it threw UnRar.exe.
Thats the big difference.
_________________
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Sun Nov 23, 2008 12:04 am Post subject: |
|
|
| pkedpker wrote: | I can tell you right of the bat why you are wrong and yes the Java/Perl/C# (all .NET's) are interpreted and are scripting languages.
There is a simple way to test this out..
All interpreted languages stay the same when you press the compile button they just get compressed into bytes so it would look like machine code.
But all interpreted languages such as Java Perl C# all have decompilers which means you could easily decompile it back to source code.. by a use of these public software.
Now can C/C++ be decompiled I haven't seen any thats bacause C/C++ does it differently it transforms it into CPU language not just into unreadable symbols so you pretty much got a new language from that point on.
And to decompile that language would be only possible if you could program a human brain into the computer to do your tasks of decompilng assembly code to C/C++.
Now for Java/C#/Perl you don't need to program any brain to do that because all the parts are still they are just compressed.. so how do you decompress a winrar file? you run it threw UnRar.exe.
Thats the big difference. | You're an idiot. How do you think Java/C# actually manages to run? At some point in time it MUST translate to assembly. nog knows what he's talking about as well.
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Nov 23, 2008 12:17 am Post subject: |
|
|
| pkedpker wrote: | I can tell you right of the bat why you are wrong and yes the Java/Perl/C# (all .NET's) are interpreted and are scripting languages.
There is a simple way to test this out..
All interpreted languages stay the same when you press the compile button they just get compressed into bytes so it would look like machine code.
But all interpreted languages such as Java Perl C# all have decompilers which means you could easily decompile it back to source code.. by a use of these public software.
Now can C/C++ be decompiled I haven't seen any thats bacause C/C++ does it differently it transforms it into CPU language not just into unreadable symbols so you pretty much got a new language from that point on.
And to decompile that language would be only possible if you could program a human brain into the computer to do your tasks of decompilng assembly code to C/C++.
Now for Java/C#/Perl you don't need to program any brain to do that because all the parts are still they are just compressed.. so how do you decompress a winrar file? you run it threw UnRar.exe.
Thats the big difference. |
wtf, no.
|
|
| Back to top |
|
 |
|