ID:192207
 
What's the difference between C++ and DM?
C++ is alot harder

RaeKwon
In response to RaeKwon
can you code C++?
In response to Hendrix
I know some, why?

RaeKwon
In response to RaeKwon
Like RaeKwon said, it's a lot harder and it's mostly for compiling and creating programs though many old dos games like Quake were made in C++.
In response to DiZzyBonne
what are games made in now, like games made by squaresoft or a company like that?
In response to RaeKwon
I was just wondering but what makes it harder.
In response to Hendrix
DM is more or less an Object Oriented game development system (similar to Java). C++ was an attempt to be OO, but still has many problems...

"Despite its power, C++ has risks, many of which it inherited from its predecessor C. Scott Robert Ladd describes the risks this way:

The inherent flexibility of C provides the rope with which programmers can hang themselves. Fortunately, good C programmers know how to avoid wrapping the rope around their neck; from experience, they know what should and shouldn't be done in C, and most of them escape unscathed. The unprecedented freedom of expression allowed by C++ requires a great amount of caution and knowledge on your part. C++ doesn't just supply the rope; it ties the noose, places it over your head, and stands you over the trap door with your hand on the release-lever. Am I exaggerating? I suppose so--but only a bit"

"Knowing the history of a programming language can help you understand how and why its features came about. Java and C++ were created in different decades to solve different problems and have different histories.

C++ was created by Bjarne Stroustrup at AT&T Bell Labs in 1979. He needed a language that would combine the scaleable class concepts of the Simula programming language with the efficiency and portability of C. Several basic philosophies drove the design of the language: it must scale well on large projects; it must be based on an existing, successful language; and it must be general purpose and not impose any particular style of programming on its user. Above all, Stroustrup was influenced by the need to create a practical language. It is to this point that he makes the following statement:

I have a lot of sympathy for the student Euclid reputedly had evicted for asking, "But what is mathematics for?" Similarly, my interest in computers and programming languages is fundamentally pragmatic. Computers and programming languages can be appreciated as works of art, but aesthetic factors should complement and enhance utility, not substitute for or compromise utility. (23)

Stroustrup's new language included practical constructs and concepts from several other languages: Simula, Algol68, BCPL, Ada, Clu, and ML. (21-25, 43-45).

Java was born in 1990. It was created to meet a different set of criteria: portability, reliability, and longevity. Java was created to be used in the rapidly changing consumer electronics industry. van Hoff describes Java's objectives and design this way:

Programs written in C and C++ have to be compiled for a particular computer chip. When a new chip comes out, most software has to be recompiled to make full use of the new features on the chip. Once compiled, C and C++ programs are not easily adapted to use new software libraries. The programs have to be recompiled from scratch when the library changes. Consumer device software has to work on new chips, though, because manufacturers are constrained by the cost of components. If the price of a computer chip becomes too high, they will replace it immediately with a newer, more cost-effective one....Software used in consumer electronics must also be very reliable, much more than most computer software. If a consumer product fails, the manufacturer usually has to replace the whole machine. (6)

A different problem often requires a different approach. And so Java's evolution followed a different path. Java's design was also heavily influenced by industry experience with C++.

The first project to actually use Java was code named the Green project. Its purpose was to experiment with a new kind of user interface for managing household devices. The computer they developed was called *7 (pronounced "star seven"). The user-interface, written in Java, consisted of a full-color, animated representation of a home. The user could manipulate any appliance by touching it on the screen. Eight working prototypes of the *7 were produced. Duke, who is now the Java mascot, was an animated figure from this first project (6-7).

The names C++ and Java also have interesting histories. Stroustrup's language was originally named C with classes. AT&T management politely asked him to change the name because people had taken to calling it new C. The C language, itself still evolving at AT&T, was being dubbed old C--an embarrassment to C's creators. The ++ comes from C's increment operator (sometimes called the next operator or the successor operator) (Stroustrup 64).

