So I've learned C...

Started by
18 comments, last by SimonForsman 11 years, 5 months ago
After learning the basics of the C Language, I don't quite know what to do with myself. I mean, I've been craving to start SOMETHING and I've already made myself a basic stat roller for Dungeons and Dragons and the basic programs assigned to me by my professor. But I don't know where to go from here. I've heard many stories that Learning C or C++ as your first language is not exactly the best thing to do since the learning curve can be very steep for some, but I've had no qualms with it. Maybe I'm an exception? Or maybe I don't quite understand it as well as I think. I'm not sure, but I've come to gamedev to ask you masters of the keyboard to guide me in the right direction.

I've been wanting to get into learning Java, I'm going to try and take a class for it next quarter (if I pass this quarter's intro to C [Damn my laziness]) and I'm not sure if that's where I want to go. I would love to take up programming professionally, I just am not sure what exacty I want to do with the knowledge I'm collecting. I know that C, so far, is very memory based and seemingly more intricate than the programming I had invisioned, but I find it extremely fun.

I would like to be able to use C and C++ in some way, shape, or form. I kind of invision myself to be one of those guys that makes game engines like the unreal engine or something. I always thought it would be cool to be the un-sung heroes of the gaming world, making some of the fastest, most powerful gaming tools on the market. But then again, I also want to be a rock star... so you can see my indecisiveness.

Anyway, i'm merely rambling as I always do.

My point is... Where do you guys think I should go next? Do you think that I could take another class of c and c++ and be able to find a programming job this way? Or do I need to learn a lot more languages before I can even consider turning in an application for even the lowest levels of the programming profession.
Advertisement
You've learned a procedural language so now learning an OO language will be a good choice. Knowledge of both will also make you a better programmer with each - you'll be able to apply some OO concepts to your procedural language code, as well as not try to shoe-horn OO onto problems that don't really suit it.

You seem to be doing great so far, and I'd suggest that you also spend some time learning the basics of an API. Outside of a language's basic syntax and it's standard library, API use is a huge part of programming, so getting familiar with one, and with how it's been designed to be used, may not be a bad idea.

It's not really about how many languages you know; an experienced programmer can pick up and become reasonably productive with a new language in a week or so. It's your ability to apply that knowledge to solving problems that matter, and that's something that comes with time and experience.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

I would agree with mhagain about stepping up to OOP. Java or C++ are good choices, although if you are comfortable with C then maybe C++ might be a better choice - but either either way you cannot go wrong.

As for C being a poor first choice - balderdash! Its actually a good first choice as it introduces you to all the basic concepts you will find in many other languages. Its mainly C++ I wouldn't recommend as a first language as it has too many distractions to the beginner such as OOP.

Before moving on, though, have you considered trying your hand at a command-line text game? I don't mean like writing a text adventure parser, but perhaps seeing what you can come up with just by using menu selections? I remember my first program being an RPG that, although crude, taught me how important the overall structure of a program/game was. My biggest regret after that was being lured into learning C++, WinAPI and DirectX7 all at once and made a bloody awful 2D shoot-em-up...I should have forgot about DX until I had remade my first RPG into a more graceful C++/WinAPI application. The thought of hardware-accelerated sprites and snazzy 3D stuff was too hard to resist!

But anyway, learning C was a good start. Keep up the good work!

Languages; C, Java. Platforms: Android, Oculus Go, ZX Spectrum, Megadrive.

Website: Mega-Gen Garage


I would agree with mhagain about stepping up to OOP. Java or C++ are good choices, although if you are comfortable with C then maybe C++ might be a better choice - but either either way you cannot go wrong.


Personally I suggest learning Java. C++ is a bit too similar to C and thus you will end up doing many things "the C way", instead of "C++ way". Once you have learnt OO with separate language you can better understand the nuances of C++.

Otherwise - C is excellent first language. Although it has some complex parts - like memory management and pointer arithmetic - it is otherwise small, compact and powerful. And it gives you the "feeling of being close to metal" - i.e. understanding better how computers crunch through high-level data structures. While you can be good programmer without knowing low-level details, having more insight never hurts wink.png
Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/
I am primarily a C/C++ programmer. However, in April I started a new job as a Java backend server developer. I had never touched Java before I got asked to come in for the interview.

I spent a week using it before my interview, and I passed.

Once you have the programming mindset, and have 'learnt' one language, it's very easy to learn another, it's simply a case of syntax.

I agree with those suggesting learning an API. I think my most valuable skill is my knowledge of OpenGL, having been using it for about 10 years.
Learning a new language is almost never a bad idea. And I agree that it would not hurt to know an object-oriented language like Java or C#. I agree with Lauris Kaplinski that C++ might be a little bit too familiar so you might learn less from it. However, there are other good and interesting languages out there to learn. I personally think OOP is way, way overrated, and I absolutely hate Java, C++ and C#. Some languages you might want to try: Haskell, Erlang, Lisp (Scheme, Clojure, Common Lisp), Ruby, Python, Go, Prolog. But, you might also want to just stick with C for now, and do a bigger project, like a small game; maybe a simple platformer or some sort of puzzle game.


I've heard many stories that Learning C or C++ as your first language is not exactly the best thing to do since the learning curve can be very steep for some, but I've had no qualms with it. Maybe I'm an exception? Or maybe I don't quite understand it as well as I think.



I think this (the bold part) is the case. Not that you show any particular signs of misunderstanding; you just seem so new to it that I don't think you realize what you don't know. Are you comfortable with pointers, memory management, recursion, data structures, etc?

It also doesn't hurt to learn some computer science theory (which you might wanna do if you want to make super fast game engines). Do you know about hash tables, regular expressions, graph algorithms like breath-first-search, sorting algorithms, dynamic programming, complexity analysis?

I think it might be best to stick with C a little bit longer, so that when you learn new languages later you can appreciate the differences more. And you might want to read up on some theory and such on the side, if you are interested.

Lastly, and I almost didn't write this because it seems so obvious now (I started 8 years ago): Programming is so much more than knowing languages. Besides the things I've mentioned, there is also the skill of good program/code design. I mean writing well-structured, maintainable, reusable, flexible, short, simple, correct and safe code. If you always think hard about the code you are writing, like "Could this be done better?", "Are there problems that might arise later with this?", etc. you will speed up your learning process. Reading books, blogs, and watching presentations can also help a lot.

Personally I suggest learning Java. C++ is a bit too similar to C and thus you will end up doing many things "the C way", instead of "C++ way". Once you have learnt OO with separate language you can better understand the nuances of C++.


This is a great suggestion (C# would be equally good for the same reason) - pick an OO language that you just cannot write C-style code in and you neatly avoid the trap of just falling back on C concepts and constructs as an easy way out.

Definitely seconded and +1 for that.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Personally, I would say stick with C a while longer, but start using some multimedia API and learn how to make more games. SDL is a good one to begin with, and it has a C interface.

This tutorial teaches you how to use SDL (EDIT: Although, it will use some C++ in it, like classes, it will also give you a good idea what you can do with SDL). I would suggest going through it, make some simple games for yourself and have a little fun with C. You Can still make really fun and good games with C. Once you're comfortable making simple games and have a better grasp of programming in general you can move onto an OO language and expand your programming knowledge.

Whichever you choose (mine or others suggestions), have fun with it.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Man. I love you guys so much. No matter what questions I throw out there, I always get a mass of intelligent people such as yourselves giving me your two-cents and leading me on to be a better programmer. I can't thank you guys enough for all of the patient guidance you guys have provided me within the last month-or-less of me being a member on this forum. I really hope that I can pay you guys back some how, be it some free-lance programming or even some sensual serenading (I was a music major before i switched to computers ;D).

As it stands now, I do believe I'll pick up Java as I'm learning more of c. I'm gonna continue to study C and maybe mess around and develop a bit of a Interactive Fiction style program game that's easy to go through and run but has some complexities that make the program more efficent.

But a curious question that has been bugging me for the last few months is this;

Is there a way to blend languages together? I had a recent conversation with a new found friend of mine, not a half hour ago (Mind you, I'm sitting in the student center at my local community college enjoying a nice, tachicardia-enducing energy drink) who spoke of ASP.net . He said that in the language they use a lot of C#. I responded "Do I need to learn C# to learn asp?" and he said firmly, "ASP is a language on it's own... It's very hard to explain."

So... yeah. I'm a bit confused as to his response, so I shall ask you, my fellow quick-witted, ingenious, and handsome bretheren...

Is there a way to use one programming language in another programming language? Such as being able to write C in Java... etc. etc.

And please do explain more about what he meant with ASP.

Man. I love you guys so much. No matter what questions I throw out there, I always get a mass of intelligent people such as yourselves giving me your two-cents and leading me on to be a better programmer. I can't thank you guys enough for all of the patient guidance you guys have provided me within the last month-or-less of me being a member on this forum. I really hope that I can pay you guys back some how, be it some free-lance programming or even some sensual serenading (I was a music major before i switched to computers ;D).

As it stands now, I do believe I'll pick up Java as I'm learning more of c. I'm gonna continue to study C and maybe mess around and develop a bit of a Interactive Fiction style program game that's easy to go through and run but has some complexities that make the program more efficent.

But a curious question that has been bugging me for the last few months is this;

Is there a way to blend languages together? I had a recent conversation with a new found friend of mine, not a half hour ago (Mind you, I'm sitting in the student center at my local community college enjoying a nice, tachicardia-enducing energy drink) who spoke of ASP.net . He said that in the language they use a lot of C#. I responded "Do I need to learn C# to learn asp?" and he said firmly, "ASP is a language on it's own... It's very hard to explain."

So... yeah. I'm a bit confused as to his response, so I shall ask you, my fellow quick-witted, ingenious, and handsome bretheren...

Is there a way to use one programming language in another programming language? Such as being able to write C in Java... etc. etc.

And please do explain more about what he meant with ASP.


I'm not an expert on this, so some of what I say might be a little bit wrong. But, it is possible. How hard it is depends on which languages you want to mix, and how. I'm not sure exactly what you mean by "blend", but...

Some languages support other "embedded" languages. For example, in Perl you can mix in shell scrip code in the Perl code, and in some languages it's easy to mix in database query code like SQL. It is not that common, but some languages were designed with this in mind.

It's also possible to work in one language and use libraries written in other languages. It's relatively easy to do this between assembly, C, and C++. And it is easy to do it if the languages run on the same virtual machine/platform (.NET or Java Virtual Machine). Mixing Java with C is possible, but trickier and not something you usually do.

One can also have different subsystems that are written in different languages, and run on different platforms or even computers, just talk to each other over some network protocol.

C# and ASP.net both run on Microsoft's .NET platform, so it's easy to share libraries and such, but they are different languages, with different syntax, etc.

This topic is closed to new replies.

Advertisement