Thread Rating:
  • 5 Vote(s) - 3.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The A-Engine: A new Beat 'em Up game engine
#49
(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  First, why on earth people think writing a game using C++ is a good idea?!!It's horrible, verbose, disgusting, error prone and unproductive meanwhile C#, Java and derivatives are exact opposite and there are a lot of sophisticated and flexible libraries out there that makes your life so easy that you can finish the same project like 5 times faster and I'm %100 sure you would get a better result.
Oh really? One major reason why you would want to use C++ is CPU caches (here here and here), as you have much more control on how data is layed out in memory.
Granted for a 2D game this is (like you stated later) less of an issue.

It is NOT horrible nor is it verbose, disgusting, error prone or unproductive, nor are C# and Java somehow exactly the opposite. If you this is the case at least provide examples of why you think so.
When it comes to C++ there are (just like you stated for Java and C#) "a lot of sophisticated and flexible libraries out there", granted the standard library is smaller than that of C# and Java.
I do not see how using a different language would magically be five times faster.

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  Another drawback is that it is extremely difficult to implement an AI system in C++ while you can simply use reflection in C#/Java and let other people to code AI in the same language (which is probably much better than the one you created).
I doubt that it is "extremely difficult to implement an AI system in C++", so please give examples. That said reflection is a feature that C++ is lacking (there is a study group for it though). I would add that one reason for having AI work using a different language, is that you would be able to change the AI without having to modify the source code.

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  Don't argue saying C++ is faster because a LF2 like game does not require such high optimization, remember you're not an AAA-Studio you're A-Man. Also keep in mind that most of the Android games are Java.
A game like LF2 may not require nearly the same level of optimization, but it is really easy to paint yourself into a corner with poorly performing code (goes for C++ as well). That said I agree that it is probably not a big deal here.
A lot of Android games using Java is an appeal to majority.

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  Some people say garbage collection (GC) is a problem, it's NOT. Not only it will save you from manual memory management (MMM), a qualified GC can perform better if you're not a C++ pro. Even if you need to tweak GC, it's a magnitude easier than MMM. After all, "The Witcher 2" is an AAA-Game that uses GC effectively.
I have been programming in C++ for many years, and I seriously do not think memory management is a problem. Use smart pointers (unique_ptr, shared_ptr, whatever you write yourself) for owned resources and the problem is mostly solved already.
Source on The Witcher 2?

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  C# and Java have so great IDE's (Visual Studio, SharpDevelop, Eclipse, Netbeans) that you feel ultra comfortable while writing code and auto-complete makes you uber fast. (Should I even mention those useful profiler tools and incredibly nice standard libraries?)
I am not sure that this was meant as an argument against C++, but yeah three out of four of the IDEs you mentioned also work for C++. There are of course also other C++ IDEs (Code::Blocks, CodeLite).
Profilers are also available for C++, although (like previously mention) the standard library is somewhat lacking in comparison to that of C# and Java. It is being worked on (and there are non standard libraries available) but for the moment that is indeed a valid argument against C++.

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  Secondly, I don't understand what the hell is wrong with those who are trying to create their own data syntax/format while they can use existing ones (XML, JSON, YAML, Protobuf, BSON...). You're doing nothing but overloading your work to write a new parser library and it will probably not going to be as fast as existing libraries that parse existing data formats. Also, inventing a brand new unique data format results with need for a new data changer, while someone can simply use Notepad++ to change a XML/JSON based data and syntax highlighting, intellisense and auto-indentation will just work. No one actually needs a new data format, existing ones are sufficient. I would recommend Protobuf as it is really fast, takes low space, backward compatible and rock-solid, but it's a binary format, meaning that it's neither human readable nor editable, it needs a special data changer, but with the help of those great high level libraries, it's not a big challenge to provide that.
This is not necessarily wrong, but I can come up with a good reason for this, namely it can be easier to read and write for humans, which is the same reason why programming languages don't use a markup language structure.
By a special data changer I imagine (correct me if I am wrong) that you mean a graphical interface with textfields and other controls as opposed to just an editor with a large textarea, where you write code, but in my experience such a program can easily be slower than simply writing everything in a texteditor.
Notepad++ would also be usable for any new format, that is stored in plain text. Making a syntax highlighter for a new language is not a problem in Notepad++.

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  I must add that bytecode compiled languages are easy to do reverse engineering (so easy that you can extract most of the source code just using a simple program such as ILSpy). Thus, it's more likely that your game is going to be moded (and obviously we're trying to create an extensible game).
I do not see how you could at all sell this as a feature. Honestly that is just dumb. You would achive the exact same effect by simply releasing the source code.

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  If you don't like the idea of source theft, you can always obfuscate your code. But if it's not enough, and you still want your code to be compiled into native CPU instruction sets, then do yourself a favor and learn "D Programming Language". With the help of Eclipse + DDT plugin (and a compiler of course), anything is possible.
Honestly source theft is not a thing I would worry about, no matter how easy it would be, so I will not argue against that.
I do not know much about D, but there is certainly some things I like (for example the ! syntax for templates is somewhat nice, and so is the static if stuff), but that is about it.

(06-19-2015, 04:10 AM)Nightmarex1337 Wrote:  Now, I'm shouting to all those who wants to make games, don't prefer C++ just because it's popular except you really really know what you're doing and consider other options before C++ cuz chances are high that you don't know what you're falling for. Notice that Unity (game engine) use C# as it's primary scripting language GC enabled.
I guess I may as well then shout to everyone who wants to make anything: Do not just prefer C# and Java because they are easier than C++, because they are not. Try out the languages a bit and get a feel for the style you like to use, then pick a language that you like. Personally I find Java especially (and somewhat also C#) to be too lacking in core language features.
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Reply
Thanks given by:


Messages In This Thread
RE: The A-Engine: A new Beat 'em Up game engine - by Som1Lse - 06-19-2015, 06:29 PM
A-Engine Supports 3D! - by A-Man - 11-23-2015, 07:40 AM
The A-Engine: Naming Conventions - by A-Man - 01-04-2016, 07:16 PM



Users browsing this thread: 5 Guest(s)