Sign in to follow this  
GutyGu

Tired of C++.. C#?

Recommended Posts

Hi! I'm new here.. i've been learning c++ and i'm getting so bored of it's complicated grammatic.. so.. i want to change to C#. It's better than c++? has C# the same advantage than c++? i red C# is a little easier. I've a problem.. when i'm learning to program i get tired so fast. With C# maybe it'll be more "enjoyable" :P Plz.. if u can tell me the advantage or disadvantage of C#.. u're gonna help me so much! thank u all :) p.d: Sorry.. my english is AWFUL (i'm sure u know that at this time :P)

Share this post


Link to post
Share on other sites
Hi there,

C++ is a harder language than C#, but if you get bored easily you probably will so with C#.

Try to set yourself some goals that you would like to complete programming wise; for example different kinds of programs you would like to develop and then work towards that. Make yourself a plan so you feel that you're getting somewhere and that you have a purpose with the programming.

Somtime a few days or even a week off of programming may do wonders for your motivation (we all get tired of it from time to time).

Of course if you also feel that the C++ syntax and semantics are a hindrance to your enjoyment by all means change language; but don't expect a new language to fuell you with programming excitement - that enjoyment of building stuff from bits is something you have inside of you.

Share this post


Link to post
Share on other sites
I am currently learning C#. Its not any less complicated IMO. In fact Its more complicated in some areas. Each class member's access level must be individually declared. Apparently If you want a simple copy constructor you HAVE to write your self, the compiler wont. You can’t simply make a reference variable, the compiler decides for you based on whether it’s a class or struct, making you have to do some gymnastics to get it to work right. You can’t just make some simple stand alone utility functions, you HAVE to put them in a class. Making virtual functions isn’t as straight forward as in C++.

So far the only thing I have seen that’s convenient about the language is Events, but those were easy enough to knock together in C++, so it’s not that big of an advantage. Delegates are nice too I suppose, but again aren’t really that big a deal.

I have yet to figure out what makes this language so ‘RAD’ It seems to want to fight basic code construction every step of the way.

Share this post


Link to post
Share on other sites
I find it harder to get round the (positive) limitations of a language then actually using them as "hacks" in the more evil languages like C++.

Share this post


Link to post
Share on other sites
First of all, lets please not have this C++ vs C# war again.

Now, from my experiences, C# is a much better language to use for casual games. That may be 2D or 3D. MDX is fast enough for 80% of the games out there. There are few disadvantages though from my perspective:

- .NET requirement, this is a biggie for downloadable products
- startup speed, sometimes takes 10 seconds before anything is shown on the screen (that is on my 3ghz 2gig system). There are tricks to lower it, but it will never pop up like a good ol' Win32 exe.

Hmm, well, those are my two gripes with the language. The first one will go away with Windows Vista (.net built in).

You won't be creating any breakthrough, in terms of graphics, game anytime soon, but you might create a breakthrough game in style and gameplay. Basically, C# took away some of the headache from development, reduced code by 25%, provided a great IDE, and today has a lot of support (C++ has more, but C# is growing fast). And, most important to me, it brought back fun in development that I believe was lost when we switched from DOS to Windows development due to the increase in code size and functions to learn.

Share this post


Link to post
Share on other sites
If C++ bores you, C# will too. I'd recommend a more high level language with better turnaround, like Ruby or Python. Both are nice (although python might be better for games, at least library wise).

A problem might also be that you are setting your sights too high at once. What have you tried to do?

Share this post


Link to post
Share on other sites
First of all, thank u all for your answers. It helps me so much :)

I think is not i get bored with c++. Maybe i'm not applying enought what i'm learning because i'm going so fast. I've to make a plan (like some of u said) and program some little things to apply what i learned.

I'm reading "Teach yourself c++ in 21 days" (excellent) and "thinking in c++" and i'm working with DevC++. Everything was fine until i tried "classes". I don't know why i received 1000 errors in compiling time. Anyway.. can u tell me some pages to introduce me to C#? and some pages with games based on C# with source codes?

If C# is not easier as i thought then.. i'll keep my mind on c++. I want to make my first text-adventure based on silent hill... hahahaha it's going to be a REALLY SCARY GAME.. lol

Well.. thank u everybody. This page RULES!!

