Java, or C++?

Pages: 1... 34567
For the sake of argument; Magicka was also done with C# and though its isometric view, its actually 3D rendering for everything. I am pretty sure (though not 100% certain) that Bastion is also a 3D environment. From what I remember well, all the walls, platforms, etc, were 3D models.

I would use C++ if the option is given. But I would never say it cant be done in another language. There are some full 3D engines for C# as well and its a language that could be used. Granted on some platforms (mainly phones), you are restricted for the amount of resources you can use, but on large scale; Consoles and Desktop (and most newer laptops), your not going to be able to tell the difference in FPS.
closed account (3qX21hU5)
I totally agree I never meant that it couldn't be done. You most certainly can create 3D games in higher level languages like C#. What I meant was it isn't their strong point. Its not what they specialize in, for various reasons.


Granted on some platforms (mainly phones), you are restricted for the amount of resources you can use, but on large scale; Consoles and Desktop (and most newer laptops), your not going to be able to tell the difference in FPS.


This is where I will agree to disagree. I believe you would see a major difference in the speed of a 3D game where one was made in C++ and the other in C#. It might not be that noticeable for smaller games, but once you start to get to the larger 3D games it becomes almost impossible not to notice it.

There is a reason why AAA game companies tend to stay away from the higher level languages for the core of their games (Though there is some exceptions).

Now I'm not arguing that C++ is better then Java or C# is better then C++. All I am saying is each languages has their weaknesses and each has area's where they excel far past the others. That is why it is important to know a variety of languages that way you can choose the right one for the task, which makes it easier to complete and easier to make a higher quality product.
@Zereo: I'll drink to that.

There is a reason why AAA game companies tend to stay away from the higher level languages for the core of their games (Though there is some exceptions).


Carmack is porting Wolfenstein to Haskell:
https://twitter.com/id_aa_carmack/status/331918309916295168

This is interesting, considering that Haskell is on average quite slower than Java or C# and generally gives less control over optimizations to the programmer.


This is where I will agree to disagree. I believe you would see a major difference in the speed of a 3D game where one was made in C++ and the other in C#


And that major difference in speed would be 300 FPS vs 100 FPS. LOL.

Intel claims you'll be able to run AAA games on Haswell in full details. Might be they are exaggerating, but there are already no problems running most of the games on integrated chips like Intel HD4000, and some very demanding AAA titles run on low/mid-details just fine.

We're approaching a point, where hardware is fast enough, that putting more millions of triangles into the scene does not make the game any better. With 8-16 core CPU chips and external graphics there is plenty of CPU/GPU horsepower that is actually harder and harder to use all. A much bigger problem will be *content* than performance. And for delivering more interesting content faster, you need higher-level languages, that can tackle parallelism well (speeds of single cores almost don't advance at all; e.g. i7 3rd gen chips are hardly faster by more than 5% than i7 2nd generation chips ).
Last edited on
Original Wolf 3D, which is less resourse intensive than minesweeper on Win8. I guess he can port it onto Befunge and it will still work fine on modern PC
rapidcoder wrote:
This is where I will agree to disagree. I believe you would see a major difference in the speed of a 3D game where one was made in C++ and the other in C#

And that major difference in speed would be 300 FPS vs 100 FPS. LOL.
Tell that to my Terraria :p and it's even 2D
Last edited on
You know, games made in UDK use unrealscript.
You know, games made in UDK use unrealscript.
And was rendering engine written in it too?

I do not see a problem to use high level languages to describe a gameplay part. Many games uses Lua, Python, some other scripting languages to actually define many gameplay elements. But most resource-heavy parts like render, Some low-level AI information gathering, pathfinding are written in lower-level languages. It isn't rare to see a game which was written using more than two programming languages: render and pathfinding in C, most internals in C++, abilities and map scripts in own scripting language, login server in Java etc.
Last edited on
Rendering should never be in a high-level language. Game logic should always be in a high-level language. That's why C++ has been used primarily so often, but with advancing hardware the other higher level languages are getting to shine :)
When the time comes that we can implement AAA titles completely in high level languages, we will be able to reach the pinnacle of realistic and immersive environment using the low level languages.

