By using this site, you agree to our Privacy Policy and our Terms of Use. Close

Forums - PC Discussion - i want to learn how to code....

Real developers use Ada.



Around the Network

I know I am jumping in this kind of late, but I would NOT learn java or C# before C++.

You will learn bad C++ habits by starting with either one of them. When you switch to C++ you will leave memory leaks everywhere. Start with C/C++. I would skip a C book as a beginner C++ book will cover most of what you will learn in a C one, then get in to OOP.

Managed Languages (C#, Java, J#, etc) are very good for web apps and low performance requirement windows apps. C# is what I use for the majority of my projects at work (I am a Software engineer,)

But...

The game engine I am writing is all in C++.

FYI the order I learned in was:

BASIC
QBASIC
C/ASM
Pascal
C++
Java
C#



I am a Gauntlet Adventurer.

I strive to improve my living conditions by hoarding gold, food, and sometimes keys and potions. I love adventure, fighting, and particularly winning - especially when there's a prize at stake. I occasionally get lost inside buildings and can't find the exit. I need food badly. What Video Game Character Are You?

Mega Man 9 Challenges: 74%

Waltz Tango Jitterbug Bust a move Headbanging
Bunny Hop Mr. Trigger Happy Double Trouble Mr. Perfect Invincible
Almost Invincible No Coffee Break Air Shoes Mega Diet Encore
Peacekeeper Conservationist Farewell To Arms Gamer's Day Daily Dose
Whomp Wiley! Truly Addicted! Truly Hardcore! Conqueror Vanquisher
Destroyer World Warrior Trusty Sidearm Pack Rat Valued Customer
Shop A Holic Last Man Standing Survivor Hard Rock Heavy Metal
Speed Metal Fantastic 9 Fully Unloaded Blue Bomber Eco Fighter
Marathon Fight Quick Draw G Quick Draw C Quick Draw S Quick Draw H
Quick Draw J Quick Draw P Quick Draw T Quick Draw M Quick Draw X
Andir said:
This is my last post in this thread, but I highly suggest overlooking C# as a learner language. Yes, it's incredibly easy to do stuff in it, but you get that at a cost of:

1. ) Being pretty much dependent on Microsoft. Yes, there is Mono, but when Microsoft releases version 4.x of .NET it will likely include features that Mono does not. Mono will always be one step behind in that manner. Also, what happens when Microsoft pulls out of the "no lawsuit promise?" (...and they will)

2. ) Losing code longevity. I use VS2005 at work and I have to tell you it's a pain in the ass (and really stupid, IMHO) to have to upgrade an existing C# solution in order to work with the latest version of .NET. In fact, keeping multiple, non-compatible versions of .NET is a crux of the language, wherein C++ is pretty much compatible with every old C program ever made. C/C++ are essentially turn-key languages. You're not going to have to live on blogs to keep up with the latest shortcuts and language features (which points out that C/C++ are still very powerful and very simple languages as opposed to the ever growing complexity of .NET with each new version.) What happens when your program written in .NET 1.1 stops working because Microsoft decides that they no longer need to include it with Windows 7 (I have no reference, just stating a probably situation) and have stopped distributing the 1.1 VM? Hell, even Java, with the latest Virtual Machine was able to run even the oldest Java bytecode without having to dig up a version 1 VM.

3. ) Not learning about proper memory management. Yes, using() {} blocks are nice and all for disposing objects, but it doesn't do anything that a deconstructor function in C++ doesn't. I'd even argue that the deconstructor is more efficient and reliable since it doesn't require a specialized block surrounding the scope of the object. You just place it in your object class file and update it with needed code.

I would also suggest to steer clear of Visual Studio if you plan on continuing this path. Every project you will make in Visual studio will try to push you to Microsoft methodologies and they push it in every document on MSDN as well. If you plan on going with C/C++ check out Code::Blocks or DevC++. I've personally used both. They both have good and bad features and it boils down to personal preference. There is Eclipse as well, but in my experience, Eclipse can be a little too bulky to work with.

Lastly, I'm not a fan of Microsoft. It's not blind fanboyism, nor blind hate that I follow. It's corporate history, and current corporate practice that make me this way. They clearly are not out for the common good of the world, you or the gamers but are strictly a corporate entity looking for every way possible to keep your money flowing into their pockets. Only true, open, and free standards can be free of this type of greedy influence.

thanks. i'll remember that, and i think you finalized my decison....

 




basically any beginner programming course will get you to make a hello world program before anything else



