• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
blueshogun96

Is C++ being replaced with C#?

53 posts in this topic

I'm not sure how many times this has been asked, but I thought I'd ask for myself. When I look at job postings online to see how well the IT/game job market is for programmers, I see that the demand for C# is now in greater demand than C++. Tbh, I don't see many hard core games programmed in C#, but why is it more in demand than C++? I personally don't care for C#, but I can use it when necessary. I personally prefer neither one, because using 100% pure C works just fine for me and I see little benefit to using OOP in games to begin with (except for templates and a few features from inheritance, but the rest feels rather useless to me). But who cares what I think, right?

So is it better to have C# skills these days as opposed to C++? Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
I'Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
I would love to know what exactly you think this means.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by blueshogun96
I'Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
I would love to know what exactly you think this means.


I was told you can't get low level access in C# such as accessing a linear or physical address directly (or is that just in XNA for 360)? I never used C# for anything serious.

Quote:
Original post by Programmer One
Just because you don't understand something doesn't mean it isn't useful.

Why do you assume I don't understand it?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
Quote:
Original post by Promit
Quote:
Original post by blueshogun96
I'Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
I would love to know what exactly you think this means.


I was told you can't get low level access in C# such as accessing a linear or physical address directly (or is that just in XNA for 360)? I never used C# for anything serious.

Seeing as how you can't actually do that in C++ EITHER without using OS specific functions, which can also be invoked from within C# as well...
Quote:

Quote:
Original post by Programmer One
Just because you don't understand something doesn't mean it isn't useful.

Why do you assume I don't understand it?

Because of the statements you made above, combined with what is we're probably going to assumed to be a lack of experience.
0

Share this post


Link to post
Share on other sites
You'll understand when you program more. It sounds like you've never had to program a GUI application in C++ yet. When you do and look at C# and WPF you'll see why a lot of people prefer C# for certain projects. Remember, as has been said a lot on this forum, that languages are tools. You choose the one that best suits your needs. Some companies need to create complex UI applications and C# is usually preferred for that. C++ has a niche since game engines tend to be coded in it.

What kind of job postings have you been looking at? Tools programming?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
Quote:
Original post by Programmer One
Just because you don't understand something doesn't mean it isn't useful.

Why do you assume I don't understand it?


Because your statement is the equivalent of, "I don't get what is the big deal with cars; horses work just fine for me."
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Programmer One
Quote:
Original post by blueshogun96
Quote:
Original post by Programmer One
Just because you don't understand something doesn't mean it isn't useful.

Why do you assume I don't understand it?


Because your statement is the equivalent of, "I don't get what is the big deal with cars; horses work just fine for me."


That's a bit of a stretch. If C# is a car, I'd say C++ is a car without doors.
1

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by blueshogun96
I'Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
I would love to know what exactly you think this means.


http://www.youtube.com/watch?v=92WdCOXVNBg ?

;)
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Promit
Quote:
Original post by blueshogun96
I'Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
I would love to know what exactly you think this means.


It means a Real programmers.

And I'm not really sure what to make of the fact that there is a wikipedia entry on it...

I also always found it funny that Apollo Mission Computer used a virtual machine. Just goes to show they should have hired real programmers.
0

Share this post


Link to post
Share on other sites
Stepping aside from belittlement for a moment...


In the general programming business world, C# is taking over a lot of C++'s responsibilities.

In the console games sector of that world, those responsibilities mostly involve the tool-chain -- the bits of the game engine that run on developers PCs.

The actual game run-time -- the bits that run on the Xbox/PS3 -- are of course still C/C++.