Share this post


Link to post
Share on other sites
Quote:
Original post by GutyGu...Everything was fine until i tried "classes". I don't know why i received 1000 errors in compiling time...

Sounds like you are running away from a problem rather then trying to solve it. What errors do you get?

Share this post


Link to post
Share on other sites
If you really want an adventure, you could always go with Lisp [grin]
I don't know it myself, but I've heard it's really different form most languages.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Visual Basic
Ruby
Python
REBOL


more direct payoff with less learning involved :-)

Share this post


Link to post
Share on other sites
Download the latest microsoft directx SDK and then check out the c++ and c# empty template projects that come with it and then compare the code required to draw a triangle to the screen and decide for yourself how much simpler c# is than c++!

Share this post


Link to post
Share on other sites
Quote:
Original post by GutyGu
can u tell me some pages to introduce me to C#?

see this recent thread that i started a few days ago. this link, posted by ussnewjersey4, was very helpful. the videos don't go into much detail, but i got enough information about a wide variety of subjects that i've been able to learn as i go using msdn.

Share this post


Link to post
Share on other sites
My problems with classes were a few months ago... that's why I left programming for a while :( Now i'm starting again.

Thanks for the links! I'm reading the C# introduction from Microsoft and Digipen. It seems to be a little easier than c++ but there's a lot of points that i didn't read yet.

That's all.. ah! By the way.. if some of you are in the same situation than me.. send me a PM. Maybe we could make a "newbie team" to help each other and to prevent getting bored :P

Thx4all!

Share this post


Link to post
Share on other sites
Quote:
Original post by GutyGu
I'm reading "Teach yourself c++ in 21 days" (excellent) and "thinking in c++" and i'm working with DevC++. Everything was fine until i tried "classes". I don't know why i received 1000 errors in compiling time.


Something you should definitely note before even thinking about C#. It is an easier language if you've worked with C++ already. The thing about C# is that EVERYTHING is a object, everything resides within a class. Chances are if you are having problems with object orientated programming related programming you need to read about a lot more. I believe that it is great you are trying to expand your knowledge with another language c#.

The C# langauage was designed around object orientated programming everything will be in classes, and everything will be objects. You really should try and figure out object orientated programming its a pretty difficult subject for new programmers. It is however very useful and once you understand it you will see how awesome it is.

Share this post


Link to post
Share on other sites
Quote:
Original post by GutyGu
My problems with classes were a few months ago... that's why I left programming for a while :( Now i'm starting again.


One thing is sure: Learning all of C++ makes the word "frustration" much more meaningful.
+ C++: Learning it teaches concepts (low-level memory managment, pointers, RAII, template-metaprogramming) which are important to know for any 'computer scientist' or hacker.
- C++: Said concepts are losing importance due to bytecompiled+memory managed frameworks like .NET or any High Level Language (which C++ is not really)(like Python, Ruby, Lisp, OCaml, Perl...).

Share this post


Link to post
Share on other sites
Quote:
Original post by Konfusius

One thing is sure: Learning all of C++ makes the word "frustration" much more meaningful.


Yeah.. but i think frustration comes because some tutorials don't have many exercises with them. If you don't use what you're learning you get bored soon. I'm working hard again with "teach yourself c++ in 21 days". Would it help if i start to learn another language like PHP? I studied it sometime ago and it was very easy to me. After you learn a little of c++ the rest of languages are a loooot easier :P

Quote:
Original post by GodBeastX

I want you to uninstall all your compilers and quit programming. If you get bored coding, you just aren't cut out for it.


Thanks! i really needed an advice like that.. i feel better now! hahahaha just kidding :P

Well.. i'm gonna ask u a last question. Compilers? i'm using Dev-C++ and i remember it had errors when i tried classes. I don't remember what errors it said to me but the code was fine. I tried to copy and paste from the tutorial and it had errors too. Do i have to change compilers? which are the best?

Thx all and good luck :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by GutyGu
Well.. i'm gonna ask u a last question. Compilers? i'm using Dev-C++ and i remember it had errors when i tried classes. I don't remember what errors it said to me but the code was fine. I tried to copy and paste from the tutorial and it had errors too. Do i have to change compilers? which are the best?