Java's original name was Oak, inspired by an oak tree outside the window of James Gosling, the lead Sun developer on the project. But another language had already taken the name. The team decided on Java while brainstorming one day at a coffee shop (van Hoff, Shaio, & Starbuck 9-10).
" (http://www.shadowlink.net/~raycox/Java.html)

In response to digitalmouse
From the dummies.com site...
"The choice of a programming language to use can pit people against one another in much the same way that religion and politics do. Although you can't find a single "perfect" programming language to use for all occasions, you may want to consider a variety of programming languages. Ultimately, no one cares what language you use as long as your program works.

C/C++
The C and C++ programming language has strong support no matter which computer or operating system you use, so you can't go wrong using C or C++ to write your program. Here are the advantages of writing a program in C/C++:

- Efficiency: C/C++ can create smaller and faster programs than almost any other programming language (with the exception of assembly and machine language).

- Portability: If you write a program in C/C++, you can easily copy it to another computer and run it with a little bit (or a lot) of modifying. This means that you can write a program once and then modify it to work on multiple computers, thereby increasing the market for your program.

- Plentiful programmers: With so many people learning C/C++, you'll have no trouble finding programmers who can modify the program later on.

The majority of commercial programs may be written in C/C++, but many programmers who develop custom software often choose other programming languages because they dislike the following C/C++ drawbacks:

- Difficult to master: C/C++ is one of the more difficult programming languages to master. As a result, by the time you completely learn C/C++, you could have already finished your program if you had chosen another programming language.

- Difficult to read and understand: Programs aren't created as often as they are modified. Because of the cryptic nature of C/C++, understanding how a C/C++ program works so you know how to modify it can be hard.

- Complexity: C/C++ gives you the power and flexibility to manipulate memory and access the computer's hardware directly. Not only does this increase the chance that a bug can keep your program from working right, but it also increases the amount of time that you may need to debug your program to ensure that it works correctly.

Many commercial programs for Windows and the Macintosh are written in C/C++ for speed, efficiency, and portability. If these features are important to you, choose C/C++ for your next programming project.

Visual Basic
Visual Basic is one of the more popular languages (after C/C++) for writing programs. Although professional and experienced programmers tend to use C/C++, novice programmers often use Visual Basic for the following reasons:

- It's easy to learn: You can learn Visual Basic and start writing programs much faster than you can with any other programming language. The sooner you can learn any language, the sooner you can write and give away (or sell) your program.

- It enables fast prototyping: You can quickly create prototypes in Visual Basic. Then you can turn the prototype into a real working program. Other programming languages, such as C/C++, are too difficult to use to create a prototype, which means that you must create your prototype and then dump the whole thing to create the actual program from scratch.

But professional programmers often shun Visual Basic as a "toy" language for these reasons:

- It's slow: Visual Basic programs tend to run much slower than equivalent programs written in other languages, such as C/C++. If speed is your program's primary concern, Visual Basic is not the language to use.

- It's inefficient: Visual Basic programs tend to gobble up huge amounts of hard disk space, even for the simplest program. If you need to create a program to squeeze into a small amount of storage space, Visual Basic is never the best language to use.

- It's inflexible: Visual Basic is easy to learn because it shields you from the technical details of programming a computer. At the same time, it prevents you from taking full control over the computer, which can limit a program's power.

- It limits portability: Visual Basic runs only on Windows 95/98/NT, which means that any programs you write in Visual Basic can never work on any computer that can't run Windows 95/98/NT. Trying to copy and run a Visual Basic program on a Macintosh can be cumbersome, and the time you spend trying this could have been better spent learning and rewriting your entire program in C/C++.

Visual Basic has been used to create commercial quality programs as well as custom programs by both professionals and novices. If you need to create a program quickly and don't want to spend the time learning C/C++, use Visual Basic.

