Game Development Reference
In-Depth Information
One of the novelties of Java was that the language was designed so that programs
could not accidentally interfere with other programs running on the same computer.
In C++ this was becoming a very big problem: if such an error occurred it could
crash the entire computer, or worse: evil programmers could use this to introduce
viruses and spyware. With the growing popularity of the Internet, this became even a
bigger problem: suddenly computers were accessible from other computers. There-
fore, Java works in a fundamentally different way than C++. Instead of executing
instructions directly on the processor, there is another program called a virtual ma-
chine that controls the instructions and that checks that memory is used only as it is
indicated in the program.
2.3.5 C#
In the mean time, Microsoft was also working on their own object-oriented lan-
guage, called C#, which was launched in the year 2000. C# is also an object-oriented
language and it uses a virtual machine (which Microsoft calls managed code ). The
name of the language already indicates that it continues in the tradition of C and
C++. Typographically, the hash sign even resembles four plus signs. In musical
notation, the hash sign symbolizes a sharp note, and the language is therefore pro-
nounced as 'C-Sharp'. A nice detail is that 'sharp' also means 'smart'. So: C# is a
smarter version of C.
Both Java and C# have been under constant development. Every few years, a new
version of the languages appeared with new features, sometimes inspired by the new
features in the previous version of its competitor. The more recent versions of C#
have even introduced features from other non-imperative programming paradigms.
It is not clear where these two languages are headed. Java and C# have both been
very popular the last decade and a clear 'winner' cannot really be identified. Also
C++ is still being used a lot in the industry, but for how long? And what about all
the script languages that are now very popular? Will these languages take over the
market of the traditional compiled object-oriented languages?
In any case, C# is much easier to learn than C++, the latter being rather compli-
cated due to its compatibility with C. Furthermore, in C# it is a bit easier to write
interactive programs than in Java. C# is also an excellent language to use for de-
veloping games. This is because Microsoft has developed the XNA library, which
contains all the basic tools that are needed for developing games, such as loading
and displaying sprites, or playing back sound effects. Additionally, while learning
C#, you are also learning the basic object-oriented programming concepts, which is
a very useful skill to have. And if you ever need to write a program in C++ or Java,
then you can reuse your knowledge of C# because of the many similarities between
the languages.
Search WWH ::




Custom Search