Can you provide an example for a valid source snippet that is alleged to cause errors in DevC++?
While this is in general possible, it is highly unlikely that you -as a beginner- are going to find code that's valid and doesn't compile properly. The compiler used by DevC++ is MingW32/gcc and it's pretty rock solid, it's also used by several other free/open source IDE projects (such as CodeBlocks), so any compiler errors should certainly not be IDE-specific but rather compiler-specific.
Apart from that you need to realize that there are many tutorials (and even books!) out there that do not teach proper ANSI/ISO C++, so you should really not blame the IDE or compiler when it is the learning material that may in fact SUCK.
There are industrial-strength applications being developed with gcc.

In other words, DevC++ or CodeBlocks or any MingW32/gcc based IDE should be absolutely sufficient for any beginner, likewise for the underlying compiler!

Share this post


Link to post
Share on other sites
So many of these threads recently. It's nice in a way to see people actually considering other languages rather then blindly going with C++. Just look through threads in the forums from the past few weeks and you'll see this question asked and answered by tons of different people.

Anything you learn with any language will be useful elsewhere, it all adds to your experience.

If you want a quicker fix you might want to just go even higher then C#, like flash script or some kind of game maker package.

So the right language is whatever language enables you to make a game. Unless you are on an academic mission to learn a particular technology, it really doesn't matter which you choose. Especially if you have your sights set about right, and are prepared to put some effort in to get past the "boring" bits, you will get something done.

Share this post


Link to post
Share on other sites
Nothing much to comment on the C++ and C# side of things that hasn't been mentioned already, but if you're interested in programming text adventure games (or interactive fiction), you might wanna try the Inform programming language found here

inform

Ahh, the good old days of text adventures.
I'd be keen to try a Silent Hill text adventure game. :)

Good luck with your endeavours.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Go with C#,

I have been trying for years with c++ with little luck,
I spent a week learning c# and I have a decent game underway.

there are alot fewer engines in C# , however it is much more managed and IMO logical. Alot of things are taken care of behind the scenes.

Share this post


Link to post
Share on other sites
Go with C#, C# is extremelly easy. You can get something working easily and fast and you will be motivated with it, so you're going to keep moving on...
Learn the language basics first, try to make some simple applications, try to make a game with what you've learned from the basics. Then download SDL.NET or DirectX, or some other api, and learn the basics of it(how to plot a pixel on screen or how to blit an image to the screen). Then go to http://www.gamedev.net/reference/ and check out the How do I make games article... and try to make some of those games...
You gotta make always a little app with what you learned. So right after you read a topic, think of something cool you can build up with what you learned and finishit it... you can make the dumbest thing ever, but you are gonna fell great and really proud :P

The only way to learn programming and game dev, or anything you want to develop, you gotta practice it, so you gotta MAKE PROGRAMS!!!! so try to make something fun out of it...

There is a REALLY cool book called: Microsoft C# Programming for the Absolute Beginner from Premier Press. This books teachs all the basics of programming in C# and all the examples are little games. By the end of each chapter you build a little game. Some of them are really nice to learn a lot of some of the game dev mechanics.
I think you can download it for free after you register any products from Visual Studio Express family. You should try out this book, its really nice for begginners.

[Edited by - BrasiLokau on May 25, 2006 9:51:35 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by GodBeastX
I want you to uninstall all your compilers and quit programming. If you get bored coding, you just aren't cut out for it.

Actually most programmers are very particular about what they like to focus their programming time on-some like doing gui interfaces, others like to do the cool 3dstuff and others the practical stuff like file loading, map editors and other tools,etc.
I used to work with this guy that would get all excited about making SQL queries which to is about as exciting as going to the dentist is to myself!
Now mention game programming and I probably get as excited and that SQL guy!

Share this post


Link to post
Share on other sites
Quote:
Original post by daviangel
Actually most programmers are very particular about what they like to focus their programming time on-some like doing gui interfaces, others like to do the cool 3dstuff and others the practical stuff like file loading, map editors and other tools,etc.
I used to work with this guy that would get all excited about making SQL queries which to is about as exciting as going to the dentist is to myself!
Now mention game programming and I probably get as excited and that SQL guy!


Lol, I like programming "the practical stuff". I have lots of hand made tools that I have yet to use in an actual project.

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