Java
Java is the latest programming language to gain popular support. With Java, you can create full-blown applications or mini-programs (known as applets) that can run over the Internet. Although the language is fairly new, many people have embraced it for the following reasons:

- Write once, run everywhere: Java is the ultimate portable language, so any program you write in Java can (theoretically) run on all the major computer operating systems (such as Windows, Macintosh, and Linux) without any modification whatsoever.

- Safer than C/C++: Java took the best of C/C++ and avoided its major drawbacks. As a result, Java programs are less likely to mess up the computer's memory than an equivalent C/C++ program.

- Based on C/C++: Because Java is derived from C/C++, anyone who knows C/C++ can quickly learn and write programs in Java.

Because Java is still new, Sun Microsystems (the creator of Java) keeps trying to improve the language to make it more appealing. But Java sports a few flaws:

- Slower and less efficient: Programs written in Java tend to run slower than equivalent programs written in C/C++, but this is changing as Java compilers get better.

- Difficult to learn: Java looks like C/C++, so it's still just as difficult as C/C++ to learn. If you want to start programming right away, you're better off with Visual Basic or even Delphi.

- Write once, test everywhere: Theoretically, Java programs can run on different computers without modification. Realistically, you must test your Java programs on different computers to make sure that they work correctly on each type of computer. Because of this drawback, you could spend most of your time making sure that your program works on different computers rather than actually improving and updating your program.

Java is still an evolving language, so many companies are taking a "wait and see" attitude before writing large programs in Java. However, if portability is important, Java is definitely a better choice than Visual Basic and (to a large extent) C/C++."

-----
Compaing C/C++ to Java:
"Data Types: In C/C++ many data types (such as int) are hardware dependent. In Java, the size and manner of representation of data is specified, to facilitate machine independence of code.

References vs. Pointers: In C/C++, variables that contain addresses of data and functions, pointers, can be declared. In Java, no addresses are used. Instead, references are used to establish variable names for objects.

Automatic Variables: In C/C++, memory for variables declared within functions (i.e., local variables) will normally be allocated automatically, on the stack. In Java, all memory for non-intrinsic data objects must be acquired with the new operator.

Dynamic Memory Management: In C++, memory is dynamically assigned by the programmer (using the new operator) and must also explicitly be freed (using the delete operator). In Java, a garbage collection process automatically locates the memory associated with any object that is no longer referenced within the program, meaning no explicit deletion is required.

Global Data and Functions: In C++, data and functions can be declared outside of any class definition. (In C, all functions are declared that way). In Java, all data and functions must be declared within class definitions. Like C++, however, a static declaration may be used to make member data/functions object dependent.

Inheritance: Unlike C++, Java permits only one parent per class. Many benefits of multiple inheritance be achieved, however, using JavaInterfaces. Java class constructor functions can also explicitly invoke parent constructors with the super keyword.

Boolean Expressions: In C/C++, boolean (false/true) expressions translate to 0, nonzero integers. In Java, test are done with the boolean data type. As a result, expressions containing && and || stop evaluating an expression once its results are known to be true or false, referred to as a shortcircuit. The & and | operators, in contrast, evaluate both sides of their expressions even if the final result is already known (e.g., the left side of an & expression is false )."
In response to Hendrix
That'd be a difficult one to answer...I doubt anyone knows just what language these PSX and PS2 development kits use, because it isn't exactly something just anyone can get their hands on. If you really wanted to know the answer to this question, you may consider asking on the forums at GameDev.net. Some professionals (also some well seasoned veterans ;) spend some of their free time around there.

Back to the whole issue of C++ and DM...

Yes, C++ is much harder to learn, and I know a lot of people here at BYOND have given it a bad name. If you have the patience and the motivation to learn a programming language that is more powerful than DM, C++ is one way to go. I personally also do some work with C++ ... though not much.
In response to Kamoku
kamuko i wish i had met you eariler that site is great people there in the forum are a great help :) :D
In response to digitalmouse
Thanks a lot digitalmouse your post explained a lot..