So say the sages of yore.
Last edited on
I wonder how long it will be until functional languages can make indie-quality games. I've seen a lot of good ones but they've all had an external environment to repeatedly call a draw function (which is cheating, since you normally have to use recursion for looping).

I think I'll start a separate thread for this, though.
Minecraft is slow despite optimizations. However, the modding community would not have been able to take off if Minecraft were written in e.g. C++, because Java makes it extremely easy to modify existing software with decompilers that decompile back to actual Java code.

Minecraft is an example of all the good things and bad things that come with making a game in Java. For he general purpose I would advise not making a game in Java or C#, but if you want a good modding community pick Java or C#.


Surely the possibility of your source code being stolen in spite of obfuscation tools is a bad thing.

There is absolutely no reason for Minecraft modding to be the way it is. Every update, Mojang deliberately takes action to keep the source code away from modders. The modders then deobfuscate the code and port their mods (because they need to be ported for every single update).

If you really want people to be able to mod your engine, release your source code. Choosing a language that allows others to break your obfuscation is just dumb.

Native C++ engines are perfectly capable of being modded as long as you provide source code. The difference is that with C++ you aren't forced to allow modding if you don't want it in your game.

By the way, it's becoming more and more clear to me that Minecraft is coded quite well (until the singleplayer-multiplayer merge which just brought all the multiplayer problems to singleplayer). It frequently uses techniques that avoid JVM overhead, like using byte arrays. The real reason Minecraft is slow is because generating and "preprocessing" large numbers of voxels on the fly is a slow process.
Last edited on

The difference is that with C++ you aren't forced to allow modding if you don't want it in your game


Reverse engineering optimized C++ code is not much more harder than reverse engineering obfuscated Java. Crackers do it for ages and they always win, no matter how hard you try to protect your C++ code.

BTW. Finding a good working Java decompiler is actually quite hard, even for an unobfuscated code (most of the free ones fail completely or generate incorrect source code on more complex cases, just as most C++ decompilers do). And I haven't seen any that would work fine with aggressively obfuscated code like e.g. proguard.
closed account (S6k9GNh0)
Reverse engineering optimized C++ code is not much more harder than reverse engineering obfuscated Java. Crackers do it for ages and they always win, no matter how hard you try to protect your C++ code.


Really? Because, had Minecraft been made in C++, it would still be just as illegally modded as it is now, right?

I'm not sure of a single tool that properly decompiles a C++-made executable. You'd have to do anything in assembly so its more like your saying, "Reverse engineered optimized assembly code is not much more harder than reverse engineered obfuscated Java" which is plain bologna.
Telion wrote:
Every update, Mojang deliberately takes action to keep the source code away from modders.
Actually, Mojang supports the modding community. They have even released some source code to the public, unobfuscated. The reason it is obfuscated is because it stops the average guy from doing what Mojang calls "doing evil".
What I don't get is why would anyone want to program in C++ or Java when they could just hand code everything with a magnetized needle and steady hand.
closed account (1yR4jE8b)
Excuse me, but real programmers use butterflies. They open their hand and let the delicate wings flap once, the disturbance ripples outward changing the flow of the eddy currents in the upper atmosphere. These cause momentary pockets of higher-pressure air to form, which act as lenses that deflect incoming cosmic rays, focusing them to strike the drive platter and flip the desired bit.

Of course, there's also an EMACS command to do that, good ol'
C-x M-c M-Butterfly
.
closed account (N36fSL3A)
Lol. I'm dying.
Here you go Fredbill http://xkcd.com/378/
@Cheraphy

OMG lol

Thanks for breaking the tension, lol

Here's a nice one:
http://xkcd.com/386/
Last edited on
Pages: 1... 34567