There are exceptions to this (C# can be run on consoles if you really want to), but in general my experience has been C/C++ for the engine and C# for the tools.
0

Share this post


Link to post
Share on other sites
<I'm kidding here>

Nah... Real Programmer code in Pure Basic, and optimize the resulting FASM code it generate.

After all, you want to develop a demo on WinPC and watch it on AmigaOS.

</I'm kidding here>

On the topic, C# is an "expansion" to C++ the way C++ is an expansion to C. It serve a purpose. and use the purpose well. OOP on C++ is to make complex code and app manageable, not for you to create class for almost all variables and have .Get & .Set for everything.

As for me, I develop software and tools in Pure Basic, as I get running quickly. I develop games in game engines (Game Maker, Unity, UDK).

0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
Quote:
Original post by Promit
Quote:
Original post by blueshogun96
I'Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
I would love to know what exactly you think this means.


I was told you can't get low level access in C# such as accessing a linear or physical address directly (or is that just in XNA for 360)? I never used C# for anything serious.


Name a specific algorithm used in application programming that actually needs that kind of memory access ('application programming' meaning that operating system kernels and databases don't count).
0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
I'm not sure how many times this has been asked, but I thought I'd ask for myself.

Many, many, many, many, many, many, many times before. In fact, why don't I give you a minuscule sampling of them:


Frankly, these sorts of threads are incredibly tiring. The original poster always comes into the thread with firmly implanted notions borne of shockingly small amounts of actual fact and proceeds to ignore all comers unless they are providing him with justification for his ill-conceived presuppositions.

How about we skip the validation from those who don't know, the skewering from those who do, the rehashing of the same arguments again and again from both sides, the unwanted and unsolicited opinions from Joe Coder #3, and just agree to ignore these threads whenever they appear?
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Mike.Popoloski
How about we skip the validation from those who don't know, the skewering from those who do, the rehashing of the same arguments again and again from both sides, the unwanted and unsolicited opinions from Joe Coder #3, and just agree to ignore these threads whenever they appear?
...because that would go against the GameDev.net culture of taking pride in bluntly informing people that they're unknowledgeable. Duh.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
Quote:
Original post by Promit
Quote:
Original post by blueshogun96
I'Of course, you can have both, but I prefer C/C++ because it's more "to the metal".
I would love to know what exactly you think this means.


I was told you can't get low level access in C# such as accessing a linear or physical address directly (or is that just in XNA for 360)? I never used C# for anything serious.


C# has pointers.

0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
I prefer C/C++ because it's more "to the metal".



That's a misconception. Anything low level that you can do in C/C++ you can also do in C#.

Some people say that you shouldn't be using C# because it's "slower", but with JIT compilation, it's just as fast as any compiled language.

The base libraries perform a lot more sanity checking however, such as array bounds checking... but here's the thing. Almost every single exploit found these days is still a buffer overrun exploit. It simply amazes me in this day and age that people STILL introduce buffer overrun vulnerabilities. But that's what you get for using a "to the metal" language. Sure, you think it's faster to not check things like array boundaries... until your little mistake causes things to be compromised. I'll take the safety of C# over the haphazardness of C++ any day.

0

Share this post


Link to post
Share on other sites
Quote:
Original post by Washu
Seeing as how you can't actually do that in C++ EITHER without using OS specific functions, which can also be invoked from within C# as well...

I'm not entirely clear on where you're going with this, so I'm going to stab around in the dark rather aimlessly in search of clarification.

I'm aware of the semantics of ISO C++ pointers (insofar as they are not integral memory addresses, undefined pointer arithmetic and all that), so one interpretation of "OS specific functions" would be implementation-defined pointer r-values? Or are you referring to virtual memory, separate address spaces and all that, where "OS specific functions" literally refers to OS routines which a process can invoke to interact with other parts of of the system? (I am clearly not an OS guy)

wrt C#, I won't go into that.

Quote:
Original post by FableFox
On the topic, C# is an "expansion" to C++ the way C++ is an expansion to C.

Well, that's among the grosser simplifications I've read recently.

Quote:
Original post by Nypyren
Name a specific algorithm used in application programming that actually needs that kind of memory access ('application programming' meaning that operating system kernels and databases don't count).

This.
0

Share this post


Link to post
Share on other sites
The decision should be simple really. If you get a job doing c++ then you should use c++. If you get a job doing C# you should use C#. If you have a choice between two jobs where one pays more than the other, you should take the job and therefore language which pays the most. (or whatever else helps you decide between two jobs). If you know nothing about either language you shouldn't get either job; get a job doing PHP instead.

Then you can hide your inexperience.

0

Share this post


Link to post
Share on other sites
Quote:
Original post by FableFox
On the topic, C# is an "expansion" to C++ the way C++ is an expansion to C.

C# is a poor implementation of Common Lisp. Just like all other Turing complete languages.

Quote:
Almost every single exploit found these days is still a buffer overrun exploit

Those are incredibly rare. At least when it comes to important exploits.

The biggest and by far most damaging attack vector for a while now is social.

Quote:
It simply amazes me in this day and age that people STILL introduce buffer overrun vulnerabilities. But that's what you get for using a "to the metal" language.

That is not what makes managed languages secure. Heck - it's possible to do stack overflow rooting in browser using pure javascript.

The reason managed languages are safer is because they run in sandbox. The security does not come from array.length checks. It's from the VM being locked down. It is precisely the same as running a "to the metal" application inside a virtual machine.


Security issues come from OS design, where applications are given full access to everything. *nix has somewhat superior design, but regardless - if your .Net gave full access to everything from boot loader to driver configuration to HAL to Ring-0 it would be precisely as vulnerable as native applications - array checks or not.


And it's important to understand that .Net and JVM are in a separate league here. Being managed or running on a VM does *nothing* for security. This is best testified by all the rootings using PHP. A trivial ../../.. request was used to root more machines than stacks were ever smashed - and for much more value.

Security of .Net and JVM comes from an absurdly overdesigned security layer sitting behind every syscall. No other VM offers this many features (media, file system, ...) in such robust manner.
0

Share this post


Link to post
Share on other sites
Quote:
Original post by speciesUnknown
The decision should be simple really. If you get a job doing c++ then you should use c++. If you get a job doing C# you should use C#. If you have a choice between two jobs where one pays more than the other, you should take the job and therefore language which pays the most. (or whatever else helps you decide between two jobs). If you know nothing about either language you shouldn't get either job; get a job doing PHP instead.

Then you can hide your inexperience.


Quoted for truth.

This discussion took place in the past with all kinds of languages and it will arise again when C*~& comes out.
I'm sticking with C++ as long as I can. Why? Because I just don't know as much about C# as C++. Simple as that. Once/if C# "takes over", I'll switch to it as my main. No hard feelings. But I'll still keep using the "language that fits best" for my projects.

Don't be in Ze way of progress, Or I will have you shot! /Nazivoiceoff
0

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96I was told you can't get low level access in C# such as accessing a linear or physical address directly (or is that just in XNA for 360)? I never used C# for anything serious.


people write operating systems in c#. but i'm glad the ordinary app does not have the rights to mess with the system directly. independent of language :)
0

Share this post


Link to post
Share on other sites
Quote:
Original post by Fenrisulvur
Quote:
Original post by Washu
Seeing as how you can't actually do that in C++ EITHER without using OS specific functions, which can also be invoked from within C# as well...

I'm not entirely clear on where you're going with this, so I'm going to stab around in the dark rather aimlessly in search of clarification.

I'm aware of the semantics of ISO C++ pointers (insofar as they are not integral memory addresses, undefined pointer arithmetic and all that), so one interpretation of "OS specific functions" would be implementation-defined pointer r-values? Or are you referring to virtual memory, separate address spaces and all that, where "OS specific functions" literally refers to OS routines which a process can invoke to interact with other parts of of the system? (I am clearly not an OS guy)

C++ runs on top of a virtual machine, just as C# does. The virtual machine is described in the ISO standard for the C++ language. That virtual machine may sometimes match the behavior of the hardware (although, generally it does not).

In a modern PC, the virtual machine described by the ISO standard (even the draft one for C++0x), is no where near an accurate description of the physical machine, or the OS provided abstraction.

You have no access to the underlying memory. Everything your pointer points to could be on the disk... with the OS abstracting access to it. In other words "pointers" don't point to memory. They point to an OS defined "thing" that the OS may, at its leisure, decide to store in memory, or on the disk, or on the network, or on the cloud, or stitched into the back of some poor little slave worker. You don't, and can't, know which of these it is without dropping down to OS specific functionality.

Quote:
Security issues come from OS design, where applications are given full access to everything. *nix has somewhat superior design, but regardless - if your .Net gave full access to everything from boot loader to driver configuration to HAL to Ring-0 it would be precisely as vulnerable as native applications - array checks or not.

Dunno where you got the idea that Linux is "superior" or that "applications are given full access to everything" but that's false. The only case in which applications have "full access to everything" in Windows is when they're run with administrative or SYSTEM privileges, and even then they don't. Heck, you have to either write a driver or run on a Windows 9x machine to be running with RING0 privileges. Frankly, since Windows Vista and beyond, there's been no reason to run with administrative privileges, and if you are... then you're a moron. It's the equivalent as running as root in Linux (or a user with the same rights as root).

Even in Windows XP you did not require administrative rights, and most users can and do run pretty happily without administrative rights (you know... on all of those business networks). It's really only when some imbecile writes their shitty software which makes assumptions about the user's access level that force anyone to ever even have to raise their privilege levels. And that's true on Linux and Windows.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0