<<HENDRIX>>
In response to Kamoku
That site has a lot to offer thanks for recommending it.
C++ lies and says it's object oriented, but the hell it is. DM is the first actual object oriented programming language i've seen, although not a very powerful one.
In response to Swordsman Zion
Swordsman Zion wrote:
DM is the first actual object oriented programming language i've seen, although not a very powerful one.


Wrong! DM is a: weblanguage, game creation tool, application creation tool, and anything thing else you really want to program, it can even be an address book if you wanted.
In response to Hendrix
Hendrix wrote:
That site has a lot to offer thanks for recommending it.

No problem - internet research is what I do for a living (one of the new services of digitalmouse international (http://www.digitalmouse.org)) - you want to know something, I can find it...
In response to Swordsman Zion
Swordsman Zion wrote:
C++ lies and says it's object oriented...

Well, it doesn't actually outright lie about it, but the mods to C to make C++ OO-based are sometimes a bit difficult - certainly not as smooth or elegant as other OOP languages such as Eiffel, Simula (precursor to C++ I think), Java, and Smalltalk...
In response to Kamoku
Kamoku wrote:
That'd be a difficult one to answer...I doubt anyone
knows just what language these PSX and PS2 development
kits use, because it isn't exactly something just anyone
can get their hands on.

Usually if you decide you want to develop games for those platforms, you can contact them for access to information about programming them, or gain developer access to the tools used/methods/techniques used to make games on them... often to become a developer (the 'inner circle'= for one of these platforms requires a membership that is not always free (the cost of the tools usually).

Often it boils down to a fancy development editor that just compiles down to a machine-language or pseudo-code for the console in question...
Hendrix wrote:
What's the difference between C++ and DM?

A better question is: What's the similarity between them? C++ and DM have almost nothing in common.

Comparing the apples and oranges, here's a breakdown:

Power
Advantage C++: C++ is more powerful overall because you can use inline assembly, and for lots of other reasons. However, the kind of power you get out of it isn't needed for a lot of projects, and for game projects it's easier to have a base toolkit to start with.

Ease of use
Advantage DM: C++ is a royal pain in the butt unless you're really comfortable with whatever you're working on. It's easier to develop a full project faster in DM.

Speed
Advantage C++: DM is an interpreted language.

Portability
Advantage C++: C++ will work for just about any platform.

Power/complexity ratio
DM wins hands down: DM can perform a very, very wide variety of complex tasks that would each require a lot of arcane code in C++. Simple graphics, multiplayer support, associative lists, browser/link support, limited HTML display.

Simplicity of language
Advantage DM: DM has a simple, extremely flexible syntax. C++'s rigid syntax has a certain elegance to it, but lacks the same ease of use because in DM can write the same expression about 4 or 5 different ways.

Online projects
Advantage DM: DM's one drawback here is it can't get down to the socket level, but for most basic online projects it's a breeze. DM handles complex client-server communications issues transparently. This is so important that it deserves its own category, although it falls under some others too.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Portability
Advantage C++: C++ will work for just about any platform.

DM is currently ported to Windows and Linux... someday for the Mac too...

Power/complexity ratio
DM wins hands down: DM can perform a very, very wide
variety of complex tasks that would each require a lot of
arcane code in C++.

Unless you invest some time in finding the libraries you need to make your task(s) easy... nice thing about C/C++ is that it has been around long enough to have a strong following and a huge base of libraries for just about any kind of fuctionality. Just drop the library into your code (kinda like including them in DM), do the right calls, and away you go!

Simplicity of language
C++'s rigid syntax...lacks the same ease of use because
in DM can write the same expression about 4 or 5
different ways.

Oh I don't know about that, most any modern language can do the same task several different ways - including C/C++...

Couldn't resist playing devil's advocate on this one! :)

For game development DM still is a better choice if you want to dive in quickly and produce results in a short time.
Page: 1 2