Well, I started with C64 basic, but... I think even Turbo Pascal isn't that used or even pascal is the best language to learn first. You can't do much with those of course, but they will teach you basics of programming very nicely. When you know whats procedural programming and you can handle it you should play around with some object oriented programming language like python(java = crap, sorry :/). And when you can handle it you should move on to functional programming and that is for example haskell. After that you know pretty well how to handle any language there is.

(Of course theres asm, but that kicks in when its time learn how to optimize code.)



Around the Network

I'd say follow some tuts on creators.xna.com - you'll learn bits of c# and xna and you'll get results real fast.



The problem with C#/Java/Visual Basic .Net is that they rely on a framework to function, and due to this, their performance is horrible. They make things a LOT easier in some respects, but are much more restrictive in others.

With C you learn the foundations of programming by starting procedurally, but still have the syntax and code structure that will be used in C++. C++ is by far the best option to ultimately learn as its performance and flexibility (with a good compiler) are unmatched. This is why games are programmed in C++ (with some ASM bits where needed) and not c# (though I wouldn't be suprised if the 360 has/will have the .net frame installed)

On a side note would any one be interested in a semi-regular posting of code tutorials in C/C++? I could probably manage some time to write a few up.



I am a Gauntlet Adventurer.

I strive to improve my living conditions by hoarding gold, food, and sometimes keys and potions. I love adventure, fighting, and particularly winning - especially when there's a prize at stake. I occasionally get lost inside buildings and can't find the exit. I need food badly. What Video Game Character Are You?

Mega Man 9 Challenges: 74%

Waltz Tango Jitterbug Bust a move Headbanging
Bunny Hop Mr. Trigger Happy Double Trouble Mr. Perfect Invincible
Almost Invincible No Coffee Break Air Shoes Mega Diet Encore
Peacekeeper Conservationist Farewell To Arms Gamer's Day Daily Dose
Whomp Wiley! Truly Addicted! Truly Hardcore! Conqueror Vanquisher
Destroyer World Warrior Trusty Sidearm Pack Rat Valued Customer
Shop A Holic Last Man Standing Survivor Hard Rock Heavy Metal
Speed Metal Fantastic 9 Fully Unloaded Blue Bomber Eco Fighter
Marathon Fight Quick Draw G Quick Draw C Quick Draw S Quick Draw H
Quick Draw J Quick Draw P Quick Draw T Quick Draw M Quick Draw X
NJ5 said:

I suggest starting with (by today's standards) a more bare-bones language like C. It's powerful enough to do anything you want, yet there isn't much syntax for you to learn.

Buy a good C programming book, and when you can code some basic algorithms with loops, recursion, arrays and structures, you can move on to C++, Java or C#.

At some point, you'll have to learn the really important part of programming, which is data structures and algorithms.

 

This is a good answer.

My suggestion will be : C -> C++ -> C# ( that I use to work )

 



 “In the entertainment business, there are only heaven and hell, and nothing in between and as soon as our customers bore of our products, we will crash.”  Hiroshi Yamauchi

TAG:  Like a Yamauchi pimp slap delivered by Il Maelstrom; serving it up with style.

CrashMan said:

On a side note would any one be interested in a semi-regular posting of code tutorials in C/C++? I could probably manage some time to write a few up.

Well it seems there are quite a lot of developers here on VGC so a thread that talk about computer science could be of interest.

 



 “In the entertainment business, there are only heaven and hell, and nothing in between and as soon as our customers bore of our products, we will crash.”  Hiroshi Yamauchi

TAG:  Like a Yamauchi pimp slap delivered by Il Maelstrom; serving it up with style.

crymetyme said:
wow i never knew vgchartz had so many programmers. well, i shouldn't be surprised, really, i mean vgchartz is a video game forum.

 

After listening to a lot of the responses here I would say it doesn't :P

Want to play around with some game development, get a copy of gcc, sdl and play around with some of the examples. If you want to do OpenGL stuff you are going to have to know some linear algebra, so you may want to look at some of the higherlevel libraries.

Here are some rules of thumb

1) Don't take advice from RADers, they live in a different world unless you want to make scripts for other people's games. Ruby,C#,java,python.

1a) Anyone who mentions the word "agile" should immediately be ignored.

2) Anyone who says X language is "more powerful" than Y language should be ignored.

3) All languages involve pointers, some just don't tell you.

4) Stack allocation is faster than heap allocation. Java.

5) Compilers aren't as good at optimization as many would have you believe.

6) Algorithms and datastructures are what is important. You want datastructures which avoid pointer dereferencing to god knows where kills locality.